diff --git a/sdk/appservice/mgmt-v2019_08_01/pom.xml b/sdk/appservice/mgmt-v2019_08_01/pom.xml new file mode 100644 index 0000000000000..f42231b9d4b57 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/pom.xml @@ -0,0 +1,135 @@ + + + 4.0.0 + com.microsoft.azure.appservice.v2019_08_01 + + com.microsoft.azure + azure-arm-parent + 1.1.0 + ../../../pom.management.xml + + azure-mgmt-certificateregistration + 1.0.0-beta + jar + Microsoft Azure SDK for CertificateRegistration Management + This package contains Microsoft CertificateRegistration Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + 1.6.5 + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AbnormalTimePeriod.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AbnormalTimePeriod.java new file mode 100644 index 0000000000000..1ef693e1b7fe0 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 start time of the downtime. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set start time of the downtime. + * + * @param startTime the startTime value to set + * @return the AbnormalTimePeriod object itself. + */ + public AbnormalTimePeriod withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get end time of the downtime. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set end time of the downtime. + * + * @param endTime the endTime value to set + * @return the AbnormalTimePeriod object itself. + */ + public AbnormalTimePeriod withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get list of Possible Cause of downtime. + * + * @return the events value + */ + public List events() { + return this.events; + } + + /** + * Set list of Possible Cause of downtime. + * + * @param events the events value to set + * @return the AbnormalTimePeriod object itself. + */ + public AbnormalTimePeriod withEvents(List events) { + this.events = events; + return this; + } + + /** + * Get list of proposed solutions. + * + * @return the solutions value + */ + public List solutions() { + return this.solutions; + } + + /** + * Set list of proposed solutions. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AccessControlEntryAction.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AccessControlEntryAction.java new file mode 100644 index 0000000000000..fb9bd211d47a7 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Address.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Address.java new file mode 100644 index 0000000000000..2e63b660b34f3 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 first line of an Address. + * + * @return the address1 value + */ + public String address1() { + return this.address1; + } + + /** + * Set first line of an Address. + * + * @param address1 the address1 value to set + * @return the Address object itself. + */ + public Address withAddress1(String address1) { + this.address1 = address1; + return this; + } + + /** + * Get the second line of the Address. Optional. + * + * @return the address2 value + */ + public String address2() { + return this.address2; + } + + /** + * Set the second line of the Address. Optional. + * + * @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 for the address. + * + * @return the city value + */ + public String city() { + return this.city; + } + + /** + * Set the city for the address. + * + * @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 for the address. + * + * @return the country value + */ + public String country() { + return this.country; + } + + /** + * Set the country for the address. + * + * @param country the country value to set + * @return the Address object itself. + */ + public Address withCountry(String country) { + this.country = country; + return this; + } + + /** + * Get the postal code for the address. + * + * @return the postalCode value + */ + public String postalCode() { + return this.postalCode; + } + + /** + * Set the postal code for the address. + * + * @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 or province for the address. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Set the state or province for the address. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AddressResponse.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AddressResponse.java new file mode 100644 index 0000000000000..6632add7baf1e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AddressResponse.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.AddressResponseInner; +import java.util.List; + +/** + * Type representing AddressResponse. + */ +public interface AddressResponse extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the internalIpAddress value. + */ + String internalIpAddress(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the outboundIpAddresses value. + */ + List outboundIpAddresses(); + + /** + * @return the serviceIpAddress value. + */ + String serviceIpAddress(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the vipMappings value. + */ + List vipMappings(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AnalysisData.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AnalysisData.java new file mode 100644 index 0000000000000..34adfb6537065 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +import com.microsoft.azure.management.appservice.v2019_08_01.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 name of the Detector. + * + * @return the source value + */ + public String source() { + return this.source; + } + + /** + * Set name of the Detector. + * + * @param source the source value to set + * @return the AnalysisData object itself. + */ + public AnalysisData withSource(String source) { + this.source = source; + return this; + } + + /** + * Get detector Definition. + * + * @return the detectorDefinition value + */ + public DetectorDefinitionInner detectorDefinition() { + return this.detectorDefinition; + } + + /** + * Set detector Definition. + * + * @param detectorDefinition the detectorDefinition value to set + * @return the AnalysisData object itself. + */ + public AnalysisData withDetectorDefinition(DetectorDefinitionInner detectorDefinition) { + this.detectorDefinition = detectorDefinition; + return this; + } + + /** + * Get source Metrics. + * + * @return the metrics value + */ + public List metrics() { + return this.metrics; + } + + /** + * Set source Metrics. + * + * @param metrics the metrics value to set + * @return the AnalysisData object itself. + */ + public AnalysisData withMetrics(List metrics) { + this.metrics = metrics; + return this; + } + + /** + * Get additional Source Data. + * + * @return the data value + */ + public List> data() { + return this.data; + } + + /** + * Set additional Source Data. + * + * @param data the data value to set + * @return the AnalysisData object itself. + */ + public AnalysisData withData(List> data) { + this.data = data; + return this; + } + + /** + * Get detector Meta Data. + * + * @return the detectorMetaData value + */ + public ResponseMetaData detectorMetaData() { + return this.detectorMetaData; + } + + /** + * Set detector Meta Data. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AnalysisDefinition.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AnalysisDefinition.java new file mode 100644 index 0000000000000..fc95e28031e98 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AnalysisDefinition.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.AnalysisDefinitionInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing AnalysisDefinition. + */ +public interface AnalysisDefinition extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the description value. + */ + String description(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ApiDefinitionInfo.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ApiDefinitionInfo.java new file mode 100644 index 0000000000000..2d00f1576df82 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 of the API definition. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Set the URL of the API definition. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ApiKVReference.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ApiKVReference.java new file mode 100644 index 0000000000000..8fea01ac298cf --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ApiKVReference.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description of site key vault references. + */ +public class ApiKVReference { + /** + * The reference property. + */ + @JsonProperty(value = "reference") + private String reference; + + /** + * Possible values include: 'Initialized', 'Resolved', 'InvalidSyntax', + * 'MSINotEnabled', 'VaultNotFound', 'SecretNotFound', + * 'SecretVersionNotFound', 'AccessToKeyVaultDenied', 'OtherReasons'. + */ + @JsonProperty(value = "status") + private ResolveStatus status; + + /** + * The vaultName property. + */ + @JsonProperty(value = "vaultName") + private String vaultName; + + /** + * The secretName property. + */ + @JsonProperty(value = "secretName") + private String secretName; + + /** + * The secretVersion property. + */ + @JsonProperty(value = "secretVersion") + private String secretVersion; + + /** + * Possible values include: 'SystemAssigned', 'UserAssigned', + * 'SystemAssigned, UserAssigned', 'None'. + */ + @JsonProperty(value = "identityType") + private ManagedServiceIdentityType identityType; + + /** + * The details property. + */ + @JsonProperty(value = "details") + private String details; + + /** + * Possible values include: 'KeyVault'. + */ + @JsonProperty(value = "source") + private ConfigReferenceSource source; + + /** + * Possible values include: 'ApplicationSetting'. + */ + @JsonProperty(value = "location") + private ConfigReferenceLocation location; + + /** + * Get the reference value. + * + * @return the reference value + */ + public String reference() { + return this.reference; + } + + /** + * Set the reference value. + * + * @param reference the reference value to set + * @return the ApiKVReference object itself. + */ + public ApiKVReference withReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Get possible values include: 'Initialized', 'Resolved', 'InvalidSyntax', 'MSINotEnabled', 'VaultNotFound', 'SecretNotFound', 'SecretVersionNotFound', 'AccessToKeyVaultDenied', 'OtherReasons'. + * + * @return the status value + */ + public ResolveStatus status() { + return this.status; + } + + /** + * Set possible values include: 'Initialized', 'Resolved', 'InvalidSyntax', 'MSINotEnabled', 'VaultNotFound', 'SecretNotFound', 'SecretVersionNotFound', 'AccessToKeyVaultDenied', 'OtherReasons'. + * + * @param status the status value to set + * @return the ApiKVReference object itself. + */ + public ApiKVReference withStatus(ResolveStatus status) { + this.status = status; + return this; + } + + /** + * Get the vaultName value. + * + * @return the vaultName value + */ + public String vaultName() { + return this.vaultName; + } + + /** + * Set the vaultName value. + * + * @param vaultName the vaultName value to set + * @return the ApiKVReference object itself. + */ + public ApiKVReference withVaultName(String vaultName) { + this.vaultName = vaultName; + return this; + } + + /** + * Get the secretName value. + * + * @return the secretName value + */ + public String secretName() { + return this.secretName; + } + + /** + * Set the secretName value. + * + * @param secretName the secretName value to set + * @return the ApiKVReference object itself. + */ + public ApiKVReference withSecretName(String secretName) { + this.secretName = secretName; + return this; + } + + /** + * Get the secretVersion value. + * + * @return the secretVersion value + */ + public String secretVersion() { + return this.secretVersion; + } + + /** + * Set the secretVersion value. + * + * @param secretVersion the secretVersion value to set + * @return the ApiKVReference object itself. + */ + public ApiKVReference withSecretVersion(String secretVersion) { + this.secretVersion = secretVersion; + return this; + } + + /** + * Get possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. + * + * @return the identityType value + */ + public ManagedServiceIdentityType identityType() { + return this.identityType; + } + + /** + * Set possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. + * + * @param identityType the identityType value to set + * @return the ApiKVReference object itself. + */ + public ApiKVReference withIdentityType(ManagedServiceIdentityType identityType) { + this.identityType = identityType; + 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 ApiKVReference object itself. + */ + public ApiKVReference withDetails(String details) { + this.details = details; + return this; + } + + /** + * Get possible values include: 'KeyVault'. + * + * @return the source value + */ + public ConfigReferenceSource source() { + return this.source; + } + + /** + * Set possible values include: 'KeyVault'. + * + * @param source the source value to set + * @return the ApiKVReference object itself. + */ + public ApiKVReference withSource(ConfigReferenceSource source) { + this.source = source; + return this; + } + + /** + * Get possible values include: 'ApplicationSetting'. + * + * @return the location value + */ + public ConfigReferenceLocation location() { + return this.location; + } + + /** + * Set possible values include: 'ApplicationSetting'. + * + * @param location the location value to set + * @return the ApiKVReference object itself. + */ + public ApiKVReference withLocation(ConfigReferenceLocation location) { + this.location = location; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ApiManagementConfig.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ApiManagementConfig.java new file mode 100644 index 0000000000000..9cd66c77ad4d4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ApiManagementConfig.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure API management (APIM) configuration linked to the app. + */ +public class ApiManagementConfig { + /** + * APIM-Api Identifier. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get aPIM-Api Identifier. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set aPIM-Api Identifier. + * + * @param id the id value to set + * @return the ApiManagementConfig object itself. + */ + public ApiManagementConfig withId(String id) { + this.id = id; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificate.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificate.java new file mode 100644 index 0000000000000..f257ef545606d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 key Vault resource Id. + * + * @return the keyVaultId value + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Set key Vault resource Id. + * + * @param keyVaultId the keyVaultId value to set + * @return the AppServiceCertificate object itself. + */ + public AppServiceCertificate withKeyVaultId(String keyVaultId) { + this.keyVaultId = keyVaultId; + return this; + } + + /** + * Get key Vault secret name. + * + * @return the keyVaultSecretName value + */ + public String keyVaultSecretName() { + return this.keyVaultSecretName; + } + + /** + * Set key Vault secret name. + * + * @param keyVaultSecretName the keyVaultSecretName value to set + * @return the AppServiceCertificate object itself. + */ + public AppServiceCertificate withKeyVaultSecretName(String keyVaultSecretName) { + this.keyVaultSecretName = keyVaultSecretName; + return this; + } + + /** + * Get status of the Key Vault secret. Possible values include: 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', 'Unknown'. + * + * @return the provisioningState value + */ + public KeyVaultSecretStatus provisioningState() { + return this.provisioningState; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificateOrder.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificateOrder.java new file mode 100644 index 0000000000000..21e235c3d4be8 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificateOrder.java @@ -0,0 +1,351 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.Map; +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.AppServiceCertificateOrderInner; + +/** + * Type representing AppServiceCertificateOrder. + */ +public interface AppServiceCertificateOrder extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the appServiceCertificateNotRenewableReasons value. + */ + List appServiceCertificateNotRenewableReasons(); + + /** + * @return the autoRenew value. + */ + Boolean autoRenew(); + + /** + * @return the certificates value. + */ + Map certificates(); + + /** + * @return the csr value. + */ + String csr(); + + /** + * @return the distinguishedName value. + */ + String distinguishedName(); + + /** + * @return the domainVerificationToken value. + */ + String domainVerificationToken(); + + /** + * @return the expirationTime value. + */ + DateTime expirationTime(); + + /** + * @return the intermediate value. + */ + CertificateDetails intermediate(); + + /** + * @return the isPrivateKeyExternal value. + */ + Boolean isPrivateKeyExternal(); + + /** + * @return the keySize value. + */ + Integer keySize(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the lastCertificateIssuanceTime value. + */ + DateTime lastCertificateIssuanceTime(); + + /** + * @return the nextAutoRenewalTimeStamp value. + */ + DateTime nextAutoRenewalTimeStamp(); + + /** + * @return the productType value. + */ + CertificateProductType productType(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the root value. + */ + CertificateDetails root(); + + /** + * @return the serialNumber value. + */ + String serialNumber(); + + /** + * @return the signedCertificate value. + */ + CertificateDetails signedCertificate(); + + /** + * @return the status value. + */ + CertificateOrderStatus status(); + + /** + * @return the validityInYears value. + */ + Integer validityInYears(); + + /** + * The entirety of the AppServiceCertificateOrder definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithProductType, DefinitionStages.WithCreate { + } + + /** + * Grouping of AppServiceCertificateOrder definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a AppServiceCertificateOrder definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the AppServiceCertificateOrder definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the appservicecertificateorder definition allowing to specify ProductType. + */ + interface WithProductType { + /** + * Specifies productType. + * @param productType Certificate product type. Possible values include: 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl' + * @return the next definition stage +*/ + WithCreate withProductType(CertificateProductType productType); + } + + /** + * The stage of the appservicecertificateorder definition allowing to specify AutoRenew. + */ + interface WithAutoRenew { + /** + * Specifies autoRenew. + * @param autoRenew <code>true</code> if the certificate should be automatically renewed when it expires; otherwise, <code>false</code> + * @return the next definition stage + */ + WithCreate withAutoRenew(Boolean autoRenew); + } + + /** + * The stage of the appservicecertificateorder definition allowing to specify Certificates. + */ + interface WithCertificates { + /** + * Specifies certificates. + * @param certificates State of the Key Vault secret + * @return the next definition stage + */ + WithCreate withCertificates(Map certificates); + } + + /** + * The stage of the appservicecertificateorder definition allowing to specify Csr. + */ + interface WithCsr { + /** + * Specifies csr. + * @param csr Last CSR that was created for this order + * @return the next definition stage + */ + WithCreate withCsr(String csr); + } + + /** + * The stage of the appservicecertificateorder definition allowing to specify DistinguishedName. + */ + interface WithDistinguishedName { + /** + * Specifies distinguishedName. + * @param distinguishedName Certificate distinguished name + * @return the next definition stage + */ + WithCreate withDistinguishedName(String distinguishedName); + } + + /** + * The stage of the appservicecertificateorder definition allowing to specify KeySize. + */ + interface WithKeySize { + /** + * Specifies keySize. + * @param keySize Certificate key size + * @return the next definition stage + */ + WithCreate withKeySize(Integer keySize); + } + + /** + * The stage of the appservicecertificateorder definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the appservicecertificateorder definition allowing to specify ValidityInYears. + */ + interface WithValidityInYears { + /** + * Specifies validityInYears. + * @param validityInYears Duration in years (must be between 1 and 3) + * @return the next definition stage + */ + WithCreate withValidityInYears(Integer validityInYears); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAutoRenew, DefinitionStages.WithCertificates, DefinitionStages.WithCsr, DefinitionStages.WithDistinguishedName, DefinitionStages.WithKeySize, DefinitionStages.WithKind, DefinitionStages.WithValidityInYears { + } + } + /** + * The template for a AppServiceCertificateOrder update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAutoRenew, UpdateStages.WithCertificates, UpdateStages.WithCsr, UpdateStages.WithDistinguishedName, UpdateStages.WithKeySize, UpdateStages.WithKind, UpdateStages.WithValidityInYears { + } + + /** + * Grouping of AppServiceCertificateOrder update stages. + */ + interface UpdateStages { + /** + * The stage of the appservicecertificateorder update allowing to specify AutoRenew. + */ + interface WithAutoRenew { + /** + * Specifies autoRenew. + * @param autoRenew <code>true</code> if the certificate should be automatically renewed when it expires; otherwise, <code>false</code> + * @return the next update stage + */ + Update withAutoRenew(Boolean autoRenew); + } + + /** + * The stage of the appservicecertificateorder update allowing to specify Certificates. + */ + interface WithCertificates { + /** + * Specifies certificates. + * @param certificates State of the Key Vault secret + * @return the next update stage + */ + Update withCertificates(Map certificates); + } + + /** + * The stage of the appservicecertificateorder update allowing to specify Csr. + */ + interface WithCsr { + /** + * Specifies csr. + * @param csr Last CSR that was created for this order + * @return the next update stage + */ + Update withCsr(String csr); + } + + /** + * The stage of the appservicecertificateorder update allowing to specify DistinguishedName. + */ + interface WithDistinguishedName { + /** + * Specifies distinguishedName. + * @param distinguishedName Certificate distinguished name + * @return the next update stage + */ + Update withDistinguishedName(String distinguishedName); + } + + /** + * The stage of the appservicecertificateorder update allowing to specify KeySize. + */ + interface WithKeySize { + /** + * Specifies keySize. + * @param keySize Certificate key size + * @return the next update stage + */ + Update withKeySize(Integer keySize); + } + + /** + * The stage of the appservicecertificateorder update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the appservicecertificateorder update allowing to specify ValidityInYears. + */ + interface WithValidityInYears { + /** + * Specifies validityInYears. + * @param validityInYears Duration in years (must be between 1 and 3) + * @return the next update stage + */ + Update withValidityInYears(Integer validityInYears); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificateOrderPatchResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificateOrderPatchResource.java new file mode 100644 index 0000000000000..264901cfc08d5 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificateOrderPatchResource.java @@ -0,0 +1,391 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import java.util.Map; +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * ARM resource for a certificate order that is purchased through Azure. + */ +@JsonFlatten +public class AppServiceCertificateOrderPatchResource 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 state of the Key Vault secret. + * + * @return the certificates value + */ + public Map certificates() { + return this.certificates; + } + + /** + * Set state of the Key Vault secret. + * + * @param certificates the certificates value to set + * @return the AppServiceCertificateOrderPatchResource object itself. + */ + public AppServiceCertificateOrderPatchResource withCertificates(Map certificates) { + this.certificates = certificates; + return this; + } + + /** + * Get certificate distinguished name. + * + * @return the distinguishedName value + */ + public String distinguishedName() { + return this.distinguishedName; + } + + /** + * Set certificate distinguished name. + * + * @param distinguishedName the distinguishedName value to set + * @return the AppServiceCertificateOrderPatchResource object itself. + */ + public AppServiceCertificateOrderPatchResource withDistinguishedName(String distinguishedName) { + this.distinguishedName = distinguishedName; + return this; + } + + /** + * Get domain verification token. + * + * @return the domainVerificationToken value + */ + public String domainVerificationToken() { + return this.domainVerificationToken; + } + + /** + * Get duration in years (must be between 1 and 3). + * + * @return the validityInYears value + */ + public Integer validityInYears() { + return this.validityInYears; + } + + /** + * Set duration in years (must be between 1 and 3). + * + * @param validityInYears the validityInYears value to set + * @return the AppServiceCertificateOrderPatchResource object itself. + */ + public AppServiceCertificateOrderPatchResource withValidityInYears(Integer validityInYears) { + this.validityInYears = validityInYears; + return this; + } + + /** + * Get certificate key size. + * + * @return the keySize value + */ + public Integer keySize() { + return this.keySize; + } + + /** + * Set certificate key size. + * + * @param keySize the keySize value to set + * @return the AppServiceCertificateOrderPatchResource object itself. + */ + public AppServiceCertificateOrderPatchResource withKeySize(Integer keySize) { + this.keySize = keySize; + return this; + } + + /** + * Get certificate product type. Possible values include: 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl'. + * + * @return the productType value + */ + public CertificateProductType productType() { + return this.productType; + } + + /** + * Set certificate product type. Possible values include: 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl'. + * + * @param productType the productType value to set + * @return the AppServiceCertificateOrderPatchResource object itself. + */ + public AppServiceCertificateOrderPatchResource withProductType(CertificateProductType productType) { + this.productType = productType; + return this; + } + + /** + * Get <code>true</code> if the certificate should be automatically renewed when it expires; otherwise, <code>false</code>. + * + * @return the autoRenew value + */ + public Boolean autoRenew() { + return this.autoRenew; + } + + /** + * Set <code>true</code> if the certificate should be automatically renewed when it expires; otherwise, <code>false</code>. + * + * @param autoRenew the autoRenew value to set + * @return the AppServiceCertificateOrderPatchResource object itself. + */ + public AppServiceCertificateOrderPatchResource withAutoRenew(Boolean autoRenew) { + this.autoRenew = autoRenew; + return this; + } + + /** + * Get status of certificate order. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get current order status. Possible values include: 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted'. + * + * @return the status value + */ + public CertificateOrderStatus status() { + return this.status; + } + + /** + * Get signed certificate. + * + * @return the signedCertificate value + */ + public CertificateDetails signedCertificate() { + return this.signedCertificate; + } + + /** + * Get last CSR that was created for this order. + * + * @return the csr value + */ + public String csr() { + return this.csr; + } + + /** + * Set last CSR that was created for this order. + * + * @param csr the csr value to set + * @return the AppServiceCertificateOrderPatchResource object itself. + */ + public AppServiceCertificateOrderPatchResource withCsr(String csr) { + this.csr = csr; + return this; + } + + /** + * Get intermediate certificate. + * + * @return the intermediate value + */ + public CertificateDetails intermediate() { + return this.intermediate; + } + + /** + * Get root certificate. + * + * @return the root value + */ + public CertificateDetails root() { + return this.root; + } + + /** + * Get current serial number of the certificate. + * + * @return the serialNumber value + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get certificate last issuance time. + * + * @return the lastCertificateIssuanceTime value + */ + public DateTime lastCertificateIssuanceTime() { + return this.lastCertificateIssuanceTime; + } + + /** + * Get certificate expiration time. + * + * @return the expirationTime value + */ + public DateTime expirationTime() { + return this.expirationTime; + } + + /** + * Get <code>true</code> if private key is external; otherwise, <code>false</code>. + * + * @return the isPrivateKeyExternal value + */ + public Boolean isPrivateKeyExternal() { + return this.isPrivateKeyExternal; + } + + /** + * Get reasons why App Service Certificate is not renewable at the current moment. + * + * @return the appServiceCertificateNotRenewableReasons value + */ + public List appServiceCertificateNotRenewableReasons() { + return this.appServiceCertificateNotRenewableReasons; + } + + /** + * Get time stamp when the certificate would be auto renewed next. + * + * @return the nextAutoRenewalTimeStamp value + */ + public DateTime nextAutoRenewalTimeStamp() { + return this.nextAutoRenewalTimeStamp; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificateOrders.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificateOrders.java new file mode 100644 index 0000000000000..66d127002f4da --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificateOrders.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceCertificateOrder; +import rx.Completable; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.AppServiceCertificateOrderInner; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceCertificateResource; + +/** + * Type representing AppServiceCertificateOrders. + */ +public interface AppServiceCertificateOrders { + /** + * Begins definition for a new CertificateOrder resource. + * @param name resource name. + * @return the first stage of the new CertificateOrder definition. + */ + AppServiceCertificateOrder.DefinitionStages.Blank defineCertificateOrder(String name); + + /** + * Begins definition for a new Certificate resource. + * @param name resource name. + * @return the first stage of the new Certificate definition. + */ + AppServiceCertificateResource.DefinitionStages.Blank defineCertificate(String name); + + /** + * Get a certificate order. + * Description for Get a certificate order. + * + * @param resourceGroupName resource group name + * @param name resource name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getByResourceGroupAsync(String resourceGroupName, String name); + + /** + * Get certificate orders in a resource group. + * Description for Get certificate orders in a resource group. + * + * @param resourceGroupName resource group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByResourceGroupAsync(String resourceGroupName); + + /** + * List all certificate orders in a subscription. + * Description for List all certificate orders in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Delete an existing certificate order. + * Description for Delete an existing certificate order. + * + * @param resourceGroupName resource group name + * @param name resource name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String name); + + /** + * Reissue an existing certificate order. + * Description for 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 observable for the request + */ + Completable reissueAsync(String resourceGroupName, String certificateOrderName, ReissueCertificateOrderRequest reissueCertificateOrderRequest); + + /** + * Renew an existing certificate order. + * Description for 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 observable for the request + */ + Completable renewAsync(String resourceGroupName, String certificateOrderName, RenewCertificateOrderRequest renewCertificateOrderRequest); + + /** + * Resend certificate email. + * Description for 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 observable for the request + */ + Completable resendEmailAsync(String resourceGroupName, String certificateOrderName); + + /** + * Verify domain ownership for this certificate order. + * Description for 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 observable for the request + */ + Completable resendRequestEmailsAsync(String resourceGroupName, String certificateOrderName); + + /** + * Verify domain ownership for this certificate order. + * Description for 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 for the request + */ + Observable retrieveSiteSealAsync(String resourceGroupName, String certificateOrderName, SiteSealRequest siteSealRequest); + + /** + * Verify domain ownership for this certificate order. + * Description for 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 observable for the request + */ + Completable verifyDomainOwnershipAsync(String resourceGroupName, String certificateOrderName); + + /** + * Retrieve the list of certificate actions. + * Description for 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 for the request + */ + Observable retrieveCertificateActionsAsync(String resourceGroupName, String name); + + /** + * Retrieve email history. + * Description for 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 for the request + */ + Observable retrieveCertificateEmailHistoryAsync(String resourceGroupName, String name); + + /** + * Validate information for a certificate order. + * Description for Validate information for a certificate order. + * + * @param appServiceCertificateOrder Information for a certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable validatePurchaseInformationAsync(AppServiceCertificateOrderInner appServiceCertificateOrder); + + /** + * Get the certificate associated with a certificate order. + * Description for 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 for the request + */ + Observable getCertificateAsync(String resourceGroupName, String certificateOrderName, String name); + + /** + * List all certificates associated with a certificate order. + * Description for 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 for the request + */ + Observable listCertificatesAsync(final String resourceGroupName, final String certificateOrderName); + + /** + * Delete the certificate associated with a certificate order. + * Description for 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 observable for the request + */ + Completable deleteCertificateAsync(String resourceGroupName, String certificateOrderName, String name); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificatePatchResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificatePatchResource.java new file mode 100644 index 0000000000000..39288f73c4d92 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificatePatchResource.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Key Vault container ARM resource for a certificate that is purchased through + * Azure. + */ +@JsonFlatten +public class AppServiceCertificatePatchResource 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 key Vault resource Id. + * + * @return the keyVaultId value + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Set key Vault resource Id. + * + * @param keyVaultId the keyVaultId value to set + * @return the AppServiceCertificatePatchResource object itself. + */ + public AppServiceCertificatePatchResource withKeyVaultId(String keyVaultId) { + this.keyVaultId = keyVaultId; + return this; + } + + /** + * Get key Vault secret name. + * + * @return the keyVaultSecretName value + */ + public String keyVaultSecretName() { + return this.keyVaultSecretName; + } + + /** + * Set key Vault secret name. + * + * @param keyVaultSecretName the keyVaultSecretName value to set + * @return the AppServiceCertificatePatchResource object itself. + */ + public AppServiceCertificatePatchResource withKeyVaultSecretName(String keyVaultSecretName) { + this.keyVaultSecretName = keyVaultSecretName; + return this; + } + + /** + * Get status of the Key Vault secret. Possible values include: 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', 'Unknown'. + * + * @return the provisioningState value + */ + public KeyVaultSecretStatus provisioningState() { + return this.provisioningState; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificateResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificateResource.java new file mode 100644 index 0000000000000..3440b18144175 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceCertificateResource.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.AppServiceCertificateResourceInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.Map; + +/** + * Type representing AppServiceCertificateResource. + */ +public interface AppServiceCertificateResource extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the keyVaultId value. + */ + String keyVaultId(); + + /** + * @return the keyVaultSecretName value. + */ + String keyVaultSecretName(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + KeyVaultSecretStatus provisioningState(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the AppServiceCertificateResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithCertificateOrder, DefinitionStages.WithLocation, DefinitionStages.WithCreate { + } + + /** + * Grouping of AppServiceCertificateResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a AppServiceCertificateResource definition. + */ + interface Blank extends WithCertificateOrder { + } + + /** + * The stage of the appservicecertificateresource definition allowing to specify CertificateOrder. + */ + interface WithCertificateOrder { + /** + * Specifies resourceGroupName, certificateOrderName. + * @param resourceGroupName Name of the resource group to which the resource belongs + * @param certificateOrderName Name of the certificate order + * @return the next definition stage + */ + WithLocation withExistingCertificateOrder(String resourceGroupName, String certificateOrderName); + } + + /** + * The stage of the appservicecertificateresource definition allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location Resource Location + * @return the next definition stage + */ + WithCreate withLocation(String location); + } + + /** + * The stage of the appservicecertificateresource definition allowing to specify KeyVaultId. + */ + interface WithKeyVaultId { + /** + * Specifies keyVaultId. + * @param keyVaultId Key Vault resource Id + * @return the next definition stage + */ + WithCreate withKeyVaultId(String keyVaultId); + } + + /** + * The stage of the appservicecertificateresource definition allowing to specify KeyVaultSecretName. + */ + interface WithKeyVaultSecretName { + /** + * Specifies keyVaultSecretName. + * @param keyVaultSecretName Key Vault secret name + * @return the next definition stage + */ + WithCreate withKeyVaultSecretName(String keyVaultSecretName); + } + + /** + * The stage of the appservicecertificateresource definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the appservicecertificateresource definition allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next definition stage + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithKeyVaultId, DefinitionStages.WithKeyVaultSecretName, DefinitionStages.WithKind, DefinitionStages.WithTags { + } + } + /** + * The template for a AppServiceCertificateResource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithKeyVaultId, UpdateStages.WithKeyVaultSecretName, UpdateStages.WithKind { + } + + /** + * Grouping of AppServiceCertificateResource update stages. + */ + interface UpdateStages { + /** + * The stage of the appservicecertificateresource update allowing to specify KeyVaultId. + */ + interface WithKeyVaultId { + /** + * Specifies keyVaultId. + * @param keyVaultId Key Vault resource Id + * @return the next update stage + */ + Update withKeyVaultId(String keyVaultId); + } + + /** + * The stage of the appservicecertificateresource update allowing to specify KeyVaultSecretName. + */ + interface WithKeyVaultSecretName { + /** + * Specifies keyVaultSecretName. + * @param keyVaultSecretName Key Vault secret name + * @return the next update stage + */ + Update withKeyVaultSecretName(String keyVaultSecretName); + } + + /** + * The stage of the appservicecertificateresource update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceEnvironmentPatchResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceEnvironmentPatchResource.java new file mode 100644 index 0000000000000..b7589ba9d0c56 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceEnvironmentPatchResource.java @@ -0,0 +1,872 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.StampCapacityInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * ARM resource for a app service environment. + */ +@JsonFlatten +public class AppServiceEnvironmentPatchResource 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; + + /** + * Flag that displays whether an ASE has linux workers or not. + */ + @JsonProperty(value = "properties.hasLinuxWorkers") + private Boolean hasLinuxWorkers; + + /** + * Key Vault ID for ILB App Service Environment default SSL certificate. + */ + @JsonProperty(value = "properties.sslCertKeyVaultId") + private String sslCertKeyVaultId; + + /** + * Key Vault Secret Name for ILB App Service Environment default SSL + * certificate. + */ + @JsonProperty(value = "properties.sslCertKeyVaultSecretName") + private String sslCertKeyVaultSecretName; + + /** + * Get name of the App Service Environment. + * + * @return the appServiceEnvironmentPatchResourceName value + */ + public String appServiceEnvironmentPatchResourceName() { + return this.appServiceEnvironmentPatchResourceName; + } + + /** + * Set name of the App Service Environment. + * + * @param appServiceEnvironmentPatchResourceName the appServiceEnvironmentPatchResourceName value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withAppServiceEnvironmentPatchResourceName(String appServiceEnvironmentPatchResourceName) { + this.appServiceEnvironmentPatchResourceName = appServiceEnvironmentPatchResourceName; + return this; + } + + /** + * Get location of the App Service Environment, e.g. "West US". + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set location of the App Service Environment, e.g. "West US". + * + * @param location the location value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get provisioning state of the App Service Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get current status of the App Service Environment. Possible values include: 'Preparing', 'Ready', 'Scaling', 'Deleting'. + * + * @return the status value + */ + public HostingEnvironmentStatus status() { + return this.status; + } + + /** + * Get name of the Virtual Network for the App Service Environment. + * + * @return the vnetName value + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set name of the Virtual Network for the App Service Environment. + * + * @param vnetName the vnetName value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get resource group of the Virtual Network. + * + * @return the vnetResourceGroupName value + */ + public String vnetResourceGroupName() { + return this.vnetResourceGroupName; + } + + /** + * Set resource group of the Virtual Network. + * + * @param vnetResourceGroupName the vnetResourceGroupName value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withVnetResourceGroupName(String vnetResourceGroupName) { + this.vnetResourceGroupName = vnetResourceGroupName; + return this; + } + + /** + * Get subnet of the Virtual Network. + * + * @return the vnetSubnetName value + */ + public String vnetSubnetName() { + return this.vnetSubnetName; + } + + /** + * Set subnet of the Virtual Network. + * + * @param vnetSubnetName the vnetSubnetName value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withVnetSubnetName(String vnetSubnetName) { + this.vnetSubnetName = vnetSubnetName; + return this; + } + + /** + * Get description of the Virtual Network. + * + * @return the virtualNetwork value + */ + public VirtualNetworkProfile virtualNetwork() { + return this.virtualNetwork; + } + + /** + * Set description of the Virtual Network. + * + * @param virtualNetwork the virtualNetwork value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withVirtualNetwork(VirtualNetworkProfile virtualNetwork) { + this.virtualNetwork = virtualNetwork; + return this; + } + + /** + * Get specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values include: 'None', 'Web', 'Publishing'. + * + * @return the internalLoadBalancingMode value + */ + public InternalLoadBalancingMode internalLoadBalancingMode() { + return this.internalLoadBalancingMode; + } + + /** + * Set specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values include: 'None', 'Web', 'Publishing'. + * + * @param internalLoadBalancingMode the internalLoadBalancingMode value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withInternalLoadBalancingMode(InternalLoadBalancingMode internalLoadBalancingMode) { + this.internalLoadBalancingMode = internalLoadBalancingMode; + return this; + } + + /** + * Get front-end VM size, e.g. "Medium", "Large". + * + * @return the multiSize value + */ + public String multiSize() { + return this.multiSize; + } + + /** + * Set front-end VM size, e.g. "Medium", "Large". + * + * @param multiSize the multiSize value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withMultiSize(String multiSize) { + this.multiSize = multiSize; + return this; + } + + /** + * Get number of front-end instances. + * + * @return the multiRoleCount value + */ + public Integer multiRoleCount() { + return this.multiRoleCount; + } + + /** + * Set number of front-end instances. + * + * @param multiRoleCount the multiRoleCount value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withMultiRoleCount(Integer multiRoleCount) { + this.multiRoleCount = multiRoleCount; + return this; + } + + /** + * Get description of worker pools with worker size IDs, VM sizes, and number of workers in each pool. + * + * @return the workerPools value + */ + public List workerPools() { + return this.workerPools; + } + + /** + * Set description of worker pools with worker size IDs, VM sizes, and number of workers in each pool. + * + * @param workerPools the workerPools value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withWorkerPools(List workerPools) { + this.workerPools = workerPools; + return this; + } + + /** + * Get number of IP SSL addresses reserved for the App Service Environment. + * + * @return the ipsslAddressCount value + */ + public Integer ipsslAddressCount() { + return this.ipsslAddressCount; + } + + /** + * Set number of IP SSL addresses reserved for the App Service Environment. + * + * @param ipsslAddressCount the ipsslAddressCount value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withIpsslAddressCount(Integer ipsslAddressCount) { + this.ipsslAddressCount = ipsslAddressCount; + return this; + } + + /** + * Get edition of the metadata database for the App Service Environment, e.g. "Standard". + * + * @return the databaseEdition value + */ + public String databaseEdition() { + return this.databaseEdition; + } + + /** + * Get service objective of the metadata database for the App Service Environment, e.g. "S0". + * + * @return the databaseServiceObjective value + */ + public String databaseServiceObjective() { + return this.databaseServiceObjective; + } + + /** + * Get number of upgrade domains of the App Service Environment. + * + * @return the upgradeDomains value + */ + public Integer upgradeDomains() { + return this.upgradeDomains; + } + + /** + * Get subscription of the App Service Environment. + * + * @return the subscriptionId value + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Get dNS suffix of the App Service Environment. + * + * @return the dnsSuffix value + */ + public String dnsSuffix() { + return this.dnsSuffix; + } + + /** + * Set dNS suffix of the App Service Environment. + * + * @param dnsSuffix the dnsSuffix value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withDnsSuffix(String dnsSuffix) { + this.dnsSuffix = dnsSuffix; + return this; + } + + /** + * Get last deployment action on the App Service Environment. + * + * @return the lastAction value + */ + public String lastAction() { + return this.lastAction; + } + + /** + * Get result of the last deployment action on the App Service Environment. + * + * @return the lastActionResult value + */ + public String lastActionResult() { + return this.lastActionResult; + } + + /** + * Get list of comma separated strings describing which VM sizes are allowed for front-ends. + * + * @return the allowedMultiSizes value + */ + public String allowedMultiSizes() { + return this.allowedMultiSizes; + } + + /** + * Get list of comma separated strings describing which VM sizes are allowed for workers. + * + * @return the allowedWorkerSizes value + */ + public String allowedWorkerSizes() { + return this.allowedWorkerSizes; + } + + /** + * Get maximum number of VMs in the App Service Environment. + * + * @return the maximumNumberOfMachines value + */ + public Integer maximumNumberOfMachines() { + return this.maximumNumberOfMachines; + } + + /** + * Get description of IP SSL mapping for the App Service Environment. + * + * @return the vipMappings value + */ + public List vipMappings() { + return this.vipMappings; + } + + /** + * Get current total, used, and available worker capacities. + * + * @return the environmentCapacities value + */ + public List environmentCapacities() { + return this.environmentCapacities; + } + + /** + * Get access control list for controlling traffic to the App Service Environment. + * + * @return the networkAccessControlList value + */ + public List networkAccessControlList() { + return this.networkAccessControlList; + } + + /** + * Set access control list for controlling traffic to the App Service Environment. + * + * @param networkAccessControlList the networkAccessControlList value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withNetworkAccessControlList(List networkAccessControlList) { + this.networkAccessControlList = networkAccessControlList; + return this; + } + + /** + * Get true/false indicating whether the App Service Environment is healthy. + * + * @return the environmentIsHealthy value + */ + public Boolean environmentIsHealthy() { + return this.environmentIsHealthy; + } + + /** + * Get detailed message about with results of the last check of the App Service Environment. + * + * @return the environmentStatus value + */ + public String environmentStatus() { + return this.environmentStatus; + } + + /** + * Get resource group of the App Service Environment. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get scale factor for front-ends. + * + * @return the frontEndScaleFactor value + */ + public Integer frontEndScaleFactor() { + return this.frontEndScaleFactor; + } + + /** + * Set scale factor for front-ends. + * + * @param frontEndScaleFactor the frontEndScaleFactor value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withFrontEndScaleFactor(Integer frontEndScaleFactor) { + this.frontEndScaleFactor = frontEndScaleFactor; + return this; + } + + /** + * Get default Scale Factor for FrontEnds. + * + * @return the defaultFrontEndScaleFactor value + */ + public Integer defaultFrontEndScaleFactor() { + return this.defaultFrontEndScaleFactor; + } + + /** + * Get aPI Management Account associated with the App Service Environment. + * + * @return the apiManagementAccountId value + */ + public String apiManagementAccountId() { + return this.apiManagementAccountId; + } + + /** + * Set aPI Management Account associated with the App Service Environment. + * + * @param apiManagementAccountId the apiManagementAccountId value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withApiManagementAccountId(String apiManagementAccountId) { + this.apiManagementAccountId = apiManagementAccountId; + return this; + } + + /** + * Get <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). + * + * @return the suspended value + */ + public Boolean suspended() { + return this.suspended; + } + + /** + * Set <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). + * + * @param suspended the suspended value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withSuspended(Boolean suspended) { + this.suspended = suspended; + return this; + } + + /** + * Get 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). + * + * @return the dynamicCacheEnabled value + */ + public Boolean dynamicCacheEnabled() { + return this.dynamicCacheEnabled; + } + + /** + * Set 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). + * + * @param dynamicCacheEnabled the dynamicCacheEnabled value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withDynamicCacheEnabled(Boolean dynamicCacheEnabled) { + this.dynamicCacheEnabled = dynamicCacheEnabled; + return this; + } + + /** + * Get custom settings for changing the behavior of the App Service Environment. + * + * @return the clusterSettings value + */ + public List clusterSettings() { + return this.clusterSettings; + } + + /** + * Set custom settings for changing the behavior of the App Service Environment. + * + * @param clusterSettings the clusterSettings value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withClusterSettings(List clusterSettings) { + this.clusterSettings = clusterSettings; + return this; + } + + /** + * Get user added ip ranges to whitelist on ASE db. + * + * @return the userWhitelistedIpRanges value + */ + public List userWhitelistedIpRanges() { + return this.userWhitelistedIpRanges; + } + + /** + * Set user added ip ranges to whitelist on ASE db. + * + * @param userWhitelistedIpRanges the userWhitelistedIpRanges value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withUserWhitelistedIpRanges(List userWhitelistedIpRanges) { + this.userWhitelistedIpRanges = userWhitelistedIpRanges; + return this; + } + + /** + * Get flag that displays whether an ASE has linux workers or not. + * + * @return the hasLinuxWorkers value + */ + public Boolean hasLinuxWorkers() { + return this.hasLinuxWorkers; + } + + /** + * Set flag that displays whether an ASE has linux workers or not. + * + * @param hasLinuxWorkers the hasLinuxWorkers value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withHasLinuxWorkers(Boolean hasLinuxWorkers) { + this.hasLinuxWorkers = hasLinuxWorkers; + return this; + } + + /** + * Get key Vault ID for ILB App Service Environment default SSL certificate. + * + * @return the sslCertKeyVaultId value + */ + public String sslCertKeyVaultId() { + return this.sslCertKeyVaultId; + } + + /** + * Set key Vault ID for ILB App Service Environment default SSL certificate. + * + * @param sslCertKeyVaultId the sslCertKeyVaultId value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withSslCertKeyVaultId(String sslCertKeyVaultId) { + this.sslCertKeyVaultId = sslCertKeyVaultId; + return this; + } + + /** + * Get key Vault Secret Name for ILB App Service Environment default SSL certificate. + * + * @return the sslCertKeyVaultSecretName value + */ + public String sslCertKeyVaultSecretName() { + return this.sslCertKeyVaultSecretName; + } + + /** + * Set key Vault Secret Name for ILB App Service Environment default SSL certificate. + * + * @param sslCertKeyVaultSecretName the sslCertKeyVaultSecretName value to set + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withSslCertKeyVaultSecretName(String sslCertKeyVaultSecretName) { + this.sslCertKeyVaultSecretName = sslCertKeyVaultSecretName; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceEnvironmentResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceEnvironmentResource.java new file mode 100644 index 0000000000000..5269dbb8ddc25 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceEnvironmentResource.java @@ -0,0 +1,778 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.StampCapacityInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.AppServiceEnvironmentResourceInner; + +/** + * Type representing AppServiceEnvironmentResource. + */ +public interface AppServiceEnvironmentResource extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the allowedMultiSizes value. + */ + String allowedMultiSizes(); + + /** + * @return the allowedWorkerSizes value. + */ + String allowedWorkerSizes(); + + /** + * @return the apiManagementAccountId value. + */ + String apiManagementAccountId(); + + /** + * @return the appServiceEnvironmentResourceLocation value. + */ + String appServiceEnvironmentResourceLocation(); + + /** + * @return the appServiceEnvironmentResourceName value. + */ + String appServiceEnvironmentResourceName(); + + /** + * @return the clusterSettings value. + */ + List clusterSettings(); + + /** + * @return the databaseEdition value. + */ + String databaseEdition(); + + /** + * @return the databaseServiceObjective value. + */ + String databaseServiceObjective(); + + /** + * @return the defaultFrontEndScaleFactor value. + */ + Integer defaultFrontEndScaleFactor(); + + /** + * @return the dnsSuffix value. + */ + String dnsSuffix(); + + /** + * @return the dynamicCacheEnabled value. + */ + Boolean dynamicCacheEnabled(); + + /** + * @return the environmentCapacities value. + */ + List environmentCapacities(); + + /** + * @return the environmentIsHealthy value. + */ + Boolean environmentIsHealthy(); + + /** + * @return the environmentStatus value. + */ + String environmentStatus(); + + /** + * @return the frontEndScaleFactor value. + */ + Integer frontEndScaleFactor(); + + /** + * @return the hasLinuxWorkers value. + */ + Boolean hasLinuxWorkers(); + + /** + * @return the internalLoadBalancingMode value. + */ + InternalLoadBalancingMode internalLoadBalancingMode(); + + /** + * @return the ipsslAddressCount value. + */ + Integer ipsslAddressCount(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the lastAction value. + */ + String lastAction(); + + /** + * @return the lastActionResult value. + */ + String lastActionResult(); + + /** + * @return the maximumNumberOfMachines value. + */ + Integer maximumNumberOfMachines(); + + /** + * @return the multiRoleCount value. + */ + Integer multiRoleCount(); + + /** + * @return the multiSize value. + */ + String multiSize(); + + /** + * @return the networkAccessControlList value. + */ + List networkAccessControlList(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the resourceGroup value. + */ + String resourceGroup(); + + /** + * @return the sslCertKeyVaultId value. + */ + String sslCertKeyVaultId(); + + /** + * @return the sslCertKeyVaultSecretName value. + */ + String sslCertKeyVaultSecretName(); + + /** + * @return the status value. + */ + HostingEnvironmentStatus status(); + + /** + * @return the subscriptionId value. + */ + String subscriptionId(); + + /** + * @return the suspended value. + */ + Boolean suspended(); + + /** + * @return the upgradeDomains value. + */ + Integer upgradeDomains(); + + /** + * @return the userWhitelistedIpRanges value. + */ + List userWhitelistedIpRanges(); + + /** + * @return the vipMappings value. + */ + List vipMappings(); + + /** + * @return the virtualNetwork value. + */ + VirtualNetworkProfile virtualNetwork(); + + /** + * @return the vnetName value. + */ + String vnetName(); + + /** + * @return the vnetResourceGroupName value. + */ + String vnetResourceGroupName(); + + /** + * @return the vnetSubnetName value. + */ + String vnetSubnetName(); + + /** + * @return the workerPools value. + */ + List workerPools(); + + /** + * The entirety of the AppServiceEnvironmentResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithAppServiceEnvironmentResourceLocation, DefinitionStages.WithAppServiceEnvironmentResourceName, DefinitionStages.WithVirtualNetwork, DefinitionStages.WithWorkerPools, DefinitionStages.WithCreate { + } + + /** + * Grouping of AppServiceEnvironmentResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a AppServiceEnvironmentResource definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the AppServiceEnvironmentResource definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify AppServiceEnvironmentResourceLocation. + */ + interface WithAppServiceEnvironmentResourceLocation { + /** + * Specifies appServiceEnvironmentResourceLocation. + * @param appServiceEnvironmentResourceLocation Location of the App Service Environment, e.g. "West US" + * @return the next definition stage +*/ + WithAppServiceEnvironmentResourceName withAppServiceEnvironmentResourceLocation(String appServiceEnvironmentResourceLocation); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify AppServiceEnvironmentResourceName. + */ + interface WithAppServiceEnvironmentResourceName { + /** + * Specifies appServiceEnvironmentResourceName. + * @param appServiceEnvironmentResourceName Name of the App Service Environment + * @return the next definition stage +*/ + WithVirtualNetwork withAppServiceEnvironmentResourceName(String appServiceEnvironmentResourceName); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify VirtualNetwork. + */ + interface WithVirtualNetwork { + /** + * Specifies virtualNetwork. + * @param virtualNetwork Description of the Virtual Network + * @return the next definition stage +*/ + WithWorkerPools withVirtualNetwork(VirtualNetworkProfile virtualNetwork); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify WorkerPools. + */ + interface WithWorkerPools { + /** + * Specifies workerPools. + * @param workerPools Description of worker pools with worker size IDs, VM sizes, and number of workers in each pool + * @return the next definition stage +*/ + WithCreate withWorkerPools(List workerPools); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify ApiManagementAccountId. + */ + interface WithApiManagementAccountId { + /** + * Specifies apiManagementAccountId. + * @param apiManagementAccountId API Management Account associated with the App Service Environment + * @return the next definition stage + */ + WithCreate withApiManagementAccountId(String apiManagementAccountId); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify ClusterSettings. + */ + interface WithClusterSettings { + /** + * Specifies clusterSettings. + * @param clusterSettings Custom settings for changing the behavior of the App Service Environment + * @return the next definition stage + */ + WithCreate withClusterSettings(List clusterSettings); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify DnsSuffix. + */ + interface WithDnsSuffix { + /** + * Specifies dnsSuffix. + * @param dnsSuffix DNS suffix of the App Service Environment + * @return the next definition stage + */ + WithCreate withDnsSuffix(String dnsSuffix); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify DynamicCacheEnabled. + */ + interface WithDynamicCacheEnabled { + /** + * Specifies dynamicCacheEnabled. + * @param dynamicCacheEnabled 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) + * @return the next definition stage + */ + WithCreate withDynamicCacheEnabled(Boolean dynamicCacheEnabled); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify FrontEndScaleFactor. + */ + interface WithFrontEndScaleFactor { + /** + * Specifies frontEndScaleFactor. + * @param frontEndScaleFactor Scale factor for front-ends + * @return the next definition stage + */ + WithCreate withFrontEndScaleFactor(Integer frontEndScaleFactor); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify HasLinuxWorkers. + */ + interface WithHasLinuxWorkers { + /** + * Specifies hasLinuxWorkers. + * @param hasLinuxWorkers Flag that displays whether an ASE has linux workers or not + * @return the next definition stage + */ + WithCreate withHasLinuxWorkers(Boolean hasLinuxWorkers); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify InternalLoadBalancingMode. + */ + interface WithInternalLoadBalancingMode { + /** + * Specifies internalLoadBalancingMode. + * @param internalLoadBalancingMode Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values include: 'None', 'Web', 'Publishing' + * @return the next definition stage + */ + WithCreate withInternalLoadBalancingMode(InternalLoadBalancingMode internalLoadBalancingMode); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify IpsslAddressCount. + */ + interface WithIpsslAddressCount { + /** + * Specifies ipsslAddressCount. + * @param ipsslAddressCount Number of IP SSL addresses reserved for the App Service Environment + * @return the next definition stage + */ + WithCreate withIpsslAddressCount(Integer ipsslAddressCount); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify MultiRoleCount. + */ + interface WithMultiRoleCount { + /** + * Specifies multiRoleCount. + * @param multiRoleCount Number of front-end instances + * @return the next definition stage + */ + WithCreate withMultiRoleCount(Integer multiRoleCount); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify MultiSize. + */ + interface WithMultiSize { + /** + * Specifies multiSize. + * @param multiSize Front-end VM size, e.g. "Medium", "Large" + * @return the next definition stage + */ + WithCreate withMultiSize(String multiSize); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify NetworkAccessControlList. + */ + interface WithNetworkAccessControlList { + /** + * Specifies networkAccessControlList. + * @param networkAccessControlList Access control list for controlling traffic to the App Service Environment + * @return the next definition stage + */ + WithCreate withNetworkAccessControlList(List networkAccessControlList); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify SslCertKeyVaultId. + */ + interface WithSslCertKeyVaultId { + /** + * Specifies sslCertKeyVaultId. + * @param sslCertKeyVaultId Key Vault ID for ILB App Service Environment default SSL certificate + * @return the next definition stage + */ + WithCreate withSslCertKeyVaultId(String sslCertKeyVaultId); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify SslCertKeyVaultSecretName. + */ + interface WithSslCertKeyVaultSecretName { + /** + * Specifies sslCertKeyVaultSecretName. + * @param sslCertKeyVaultSecretName Key Vault Secret Name for ILB App Service Environment default SSL certificate + * @return the next definition stage + */ + WithCreate withSslCertKeyVaultSecretName(String sslCertKeyVaultSecretName); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify Suspended. + */ + interface WithSuspended { + /** + * Specifies suspended. + * @param suspended <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) + * @return the next definition stage + */ + WithCreate withSuspended(Boolean suspended); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify UserWhitelistedIpRanges. + */ + interface WithUserWhitelistedIpRanges { + /** + * Specifies userWhitelistedIpRanges. + * @param userWhitelistedIpRanges User added ip ranges to whitelist on ASE db + * @return the next definition stage + */ + WithCreate withUserWhitelistedIpRanges(List userWhitelistedIpRanges); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify VnetName. + */ + interface WithVnetName { + /** + * Specifies vnetName. + * @param vnetName Name of the Virtual Network for the App Service Environment + * @return the next definition stage + */ + WithCreate withVnetName(String vnetName); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify VnetResourceGroupName. + */ + interface WithVnetResourceGroupName { + /** + * Specifies vnetResourceGroupName. + * @param vnetResourceGroupName Resource group of the Virtual Network + * @return the next definition stage + */ + WithCreate withVnetResourceGroupName(String vnetResourceGroupName); + } + + /** + * The stage of the appserviceenvironmentresource definition allowing to specify VnetSubnetName. + */ + interface WithVnetSubnetName { + /** + * Specifies vnetSubnetName. + * @param vnetSubnetName Subnet of the Virtual Network + * @return the next definition stage + */ + WithCreate withVnetSubnetName(String vnetSubnetName); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithApiManagementAccountId, DefinitionStages.WithClusterSettings, DefinitionStages.WithDnsSuffix, DefinitionStages.WithDynamicCacheEnabled, DefinitionStages.WithFrontEndScaleFactor, DefinitionStages.WithHasLinuxWorkers, DefinitionStages.WithInternalLoadBalancingMode, DefinitionStages.WithIpsslAddressCount, DefinitionStages.WithKind, DefinitionStages.WithMultiRoleCount, DefinitionStages.WithMultiSize, DefinitionStages.WithNetworkAccessControlList, DefinitionStages.WithSslCertKeyVaultId, DefinitionStages.WithSslCertKeyVaultSecretName, DefinitionStages.WithSuspended, DefinitionStages.WithUserWhitelistedIpRanges, DefinitionStages.WithVnetName, DefinitionStages.WithVnetResourceGroupName, DefinitionStages.WithVnetSubnetName { + } + } + /** + * The template for a AppServiceEnvironmentResource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithApiManagementAccountId, UpdateStages.WithClusterSettings, UpdateStages.WithDnsSuffix, UpdateStages.WithDynamicCacheEnabled, UpdateStages.WithFrontEndScaleFactor, UpdateStages.WithHasLinuxWorkers, UpdateStages.WithInternalLoadBalancingMode, UpdateStages.WithIpsslAddressCount, UpdateStages.WithKind, UpdateStages.WithMultiRoleCount, UpdateStages.WithMultiSize, UpdateStages.WithNetworkAccessControlList, UpdateStages.WithSslCertKeyVaultId, UpdateStages.WithSslCertKeyVaultSecretName, UpdateStages.WithSuspended, UpdateStages.WithUserWhitelistedIpRanges, UpdateStages.WithVnetName, UpdateStages.WithVnetResourceGroupName, UpdateStages.WithVnetSubnetName { + } + + /** + * Grouping of AppServiceEnvironmentResource update stages. + */ + interface UpdateStages { + /** + * The stage of the appserviceenvironmentresource update allowing to specify ApiManagementAccountId. + */ + interface WithApiManagementAccountId { + /** + * Specifies apiManagementAccountId. + * @param apiManagementAccountId API Management Account associated with the App Service Environment + * @return the next update stage + */ + Update withApiManagementAccountId(String apiManagementAccountId); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify ClusterSettings. + */ + interface WithClusterSettings { + /** + * Specifies clusterSettings. + * @param clusterSettings Custom settings for changing the behavior of the App Service Environment + * @return the next update stage + */ + Update withClusterSettings(List clusterSettings); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify DnsSuffix. + */ + interface WithDnsSuffix { + /** + * Specifies dnsSuffix. + * @param dnsSuffix DNS suffix of the App Service Environment + * @return the next update stage + */ + Update withDnsSuffix(String dnsSuffix); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify DynamicCacheEnabled. + */ + interface WithDynamicCacheEnabled { + /** + * Specifies dynamicCacheEnabled. + * @param dynamicCacheEnabled 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) + * @return the next update stage + */ + Update withDynamicCacheEnabled(Boolean dynamicCacheEnabled); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify FrontEndScaleFactor. + */ + interface WithFrontEndScaleFactor { + /** + * Specifies frontEndScaleFactor. + * @param frontEndScaleFactor Scale factor for front-ends + * @return the next update stage + */ + Update withFrontEndScaleFactor(Integer frontEndScaleFactor); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify HasLinuxWorkers. + */ + interface WithHasLinuxWorkers { + /** + * Specifies hasLinuxWorkers. + * @param hasLinuxWorkers Flag that displays whether an ASE has linux workers or not + * @return the next update stage + */ + Update withHasLinuxWorkers(Boolean hasLinuxWorkers); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify InternalLoadBalancingMode. + */ + interface WithInternalLoadBalancingMode { + /** + * Specifies internalLoadBalancingMode. + * @param internalLoadBalancingMode Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values include: 'None', 'Web', 'Publishing' + * @return the next update stage + */ + Update withInternalLoadBalancingMode(InternalLoadBalancingMode internalLoadBalancingMode); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify IpsslAddressCount. + */ + interface WithIpsslAddressCount { + /** + * Specifies ipsslAddressCount. + * @param ipsslAddressCount Number of IP SSL addresses reserved for the App Service Environment + * @return the next update stage + */ + Update withIpsslAddressCount(Integer ipsslAddressCount); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify MultiRoleCount. + */ + interface WithMultiRoleCount { + /** + * Specifies multiRoleCount. + * @param multiRoleCount Number of front-end instances + * @return the next update stage + */ + Update withMultiRoleCount(Integer multiRoleCount); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify MultiSize. + */ + interface WithMultiSize { + /** + * Specifies multiSize. + * @param multiSize Front-end VM size, e.g. "Medium", "Large" + * @return the next update stage + */ + Update withMultiSize(String multiSize); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify NetworkAccessControlList. + */ + interface WithNetworkAccessControlList { + /** + * Specifies networkAccessControlList. + * @param networkAccessControlList Access control list for controlling traffic to the App Service Environment + * @return the next update stage + */ + Update withNetworkAccessControlList(List networkAccessControlList); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify SslCertKeyVaultId. + */ + interface WithSslCertKeyVaultId { + /** + * Specifies sslCertKeyVaultId. + * @param sslCertKeyVaultId Key Vault ID for ILB App Service Environment default SSL certificate + * @return the next update stage + */ + Update withSslCertKeyVaultId(String sslCertKeyVaultId); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify SslCertKeyVaultSecretName. + */ + interface WithSslCertKeyVaultSecretName { + /** + * Specifies sslCertKeyVaultSecretName. + * @param sslCertKeyVaultSecretName Key Vault Secret Name for ILB App Service Environment default SSL certificate + * @return the next update stage + */ + Update withSslCertKeyVaultSecretName(String sslCertKeyVaultSecretName); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify Suspended. + */ + interface WithSuspended { + /** + * Specifies suspended. + * @param suspended <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) + * @return the next update stage + */ + Update withSuspended(Boolean suspended); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify UserWhitelistedIpRanges. + */ + interface WithUserWhitelistedIpRanges { + /** + * Specifies userWhitelistedIpRanges. + * @param userWhitelistedIpRanges User added ip ranges to whitelist on ASE db + * @return the next update stage + */ + Update withUserWhitelistedIpRanges(List userWhitelistedIpRanges); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify VnetName. + */ + interface WithVnetName { + /** + * Specifies vnetName. + * @param vnetName Name of the Virtual Network for the App Service Environment + * @return the next update stage + */ + Update withVnetName(String vnetName); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify VnetResourceGroupName. + */ + interface WithVnetResourceGroupName { + /** + * Specifies vnetResourceGroupName. + * @param vnetResourceGroupName Resource group of the Virtual Network + * @return the next update stage + */ + Update withVnetResourceGroupName(String vnetResourceGroupName); + } + + /** + * The stage of the appserviceenvironmentresource update allowing to specify VnetSubnetName. + */ + interface WithVnetSubnetName { + /** + * Specifies vnetSubnetName. + * @param vnetSubnetName Subnet of the Virtual Network + * @return the next update stage + */ + Update withVnetSubnetName(String vnetSubnetName); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceEnvironments.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceEnvironments.java new file mode 100644 index 0000000000000..7e61244594970 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServiceEnvironments.java @@ -0,0 +1,403 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceEnvironmentResource; +import rx.Completable; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentDiagnostics; +import com.microsoft.azure.management.appservice.v2019_08_01.InboundEnvironmentEndpoint; +import com.microsoft.azure.management.appservice.v2019_08_01.MultiRolePools; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.WorkerPoolResourceInner; +import com.microsoft.azure.management.appservice.v2019_08_01.ResourceMetricDefinition; +import com.microsoft.azure.management.appservice.v2019_08_01.Operation; +import com.microsoft.azure.management.appservice.v2019_08_01.OutboundEnvironmentEndpoint; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentAppServicePlan; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentSite; +import com.microsoft.azure.management.appservice.v2019_08_01.WorkerPools; + +/** + * Type representing AppServiceEnvironments. + */ +public interface AppServiceEnvironments { + /** + * Begins definition for a new HostingEnvironment resource. + * @param name resource name. + * @return the first stage of the new HostingEnvironment definition. + */ + AppServiceEnvironmentResource.DefinitionStages.Blank defineHostingEnvironment(String name); + + /** + * Begins definition for a new WorkerPool resource. + * @param name resource name. + * @return the first stage of the new WorkerPool definition. + */ + WorkerPools.DefinitionStages.Blank defineWorkerPool(String name); + + /** + * Get the properties of an App Service Environment. + * Description for Get the properties of an App Service Environment. + * + * @param resourceGroupName resource group name + * @param name resource name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getByResourceGroupAsync(String resourceGroupName, String name); + + /** + * Get all App Service Environments in a resource group. + * Description for Get all App Service Environments in a resource group. + * + * @param resourceGroupName resource group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByResourceGroupAsync(String resourceGroupName); + + /** + * Get all App Service Environments for a subscription. + * Description for Get all App Service Environments for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Delete an App Service Environment. + * Description for Delete an App Service Environment. + * + * @param resourceGroupName resource group name + * @param name resource name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String name); + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable changeVnetAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo); + + /** + * Reboot all machines in an App Service Environment. + * Description for 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 observable for the request + */ + Completable rebootAsync(String resourceGroupName, String name); + + /** + * Resume an App Service Environment. + * Description for 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 for the request + */ + Observable resumeAsync(final String resourceGroupName, final String name); + + /** + * Suspend an App Service Environment. + * Description for 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 for the request + */ + Observable suspendAsync(final String resourceGroupName, final String name); + + /** + * Get the used, available, and total worker capacity an App Service Environment. + * Description for 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 for the request + */ + Observable listCapacitiesAsync(final String resourceGroupName, final String name); + + /** + * Get IP addresses assigned to an App Service Environment. + * Description for 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 for the request + */ + Observable getVipInfoAsync(String resourceGroupName, String name); + + /** + * Get a diagnostics item for an App Service Environment. + * Description for 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 for the request + */ + Observable getDiagnosticsItemAsync(String resourceGroupName, String name, String diagnosticsName); + + /** + * Get diagnostic information for an App Service Environment. + * Description for 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 for the request + */ + Observable listDiagnosticsAsync(String resourceGroupName, String name); + + /** + * Get the network endpoints of all inbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all inbound dependencies 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 for the request + */ + Observable getInboundNetworkDependenciesEndpointsAsync(final String resourceGroupName, final String name); + + /** + * Get all multi-role pools. + * Description for 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 for the request + */ + Observable listMultiRolePoolsAsync(final String resourceGroupName, final String name); + + /** + * Get properties of a multi-role pool. + * Description for 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 for the request + */ + Observable getMultiRolePoolAsync(String resourceGroupName, String name); + + /** + * Create or update a multi-role pool. + * Description for 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 + */ + Observable createOrUpdateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope); + + /** + * Create or update a multi-role pool. + * Description for 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 + */ + Observable updateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope); + + /** + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * Description for 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 for the request + */ + Observable listMultiRolePoolInstanceMetricDefinitionsAsync(final String resourceGroupName, final String name, final String instance); + + /** + * Get metric definitions for a multi-role pool of an App Service Environment. + * Description for 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 for the request + */ + Observable listMultiRoleMetricDefinitionsAsync(final String resourceGroupName, final String name); + + /** + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * Description for 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 for the request + */ + Observable listWorkerPoolInstanceMetricDefinitionsAsync(final String resourceGroupName, final String name, final String workerPoolName, final String instance); + + /** + * Get metric definitions for a worker pool of an App Service Environment. + * Description for 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 for the request + */ + Observable listWebWorkerMetricDefinitionsAsync(final String resourceGroupName, final String name, final String workerPoolName); + + /** + * Get available SKUs for scaling a multi-role pool. + * Description for 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 for the request + */ + Observable listMultiRolePoolSkusAsync(final String resourceGroupName, final String name); + + /** + * Get available SKUs for scaling a worker pool. + * Description for 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 for the request + */ + Observable listWorkerPoolSkusAsync(final String resourceGroupName, final String name, final String workerPoolName); + + /** + * Get usage metrics for a multi-role pool of an App Service Environment. + * Description for 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 for the request + */ + Observable listMultiRoleUsagesAsync(final String resourceGroupName, final String name); + + /** + * Get global usage metrics of an App Service Environment. + * Description for 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 for the request + */ + Observable listUsagesAsync(final String resourceGroupName, final String name); + + /** + * Get usage metrics for a worker pool of an App Service Environment. + * Description for 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 for the request + */ + Observable listWebWorkerUsagesAsync(final String resourceGroupName, final String name, final String workerPoolName); + + /** + * List all currently running operations on the App Service Environment. + * Description for 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 for the request + */ + Observable listOperationsAsync(String resourceGroupName, String name); + + /** + * Get the network endpoints of all outbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all outbound dependencies 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 for the request + */ + Observable getOutboundNetworkDependenciesEndpointsAsync(final String resourceGroupName, final String name); + + /** + * Get all App Service plans in an App Service Environment. + * Description for 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 for the request + */ + Observable listAppServicePlansAsync(final String resourceGroupName, final String name); + + /** + * Get all apps in an App Service Environment. + * Description for 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 for the request + */ + Observable listWebAppsAsync(final String resourceGroupName, final String name); + + /** + * Get properties of a worker pool. + * Description for 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 for the request + */ + Observable getWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName); + + /** + * Get all worker pools of an App Service Environment. + * Description for 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 for the request + */ + Observable listWorkerPoolsAsync(final String resourceGroupName, final String name); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServicePlan.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServicePlan.java new file mode 100644 index 0000000000000..be77cbe298466 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServicePlan.java @@ -0,0 +1,500 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.AppServicePlanInner; + +/** + * Type representing AppServicePlan. + */ +public interface AppServicePlan extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the freeOfferExpirationTime value. + */ + DateTime freeOfferExpirationTime(); + + /** + * @return the geoRegion value. + */ + String geoRegion(); + + /** + * @return the hostingEnvironmentProfile value. + */ + HostingEnvironmentProfile hostingEnvironmentProfile(); + + /** + * @return the hyperV value. + */ + Boolean hyperV(); + + /** + * @return the isSpot value. + */ + Boolean isSpot(); + + /** + * @return the isXenon value. + */ + Boolean isXenon(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the maximumElasticWorkerCount value. + */ + Integer maximumElasticWorkerCount(); + + /** + * @return the maximumNumberOfWorkers value. + */ + Integer maximumNumberOfWorkers(); + + /** + * @return the numberOfSites value. + */ + Integer numberOfSites(); + + /** + * @return the perSiteScaling value. + */ + Boolean perSiteScaling(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the reserved value. + */ + Boolean reserved(); + + /** + * @return the resourceGroup value. + */ + String resourceGroup(); + + /** + * @return the sku value. + */ + SkuDescription sku(); + + /** + * @return the spotExpirationTime value. + */ + DateTime spotExpirationTime(); + + /** + * @return the status value. + */ + StatusOptions status(); + + /** + * @return the subscription value. + */ + String subscription(); + + /** + * @return the targetWorkerCount value. + */ + Integer targetWorkerCount(); + + /** + * @return the targetWorkerSizeId value. + */ + Integer targetWorkerSizeId(); + + /** + * @return the workerTierName value. + */ + String workerTierName(); + + /** + * The entirety of the AppServicePlan definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of AppServicePlan definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a AppServicePlan definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the AppServicePlan definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the appserviceplan definition allowing to specify FreeOfferExpirationTime. + */ + interface WithFreeOfferExpirationTime { + /** + * Specifies freeOfferExpirationTime. + * @param freeOfferExpirationTime The time when the server farm free offer expires + * @return the next definition stage + */ + WithCreate withFreeOfferExpirationTime(DateTime freeOfferExpirationTime); + } + + /** + * The stage of the appserviceplan definition allowing to specify HostingEnvironmentProfile. + */ + interface WithHostingEnvironmentProfile { + /** + * Specifies hostingEnvironmentProfile. + * @param hostingEnvironmentProfile Specification for the App Service Environment to use for the App Service plan + * @return the next definition stage + */ + WithCreate withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile); + } + + /** + * The stage of the appserviceplan definition allowing to specify HyperV. + */ + interface WithHyperV { + /** + * Specifies hyperV. + * @param hyperV If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise + * @return the next definition stage + */ + WithCreate withHyperV(Boolean hyperV); + } + + /** + * The stage of the appserviceplan definition allowing to specify IsSpot. + */ + interface WithIsSpot { + /** + * Specifies isSpot. + * @param isSpot If <code>true</code>, this App Service Plan owns spot instances + * @return the next definition stage + */ + WithCreate withIsSpot(Boolean isSpot); + } + + /** + * The stage of the appserviceplan definition allowing to specify IsXenon. + */ + interface WithIsXenon { + /** + * Specifies isXenon. + * @param isXenon Obsolete: If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise + * @return the next definition stage + */ + WithCreate withIsXenon(Boolean isXenon); + } + + /** + * The stage of the appserviceplan definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the appserviceplan definition allowing to specify MaximumElasticWorkerCount. + */ + interface WithMaximumElasticWorkerCount { + /** + * Specifies maximumElasticWorkerCount. + * @param maximumElasticWorkerCount Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan + * @return the next definition stage + */ + WithCreate withMaximumElasticWorkerCount(Integer maximumElasticWorkerCount); + } + + /** + * The stage of the appserviceplan definition allowing to specify PerSiteScaling. + */ + interface WithPerSiteScaling { + /** + * Specifies perSiteScaling. + * @param perSiteScaling 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 + * @return the next definition stage + */ + WithCreate withPerSiteScaling(Boolean perSiteScaling); + } + + /** + * The stage of the appserviceplan definition allowing to specify Reserved. + */ + interface WithReserved { + /** + * Specifies reserved. + * @param reserved If Linux app service plan <code>true</code>, <code>false</code> otherwise + * @return the next definition stage + */ + WithCreate withReserved(Boolean reserved); + } + + /** + * The stage of the appserviceplan definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku the sku parameter value + * @return the next definition stage + */ + WithCreate withSku(SkuDescription sku); + } + + /** + * The stage of the appserviceplan definition allowing to specify SpotExpirationTime. + */ + interface WithSpotExpirationTime { + /** + * Specifies spotExpirationTime. + * @param spotExpirationTime The time when the server farm expires. Valid only if it is a spot server farm + * @return the next definition stage + */ + WithCreate withSpotExpirationTime(DateTime spotExpirationTime); + } + + /** + * The stage of the appserviceplan definition allowing to specify TargetWorkerCount. + */ + interface WithTargetWorkerCount { + /** + * Specifies targetWorkerCount. + * @param targetWorkerCount Scaling worker count + * @return the next definition stage + */ + WithCreate withTargetWorkerCount(Integer targetWorkerCount); + } + + /** + * The stage of the appserviceplan definition allowing to specify TargetWorkerSizeId. + */ + interface WithTargetWorkerSizeId { + /** + * Specifies targetWorkerSizeId. + * @param targetWorkerSizeId Scaling worker size ID + * @return the next definition stage + */ + WithCreate withTargetWorkerSizeId(Integer targetWorkerSizeId); + } + + /** + * The stage of the appserviceplan definition allowing to specify WorkerTierName. + */ + interface WithWorkerTierName { + /** + * Specifies workerTierName. + * @param workerTierName Target worker tier assigned to the App Service plan + * @return the next definition stage + */ + WithCreate withWorkerTierName(String workerTierName); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithFreeOfferExpirationTime, DefinitionStages.WithHostingEnvironmentProfile, DefinitionStages.WithHyperV, DefinitionStages.WithIsSpot, DefinitionStages.WithIsXenon, DefinitionStages.WithKind, DefinitionStages.WithMaximumElasticWorkerCount, DefinitionStages.WithPerSiteScaling, DefinitionStages.WithReserved, DefinitionStages.WithSku, DefinitionStages.WithSpotExpirationTime, DefinitionStages.WithTargetWorkerCount, DefinitionStages.WithTargetWorkerSizeId, DefinitionStages.WithWorkerTierName { + } + } + /** + * The template for a AppServicePlan update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithFreeOfferExpirationTime, UpdateStages.WithHostingEnvironmentProfile, UpdateStages.WithHyperV, UpdateStages.WithIsSpot, UpdateStages.WithIsXenon, UpdateStages.WithKind, UpdateStages.WithMaximumElasticWorkerCount, UpdateStages.WithPerSiteScaling, UpdateStages.WithReserved, UpdateStages.WithSpotExpirationTime, UpdateStages.WithTargetWorkerCount, UpdateStages.WithTargetWorkerSizeId, UpdateStages.WithWorkerTierName { + } + + /** + * Grouping of AppServicePlan update stages. + */ + interface UpdateStages { + /** + * The stage of the appserviceplan update allowing to specify FreeOfferExpirationTime. + */ + interface WithFreeOfferExpirationTime { + /** + * Specifies freeOfferExpirationTime. + * @param freeOfferExpirationTime The time when the server farm free offer expires + * @return the next update stage + */ + Update withFreeOfferExpirationTime(DateTime freeOfferExpirationTime); + } + + /** + * The stage of the appserviceplan update allowing to specify HostingEnvironmentProfile. + */ + interface WithHostingEnvironmentProfile { + /** + * Specifies hostingEnvironmentProfile. + * @param hostingEnvironmentProfile Specification for the App Service Environment to use for the App Service plan + * @return the next update stage + */ + Update withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile); + } + + /** + * The stage of the appserviceplan update allowing to specify HyperV. + */ + interface WithHyperV { + /** + * Specifies hyperV. + * @param hyperV If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise + * @return the next update stage + */ + Update withHyperV(Boolean hyperV); + } + + /** + * The stage of the appserviceplan update allowing to specify IsSpot. + */ + interface WithIsSpot { + /** + * Specifies isSpot. + * @param isSpot If <code>true</code>, this App Service Plan owns spot instances + * @return the next update stage + */ + Update withIsSpot(Boolean isSpot); + } + + /** + * The stage of the appserviceplan update allowing to specify IsXenon. + */ + interface WithIsXenon { + /** + * Specifies isXenon. + * @param isXenon Obsolete: If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise + * @return the next update stage + */ + Update withIsXenon(Boolean isXenon); + } + + /** + * The stage of the appserviceplan update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the appserviceplan update allowing to specify MaximumElasticWorkerCount. + */ + interface WithMaximumElasticWorkerCount { + /** + * Specifies maximumElasticWorkerCount. + * @param maximumElasticWorkerCount Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan + * @return the next update stage + */ + Update withMaximumElasticWorkerCount(Integer maximumElasticWorkerCount); + } + + /** + * The stage of the appserviceplan update allowing to specify PerSiteScaling. + */ + interface WithPerSiteScaling { + /** + * Specifies perSiteScaling. + * @param perSiteScaling 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 + * @return the next update stage + */ + Update withPerSiteScaling(Boolean perSiteScaling); + } + + /** + * The stage of the appserviceplan update allowing to specify Reserved. + */ + interface WithReserved { + /** + * Specifies reserved. + * @param reserved This needs to set to <code>true</code> when creating a Linux App Service Plan, along with <code>kind</code> set to <code>Linux</code>. It should be <code>false</code> otherwise + * @return the next update stage + */ + Update withReserved(Boolean reserved); + } + + /** + * The stage of the appserviceplan update allowing to specify SpotExpirationTime. + */ + interface WithSpotExpirationTime { + /** + * Specifies spotExpirationTime. + * @param spotExpirationTime The time when the server farm expires. Valid only if it is a spot server farm + * @return the next update stage + */ + Update withSpotExpirationTime(DateTime spotExpirationTime); + } + + /** + * The stage of the appserviceplan update allowing to specify TargetWorkerCount. + */ + interface WithTargetWorkerCount { + /** + * Specifies targetWorkerCount. + * @param targetWorkerCount Scaling worker count + * @return the next update stage + */ + Update withTargetWorkerCount(Integer targetWorkerCount); + } + + /** + * The stage of the appserviceplan update allowing to specify TargetWorkerSizeId. + */ + interface WithTargetWorkerSizeId { + /** + * Specifies targetWorkerSizeId. + * @param targetWorkerSizeId Scaling worker size ID + * @return the next update stage + */ + Update withTargetWorkerSizeId(Integer targetWorkerSizeId); + } + + /** + * The stage of the appserviceplan update allowing to specify WorkerTierName. + */ + interface WithWorkerTierName { + /** + * Specifies workerTierName. + * @param workerTierName Target worker tier assigned to the App Service plan + * @return the next update stage + */ + Update withWorkerTierName(String workerTierName); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServicePlanPatchResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServicePlanPatchResource.java new file mode 100644 index 0000000000000..5ef2372984612 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServicePlanPatchResource.java @@ -0,0 +1,454 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * ARM resource for a app service plan. + */ +@JsonFlatten +public class AppServicePlanPatchResource extends ProxyOnlyResource { + /** + * 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; + + /** + * 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; + + /** + * Maximum number of total workers allowed for this ElasticScaleEnabled App + * Service Plan. + */ + @JsonProperty(value = "properties.maximumElasticWorkerCount") + private Integer maximumElasticWorkerCount; + + /** + * 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; + + /** + * The time when the server farm free offer expires. + */ + @JsonProperty(value = "properties.freeOfferExpirationTime") + private DateTime freeOfferExpirationTime; + + /** + * Resource group of the App Service plan. + */ + @JsonProperty(value = "properties.resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGroup; + + /** + * This needs to set to <code>true</code> when creating a Linux + * App Service Plan, along with <code>kind</code> set to + * <code>Linux</code>. It should be + * <code>false</code> otherwise. + */ + @JsonProperty(value = "properties.reserved") + private Boolean reserved; + + /** + * Obsolete: If Hyper-V container app service plan + * <code>true</code>, <code>false</code> otherwise. + */ + @JsonProperty(value = "properties.isXenon") + private Boolean isXenon; + + /** + * If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + */ + @JsonProperty(value = "properties.hyperV") + private Boolean hyperV; + + /** + * 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 target worker tier assigned to the App Service plan. + * + * @return the workerTierName value + */ + public String workerTierName() { + return this.workerTierName; + } + + /** + * Set target worker tier assigned to the App Service plan. + * + * @param workerTierName the workerTierName value to set + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withWorkerTierName(String workerTierName) { + this.workerTierName = workerTierName; + return this; + } + + /** + * Get app Service plan status. Possible values include: 'Ready', 'Pending', 'Creating'. + * + * @return the status value + */ + public StatusOptions status() { + return this.status; + } + + /** + * Get app Service plan subscription. + * + * @return the subscription value + */ + public String subscription() { + return this.subscription; + } + + /** + * Get specification for the App Service Environment to use for the App Service plan. + * + * @return the hostingEnvironmentProfile value + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Set specification for the App Service Environment to use for the App Service plan. + * + * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + this.hostingEnvironmentProfile = hostingEnvironmentProfile; + return this; + } + + /** + * Get maximum number of instances that can be assigned to this App Service plan. + * + * @return the maximumNumberOfWorkers value + */ + public Integer maximumNumberOfWorkers() { + return this.maximumNumberOfWorkers; + } + + /** + * Get geographical location for the App Service plan. + * + * @return the geoRegion value + */ + public String geoRegion() { + return this.geoRegion; + } + + /** + * Get 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. + * + * @return the perSiteScaling value + */ + public Boolean perSiteScaling() { + return this.perSiteScaling; + } + + /** + * Set 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. + * + * @param perSiteScaling the perSiteScaling value to set + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withPerSiteScaling(Boolean perSiteScaling) { + this.perSiteScaling = perSiteScaling; + return this; + } + + /** + * Get maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan. + * + * @return the maximumElasticWorkerCount value + */ + public Integer maximumElasticWorkerCount() { + return this.maximumElasticWorkerCount; + } + + /** + * Set maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan. + * + * @param maximumElasticWorkerCount the maximumElasticWorkerCount value to set + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withMaximumElasticWorkerCount(Integer maximumElasticWorkerCount) { + this.maximumElasticWorkerCount = maximumElasticWorkerCount; + return this; + } + + /** + * Get number of apps assigned to this App Service plan. + * + * @return the numberOfSites value + */ + public Integer numberOfSites() { + return this.numberOfSites; + } + + /** + * Get if <code>true</code>, this App Service Plan owns spot instances. + * + * @return the isSpot value + */ + public Boolean isSpot() { + return this.isSpot; + } + + /** + * Set if <code>true</code>, this App Service Plan owns spot instances. + * + * @param isSpot the isSpot value to set + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withIsSpot(Boolean isSpot) { + this.isSpot = isSpot; + return this; + } + + /** + * Get the time when the server farm expires. Valid only if it is a spot server farm. + * + * @return the spotExpirationTime value + */ + public DateTime spotExpirationTime() { + return this.spotExpirationTime; + } + + /** + * Set the time when the server farm expires. Valid only if it is a spot server farm. + * + * @param spotExpirationTime the spotExpirationTime value to set + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withSpotExpirationTime(DateTime spotExpirationTime) { + this.spotExpirationTime = spotExpirationTime; + return this; + } + + /** + * Get the time when the server farm free offer expires. + * + * @return the freeOfferExpirationTime value + */ + public DateTime freeOfferExpirationTime() { + return this.freeOfferExpirationTime; + } + + /** + * Set the time when the server farm free offer expires. + * + * @param freeOfferExpirationTime the freeOfferExpirationTime value to set + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withFreeOfferExpirationTime(DateTime freeOfferExpirationTime) { + this.freeOfferExpirationTime = freeOfferExpirationTime; + return this; + } + + /** + * Get resource group of the App Service plan. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get this needs to set to <code>true</code> when creating a Linux App Service Plan, along with <code>kind</code> set to <code>Linux</code>. It should be <code>false</code> otherwise. + * + * @return the reserved value + */ + public Boolean reserved() { + return this.reserved; + } + + /** + * Set this needs to set to <code>true</code> when creating a Linux App Service Plan, along with <code>kind</code> set to <code>Linux</code>. It should be <code>false</code> otherwise. + * + * @param reserved the reserved value to set + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withReserved(Boolean reserved) { + this.reserved = reserved; + return this; + } + + /** + * Get obsolete: If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. + * + * @return the isXenon value + */ + public Boolean isXenon() { + return this.isXenon; + } + + /** + * Set obsolete: If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. + * + * @param isXenon the isXenon value to set + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withIsXenon(Boolean isXenon) { + this.isXenon = isXenon; + return this; + } + + /** + * Get if Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. + * + * @return the hyperV value + */ + public Boolean hyperV() { + return this.hyperV; + } + + /** + * Set if Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. + * + * @param hyperV the hyperV value to set + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withHyperV(Boolean hyperV) { + this.hyperV = hyperV; + return this; + } + + /** + * Get scaling worker count. + * + * @return the targetWorkerCount value + */ + public Integer targetWorkerCount() { + return this.targetWorkerCount; + } + + /** + * Set scaling worker count. + * + * @param targetWorkerCount the targetWorkerCount value to set + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withTargetWorkerCount(Integer targetWorkerCount) { + this.targetWorkerCount = targetWorkerCount; + return this; + } + + /** + * Get scaling worker size ID. + * + * @return the targetWorkerSizeId value + */ + public Integer targetWorkerSizeId() { + return this.targetWorkerSizeId; + } + + /** + * Set scaling worker size ID. + * + * @param targetWorkerSizeId the targetWorkerSizeId value to set + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withTargetWorkerSizeId(Integer targetWorkerSizeId) { + this.targetWorkerSizeId = targetWorkerSizeId; + return this; + } + + /** + * Get provisioning state of the App Service Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServicePlanRestrictions.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServicePlanRestrictions.java new file mode 100644 index 0000000000000..f72dad2f8656e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServicePlans.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServicePlans.java new file mode 100644 index 0000000000000..0e59f1a36d3ae --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AppServicePlans.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.appservice.v2019_08_01; + +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServicePlan; +import rx.Completable; +import com.microsoft.azure.management.appservice.v2019_08_01.Capability; +import com.microsoft.azure.management.appservice.v2019_08_01.HybridConnection; +import com.microsoft.azure.management.appservice.v2019_08_01.ServerfarmSite; +import com.microsoft.azure.management.appservice.v2019_08_01.ServerfarmCsmUsageQuota; +import com.microsoft.azure.management.appservice.v2019_08_01.ServerfarmVnetInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.VnetRoute; + +/** + * Type representing AppServicePlans. + */ +public interface AppServicePlans { + /** + * Begins definition for a new Serverfarm resource. + * @param name resource name. + * @return the first stage of the new Serverfarm definition. + */ + AppServicePlan.DefinitionStages.Blank defineServerfarm(String name); + + /** + * Begins definition for a new Route resource. + * @param name resource name. + * @return the first stage of the new Route definition. + */ + VnetRoute.DefinitionStages.Blank defineRoute(String name); + + /** + * Get an App Service plan. + * Description for Get an App Service plan. + * + * @param resourceGroupName resource group name + * @param name resource name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getByResourceGroupAsync(String resourceGroupName, String name); + + /** + * Get all App Service plans in a resource group. + * Description for Get all App Service plans in a resource group. + * + * @param resourceGroupName resource group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByResourceGroupAsync(String resourceGroupName); + + /** + * Get all App Service plans for a subscription. + * Description for Get all App Service plans for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Delete an App Service plan. + * Description for Delete an App Service plan. + * + * @param resourceGroupName resource group name + * @param name resource name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String name); + + /** + * Restart all apps in an App Service plan. + * Description for 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 observable for the request + */ + Completable restartWebAppsAsync(String resourceGroupName, String name); + + /** + * Gets all selectable SKUs for a given App Service Plan. + * Description for Gets all selectable SKUs 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 for the request + */ + Observable getServerFarmSkusAsync(String resourceGroupName, String name); + + /** + * List all capabilities of an App Service plan. + * Description for 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 for the request + */ + Observable listCapabilitiesAsync(String resourceGroupName, String name); + + /** + * Retrieve a Hybrid Connection in use in an App Service plan. + * Description for 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 for the request + */ + Observable getHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Delete a Hybrid Connection in use in an App Service plan. + * Description for 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 observable for the request + */ + Completable deleteHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Get the send key name and value of a Hybrid Connection. + * Description for 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 for the request + */ + Observable listHybridConnectionKeysAsync(String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Get all apps that use a Hybrid Connection in an App Service Plan. + * Description for 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 for the request + */ + Observable listWebAppsByHybridConnectionAsync(final String resourceGroupName, final String name, final String namespaceName, final String relayName); + + /** + * Get the maximum number of Hybrid Connections allowed in an App Service plan. + * Description for 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 for the request + */ + Observable getHybridConnectionPlanLimitAsync(String resourceGroupName, String name); + + /** + * Retrieve all Hybrid Connections in use in an App Service plan. + * Description for 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 for the request + */ + Observable listHybridConnectionsAsync(final String resourceGroupName, final String name); + + /** + * Get all apps associated with an App Service plan. + * Description for 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 for the request + */ + Observable listWebAppsAsync(final String resourceGroupName, final String name); + + /** + * Gets server farm usage information. + * Description for 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 for the request + */ + Observable listUsagesAsync(final String resourceGroupName, final String name); + + /** + * Get a Virtual Network associated with an App Service plan. + * Description for 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 for the request + */ + Observable getVnetFromServerFarmAsync(String resourceGroupName, String name, String vnetName); + + /** + * Get all Virtual Networks associated with an App Service plan. + * Description for 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 for the request + */ + Observable listVnetsAsync(String resourceGroupName, String name); + + /** + * Get a Virtual Network gateway. + * Description for 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 for the request + */ + Observable getVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName); + + /** + * Get all routes that are associated with a Virtual Network in an App Service plan. + * Description for 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 for the request + */ + Observable listRoutesForVnetAsync(String resourceGroupName, String name, String vnetName); + + /** + * Delete a Virtual Network route in an App Service plan. + * Description for 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 observable for the request + */ + Completable deleteVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName); + + /** + * Get a Virtual Network route in an App Service plan. + * Description for 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 for the request + */ + Observable getRouteForVnetAsync(String resourceGroupName, String name, String vnetName, String routeName); + + /** + * Reboot a worker machine in an App Service plan. + * Description for 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 observable for the request + */ + Completable rebootWorkerAsync(String resourceGroupName, String name, String workerName); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ApplicationLogsConfig.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ApplicationLogsConfig.java new file mode 100644 index 0000000000000..ca1a7d256d491 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 application logs to file system configuration. + * + * @return the fileSystem value + */ + public FileSystemApplicationLogsConfig fileSystem() { + return this.fileSystem; + } + + /** + * Set application logs to file system configuration. + * + * @param fileSystem the fileSystem value to set + * @return the ApplicationLogsConfig object itself. + */ + public ApplicationLogsConfig withFileSystem(FileSystemApplicationLogsConfig fileSystem) { + this.fileSystem = fileSystem; + return this; + } + + /** + * Get application logs to azure table storage configuration. + * + * @return the azureTableStorage value + */ + public AzureTableStorageApplicationLogsConfig azureTableStorage() { + return this.azureTableStorage; + } + + /** + * Set application logs to azure table storage configuration. + * + * @param azureTableStorage the azureTableStorage value to set + * @return the ApplicationLogsConfig object itself. + */ + public ApplicationLogsConfig withAzureTableStorage(AzureTableStorageApplicationLogsConfig azureTableStorage) { + this.azureTableStorage = azureTableStorage; + return this; + } + + /** + * Get application logs to blob storage configuration. + * + * @return the azureBlobStorage value + */ + public AzureBlobStorageApplicationLogsConfig azureBlobStorage() { + return this.azureBlobStorage; + } + + /** + * Set application logs to blob storage configuration. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ApplicationStack.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ApplicationStack.java new file mode 100644 index 0000000000000..4c72895eeb046 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ApplicationStack.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.appservice.v2019_08_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Application stack. + */ +public class ApplicationStack { + /** + * 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 application stack name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set application stack name. + * + * @param name the name value to set + * @return the ApplicationStack object itself. + */ + public ApplicationStack withName(String name) { + this.name = name; + return this; + } + + /** + * Get application stack display name. + * + * @return the display value + */ + public String display() { + return this.display; + } + + /** + * Set application stack display name. + * + * @param display the display value to set + * @return the ApplicationStack object itself. + */ + public ApplicationStack withDisplay(String display) { + this.display = display; + return this; + } + + /** + * Get application stack dependency. + * + * @return the dependency value + */ + public String dependency() { + return this.dependency; + } + + /** + * Set application stack dependency. + * + * @param dependency the dependency value to set + * @return the ApplicationStack object itself. + */ + public ApplicationStack withDependency(String dependency) { + this.dependency = dependency; + return this; + } + + /** + * Get list of major versions available. + * + * @return the majorVersions value + */ + public List majorVersions() { + return this.majorVersions; + } + + /** + * Set list of major versions available. + * + * @param majorVersions the majorVersions value to set + * @return the ApplicationStack object itself. + */ + public ApplicationStack withMajorVersions(List majorVersions) { + this.majorVersions = majorVersions; + return this; + } + + /** + * Get list of frameworks associated with application stack. + * + * @return the frameworks value + */ + public List frameworks() { + return this.frameworks; + } + + /** + * Set list of frameworks associated with application stack. + * + * @param frameworks the frameworks value to set + * @return the ApplicationStack object itself. + */ + public ApplicationStack withFrameworks(List frameworks) { + this.frameworks = frameworks; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ApplicationStackResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ApplicationStackResource.java new file mode 100644 index 0000000000000..8a1e9b361c056 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ApplicationStackResource.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.ApplicationStackResourceInner; +import java.util.List; + +/** + * Type representing ApplicationStackResource. + */ +public interface ApplicationStackResource extends HasInner, HasManager { + /** + * @return the applicationStackResourceName value. + */ + String applicationStackResourceName(); + + /** + * @return the dependency value. + */ + String dependency(); + + /** + * @return the display value. + */ + String display(); + + /** + * @return the frameworks value. + */ + List frameworks(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the majorVersions value. + */ + List majorVersions(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ArmIdWrapper.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ArmIdWrapper.java new file mode 100644 index 0000000000000..9af18de2b9b55 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ArmIdWrapper.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A wrapper for an ARM resource id. + */ +public class ArmIdWrapper { + /** + * The id property. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Get the id value. + * + * @return the id value + */ + public String id() { + return this.id; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AutoHealActionType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AutoHealActionType.java new file mode 100644 index 0000000000000..67031f8cef0ae --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AutoHealActions.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AutoHealActions.java new file mode 100644 index 0000000000000..6a13e1fb3ac06 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AutoHealActions.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.appservice.v2019_08_01; + +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 predefined action to be taken. Possible values include: 'Recycle', 'LogEvent', 'CustomAction'. + * + * @return the actionType value + */ + public AutoHealActionType actionType() { + return this.actionType; + } + + /** + * Set predefined action to be taken. Possible values include: 'Recycle', 'LogEvent', 'CustomAction'. + * + * @param actionType the actionType value to set + * @return the AutoHealActions object itself. + */ + public AutoHealActions withActionType(AutoHealActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get custom action to be taken. + * + * @return the customAction value + */ + public AutoHealCustomAction customAction() { + return this.customAction; + } + + /** + * Set custom action to be taken. + * + * @param customAction the customAction value to set + * @return the AutoHealActions object itself. + */ + public AutoHealActions withCustomAction(AutoHealCustomAction customAction) { + this.customAction = customAction; + return this; + } + + /** + * Get minimum time the process must execute + before taking the action. + * + * @return the minProcessExecutionTime value + */ + public String minProcessExecutionTime() { + return this.minProcessExecutionTime; + } + + /** + * Set minimum time the process must execute + before taking the action. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AutoHealCustomAction.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AutoHealCustomAction.java new file mode 100644 index 0000000000000..8e560481e2606 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 executable to be run. + * + * @return the exe value + */ + public String exe() { + return this.exe; + } + + /** + * Set executable to be run. + * + * @param exe the exe value to set + * @return the AutoHealCustomAction object itself. + */ + public AutoHealCustomAction withExe(String exe) { + this.exe = exe; + return this; + } + + /** + * Get parameters for the executable. + * + * @return the parameters value + */ + public String parameters() { + return this.parameters; + } + + /** + * Set parameters for the executable. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AutoHealRules.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AutoHealRules.java new file mode 100644 index 0000000000000..5594d51810c87 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 conditions that describe when to execute the auto-heal actions. + * + * @return the triggers value + */ + public AutoHealTriggers triggers() { + return this.triggers; + } + + /** + * Set conditions that describe when to execute the auto-heal actions. + * + * @param triggers the triggers value to set + * @return the AutoHealRules object itself. + */ + public AutoHealRules withTriggers(AutoHealTriggers triggers) { + this.triggers = triggers; + return this; + } + + /** + * Get actions to be executed when a rule is triggered. + * + * @return the actions value + */ + public AutoHealActions actions() { + return this.actions; + } + + /** + * Set actions to be executed when a rule is triggered. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AutoHealTriggers.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AutoHealTriggers.java new file mode 100644 index 0000000000000..e91171f430a24 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 a rule based on total requests. + * + * @return the requests value + */ + public RequestsBasedTrigger requests() { + return this.requests; + } + + /** + * Set a rule based on total requests. + * + * @param requests the requests value to set + * @return the AutoHealTriggers object itself. + */ + public AutoHealTriggers withRequests(RequestsBasedTrigger requests) { + this.requests = requests; + return this; + } + + /** + * Get a rule based on private bytes. + * + * @return the privateBytesInKB value + */ + public Integer privateBytesInKB() { + return this.privateBytesInKB; + } + + /** + * Set a rule based on private bytes. + * + * @param privateBytesInKB the privateBytesInKB value to set + * @return the AutoHealTriggers object itself. + */ + public AutoHealTriggers withPrivateBytesInKB(Integer privateBytesInKB) { + this.privateBytesInKB = privateBytesInKB; + return this; + } + + /** + * Get a rule based on status codes. + * + * @return the statusCodes value + */ + public List statusCodes() { + return this.statusCodes; + } + + /** + * Set a rule based on status codes. + * + * @param statusCodes the statusCodes value to set + * @return the AutoHealTriggers object itself. + */ + public AutoHealTriggers withStatusCodes(List statusCodes) { + this.statusCodes = statusCodes; + return this; + } + + /** + * Get a rule based on request execution time. + * + * @return the slowRequests value + */ + public SlowRequestsBasedTrigger slowRequests() { + return this.slowRequests; + } + + /** + * Set a rule based on request execution time. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureBlobStorageApplicationLogsConfig.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureBlobStorageApplicationLogsConfig.java new file mode 100644 index 0000000000000..9f069aecae8b1 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureBlobStorageApplicationLogsConfig.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +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 log level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'. + * + * @return the level value + */ + public LogLevel level() { + return this.level; + } + + /** + * Set log level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'. + * + * @param level the level value to set + * @return the AzureBlobStorageApplicationLogsConfig object itself. + */ + public AzureBlobStorageApplicationLogsConfig withLevel(LogLevel level) { + this.level = level; + return this; + } + + /** + * Get sAS url to a azure blob container with read/write/list/delete permissions. + * + * @return the sasUrl value + */ + public String sasUrl() { + return this.sasUrl; + } + + /** + * Set sAS url to a azure blob container with read/write/list/delete permissions. + * + * @param sasUrl the sasUrl value to set + * @return the AzureBlobStorageApplicationLogsConfig object itself. + */ + public AzureBlobStorageApplicationLogsConfig withSasUrl(String sasUrl) { + this.sasUrl = sasUrl; + return this; + } + + /** + * Get retention in days. + Remove blobs older than X days. + 0 or lower means no retention. + * + * @return the retentionInDays value + */ + public Integer retentionInDays() { + return this.retentionInDays; + } + + /** + * Set retention in days. + Remove blobs older than X days. + 0 or lower means no retention. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureBlobStorageHttpLogsConfig.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureBlobStorageHttpLogsConfig.java new file mode 100644 index 0000000000000..a9b2c7950a69e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureBlobStorageHttpLogsConfig.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +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 sAS url to a azure blob container with read/write/list/delete permissions. + * + * @return the sasUrl value + */ + public String sasUrl() { + return this.sasUrl; + } + + /** + * Set sAS url to a azure blob container with read/write/list/delete permissions. + * + * @param sasUrl the sasUrl value to set + * @return the AzureBlobStorageHttpLogsConfig object itself. + */ + public AzureBlobStorageHttpLogsConfig withSasUrl(String sasUrl) { + this.sasUrl = sasUrl; + return this; + } + + /** + * Get retention in days. + Remove blobs older than X days. + 0 or lower means no retention. + * + * @return the retentionInDays value + */ + public Integer retentionInDays() { + return this.retentionInDays; + } + + /** + * Set retention in days. + Remove blobs older than X days. + 0 or lower means no retention. + * + * @param retentionInDays the retentionInDays value to set + * @return the AzureBlobStorageHttpLogsConfig object itself. + */ + public AzureBlobStorageHttpLogsConfig withRetentionInDays(Integer retentionInDays) { + this.retentionInDays = retentionInDays; + return this; + } + + /** + * Get true if configuration is enabled, false if it is disabled and null if configuration is not set. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set true if configuration is enabled, false if it is disabled and null if configuration is not set. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureResourceType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureResourceType.java new file mode 100644 index 0000000000000..2c5ac4116f52b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureStorageInfoValue.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureStorageInfoValue.java new file mode 100644 index 0000000000000..0376aff8d2010 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureStorageInfoValue.java @@ -0,0 +1,163 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure Files or Blob Storage access information value for dictionary storage. + */ +public class AzureStorageInfoValue { + /** + * Type of storage. Possible values include: 'AzureFiles', 'AzureBlob'. + */ + @JsonProperty(value = "type") + private AzureStorageType type; + + /** + * Name of the storage account. + */ + @JsonProperty(value = "accountName") + private String accountName; + + /** + * Name of the file share (container name, for Blob storage). + */ + @JsonProperty(value = "shareName") + private String shareName; + + /** + * Access key for the storage account. + */ + @JsonProperty(value = "accessKey") + private String accessKey; + + /** + * Path to mount the storage within the site's runtime environment. + */ + @JsonProperty(value = "mountPath") + private String mountPath; + + /** + * State of the storage account. Possible values include: 'Ok', + * 'InvalidCredentials', 'InvalidShare'. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private AzureStorageState state; + + /** + * Get type of storage. Possible values include: 'AzureFiles', 'AzureBlob'. + * + * @return the type value + */ + public AzureStorageType type() { + return this.type; + } + + /** + * Set type of storage. Possible values include: 'AzureFiles', 'AzureBlob'. + * + * @param type the type value to set + * @return the AzureStorageInfoValue object itself. + */ + public AzureStorageInfoValue withType(AzureStorageType type) { + this.type = type; + return this; + } + + /** + * Get name of the storage account. + * + * @return the accountName value + */ + public String accountName() { + return this.accountName; + } + + /** + * Set name of the storage account. + * + * @param accountName the accountName value to set + * @return the AzureStorageInfoValue object itself. + */ + public AzureStorageInfoValue withAccountName(String accountName) { + this.accountName = accountName; + return this; + } + + /** + * Get name of the file share (container name, for Blob storage). + * + * @return the shareName value + */ + public String shareName() { + return this.shareName; + } + + /** + * Set name of the file share (container name, for Blob storage). + * + * @param shareName the shareName value to set + * @return the AzureStorageInfoValue object itself. + */ + public AzureStorageInfoValue withShareName(String shareName) { + this.shareName = shareName; + return this; + } + + /** + * Get access key for the storage account. + * + * @return the accessKey value + */ + public String accessKey() { + return this.accessKey; + } + + /** + * Set access key for the storage account. + * + * @param accessKey the accessKey value to set + * @return the AzureStorageInfoValue object itself. + */ + public AzureStorageInfoValue withAccessKey(String accessKey) { + this.accessKey = accessKey; + return this; + } + + /** + * Get path to mount the storage within the site's runtime environment. + * + * @return the mountPath value + */ + public String mountPath() { + return this.mountPath; + } + + /** + * Set path to mount the storage within the site's runtime environment. + * + * @param mountPath the mountPath value to set + * @return the AzureStorageInfoValue object itself. + */ + public AzureStorageInfoValue withMountPath(String mountPath) { + this.mountPath = mountPath; + return this; + } + + /** + * Get state of the storage account. Possible values include: 'Ok', 'InvalidCredentials', 'InvalidShare'. + * + * @return the state value + */ + public AzureStorageState state() { + return this.state; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureStoragePropertyDictionaryResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureStoragePropertyDictionaryResource.java new file mode 100644 index 0000000000000..8e262cb7aa189 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureStoragePropertyDictionaryResource.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.AzureStoragePropertyDictionaryResourceInner; +import java.util.Map; + +/** + * Type representing AzureStoragePropertyDictionaryResource. + */ +public interface AzureStoragePropertyDictionaryResource extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + Map properties(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureStorageState.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureStorageState.java new file mode 100644 index 0000000000000..39c2c02e5c64a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureStorageState.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AzureStorageState. + */ +public enum AzureStorageState { + /** Enum value Ok. */ + OK("Ok"), + + /** Enum value InvalidCredentials. */ + INVALID_CREDENTIALS("InvalidCredentials"), + + /** Enum value InvalidShare. */ + INVALID_SHARE("InvalidShare"); + + /** The actual serialized value for a AzureStorageState instance. */ + private String value; + + AzureStorageState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AzureStorageState instance. + * + * @param value the serialized value to parse. + * @return the parsed AzureStorageState object, or null if unable to parse. + */ + @JsonCreator + public static AzureStorageState fromString(String value) { + AzureStorageState[] items = AzureStorageState.values(); + for (AzureStorageState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureStorageType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureStorageType.java new file mode 100644 index 0000000000000..39cbdf0ad94f9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureStorageType.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AzureStorageType. + */ +public enum AzureStorageType { + /** Enum value AzureFiles. */ + AZURE_FILES("AzureFiles"), + + /** Enum value AzureBlob. */ + AZURE_BLOB("AzureBlob"); + + /** The actual serialized value for a AzureStorageType instance. */ + private String value; + + AzureStorageType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AzureStorageType instance. + * + * @param value the serialized value to parse. + * @return the parsed AzureStorageType object, or null if unable to parse. + */ + @JsonCreator + public static AzureStorageType fromString(String value) { + AzureStorageType[] items = AzureStorageType.values(); + for (AzureStorageType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureTableStorageApplicationLogsConfig.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/AzureTableStorageApplicationLogsConfig.java new file mode 100644 index 0000000000000..2dcd7c3b62938 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 log level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'. + * + * @return the level value + */ + public LogLevel level() { + return this.level; + } + + /** + * Set log level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'. + * + * @param level the level value to set + * @return the AzureTableStorageApplicationLogsConfig object itself. + */ + public AzureTableStorageApplicationLogsConfig withLevel(LogLevel level) { + this.level = level; + return this; + } + + /** + * Get sAS URL to an Azure table with add/query/delete permissions. + * + * @return the sasUrl value + */ + public String sasUrl() { + return this.sasUrl; + } + + /** + * Set sAS URL to an Azure table with add/query/delete permissions. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BackupItem.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BackupItem.java new file mode 100644 index 0000000000000..4ada50337edd4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BackupItem.java @@ -0,0 +1,114 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.BackupItemInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import org.joda.time.DateTime; +import java.util.List; + +/** + * Type representing BackupItem. + */ +public interface BackupItem extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the backupId value. + */ + Integer backupId(); + + /** + * @return the backupItemName value. + */ + String backupItemName(); + + /** + * @return the blobName value. + */ + String blobName(); + + /** + * @return the correlationId value. + */ + String correlationId(); + + /** + * @return the created value. + */ + DateTime created(); + + /** + * @return the databases value. + */ + List databases(); + + /** + * @return the finishedTimeStamp value. + */ + DateTime finishedTimeStamp(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the lastRestoreTimeStamp value. + */ + DateTime lastRestoreTimeStamp(); + + /** + * @return the log value. + */ + String log(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the scheduled value. + */ + Boolean scheduled(); + + /** + * @return the sizeInBytes value. + */ + Long sizeInBytes(); + + /** + * @return the status value. + */ + BackupItemStatus status(); + + /** + * @return the storageAccountUrl value. + */ + String storageAccountUrl(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the websiteSizeInBytes value. + */ + Long websiteSizeInBytes(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BackupItemStatus.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BackupItemStatus.java new file mode 100644 index 0000000000000..f141a7fe3180d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BackupRequest.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BackupRequest.java new file mode 100644 index 0000000000000..03043e982327e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BackupRequest.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.BackupRequestInner; +import java.util.List; + +/** + * Type representing BackupRequest. + */ +public interface BackupRequest extends HasInner, HasManager { + /** + * @return the backupName value. + */ + String backupName(); + + /** + * @return the backupSchedule value. + */ + BackupSchedule backupSchedule(); + + /** + * @return the databases value. + */ + List databases(); + + /** + * @return the enabled value. + */ + Boolean enabled(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the storageAccountUrl value. + */ + String storageAccountUrl(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BackupRestoreOperationType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BackupRestoreOperationType.java new file mode 100644 index 0000000000000..a038c35d4f84c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BackupRestoreOperationType.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.appservice.v2019_08_01; + +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"), + + /** Enum value CloudFS. */ + CLOUD_FS("CloudFS"); + + /** 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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BackupSchedule.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BackupSchedule.java new file mode 100644 index 0000000000000..303ef98375b6d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 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). + * + * @return the frequencyInterval value + */ + public int frequencyInterval() { + return this.frequencyInterval; + } + + /** + * Set 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). + * + * @param frequencyInterval the frequencyInterval value to set + * @return the BackupSchedule object itself. + */ + public BackupSchedule withFrequencyInterval(int frequencyInterval) { + this.frequencyInterval = frequencyInterval; + return this; + } + + /** + * Get 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'. + * + * @return the frequencyUnit value + */ + public FrequencyUnit frequencyUnit() { + return this.frequencyUnit; + } + + /** + * Set 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'. + * + * @param frequencyUnit the frequencyUnit value to set + * @return the BackupSchedule object itself. + */ + public BackupSchedule withFrequencyUnit(FrequencyUnit frequencyUnit) { + this.frequencyUnit = frequencyUnit; + return this; + } + + /** + * Get true if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise. + * + * @return the keepAtLeastOneBackup value + */ + public boolean keepAtLeastOneBackup() { + return this.keepAtLeastOneBackup; + } + + /** + * Set true if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise. + * + * @param keepAtLeastOneBackup the keepAtLeastOneBackup value to set + * @return the BackupSchedule object itself. + */ + public BackupSchedule withKeepAtLeastOneBackup(boolean keepAtLeastOneBackup) { + this.keepAtLeastOneBackup = keepAtLeastOneBackup; + return this; + } + + /** + * Get after how many days backups should be deleted. + * + * @return the retentionPeriodInDays value + */ + public int retentionPeriodInDays() { + return this.retentionPeriodInDays; + } + + /** + * Set after how many days backups should be deleted. + * + * @param retentionPeriodInDays the retentionPeriodInDays value to set + * @return the BackupSchedule object itself. + */ + public BackupSchedule withRetentionPeriodInDays(int retentionPeriodInDays) { + this.retentionPeriodInDays = retentionPeriodInDays; + return this; + } + + /** + * Get when the schedule should start working. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set when the schedule should start working. + * + * @param startTime the startTime value to set + * @return the BackupSchedule object itself. + */ + public BackupSchedule withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get last time when this schedule was triggered. + * + * @return the lastExecutionTime value + */ + public DateTime lastExecutionTime() { + return this.lastExecutionTime; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BuildStatus.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BuildStatus.java new file mode 100644 index 0000000000000..8396bf64002ea --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BuildStatus.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.appservice.v2019_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for BuildStatus. + */ +public final class BuildStatus extends ExpandableStringEnum { + /** Static value WaitingForDeployment for BuildStatus. */ + public static final BuildStatus WAITING_FOR_DEPLOYMENT = fromString("WaitingForDeployment"); + + /** Static value Uploading for BuildStatus. */ + public static final BuildStatus UPLOADING = fromString("Uploading"); + + /** Static value Deploying for BuildStatus. */ + public static final BuildStatus DEPLOYING = fromString("Deploying"); + + /** Static value Ready for BuildStatus. */ + public static final BuildStatus READY = fromString("Ready"); + + /** Static value Failed for BuildStatus. */ + public static final BuildStatus FAILED = fromString("Failed"); + + /** Static value Deleting for BuildStatus. */ + public static final BuildStatus DELETING = fromString("Deleting"); + + /** Static value Detached for BuildStatus. */ + public static final BuildStatus DETACHED = fromString("Detached"); + + /** + * Creates or finds a BuildStatus from its string representation. + * @param name a name to look for + * @return the corresponding BuildStatus + */ + @JsonCreator + public static BuildStatus fromString(String name) { + return fromString(name, BuildStatus.class); + } + + /** + * @return known BuildStatus values + */ + public static Collection values() { + return values(BuildStatus.class); + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BuiltInAuthenticationProvider.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/BuiltInAuthenticationProvider.java new file mode 100644 index 0000000000000..3162bdb045350 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Capability.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Capability.java new file mode 100644 index 0000000000000..375d9c5f5f4c6 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Capability.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CapabilityInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing Capability. + */ +public interface Capability extends HasInner, HasManager { + /** + * @return the name value. + */ + String name(); + + /** + * @return the reason value. + */ + String reason(); + + /** + * @return the value value. + */ + String value(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Certificate.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Certificate.java new file mode 100644 index 0000000000000..41098f58e9c90 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Certificate.java @@ -0,0 +1,355 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateInner; + +/** + * Type representing Certificate. + */ +public interface Certificate extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the canonicalName value. + */ + String canonicalName(); + + /** + * @return the cerBlob value. + */ + byte[] cerBlob(); + + /** + * @return the expirationDate value. + */ + DateTime expirationDate(); + + /** + * @return the friendlyName value. + */ + String friendlyName(); + + /** + * @return the hostingEnvironmentProfile value. + */ + HostingEnvironmentProfile hostingEnvironmentProfile(); + + /** + * @return the hostNames value. + */ + List hostNames(); + + /** + * @return the issueDate value. + */ + DateTime issueDate(); + + /** + * @return the issuer value. + */ + String issuer(); + + /** + * @return the keyVaultId value. + */ + String keyVaultId(); + + /** + * @return the keyVaultSecretName value. + */ + String keyVaultSecretName(); + + /** + * @return the keyVaultSecretStatus value. + */ + KeyVaultSecretStatus keyVaultSecretStatus(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the password value. + */ + String password(); + + /** + * @return the pfxBlob value. + */ + byte[] pfxBlob(); + + /** + * @return the publicKeyHash value. + */ + String publicKeyHash(); + + /** + * @return the selfLink value. + */ + String selfLink(); + + /** + * @return the serverFarmId value. + */ + String serverFarmId(); + + /** + * @return the siteName value. + */ + String siteName(); + + /** + * @return the subjectName value. + */ + String subjectName(); + + /** + * @return the thumbprint value. + */ + String thumbprint(); + + /** + * @return the valid value. + */ + Boolean valid(); + + /** + * The entirety of the Certificate definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithPassword, DefinitionStages.WithCreate { + } + + /** + * Grouping of Certificate definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Certificate definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the Certificate definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the certificate definition allowing to specify Password. + */ + interface WithPassword { + /** + * Specifies password. + * @param password Certificate password + * @return the next definition stage +*/ + WithCreate withPassword(String password); + } + + /** + * The stage of the certificate definition allowing to specify CanonicalName. + */ + interface WithCanonicalName { + /** + * Specifies canonicalName. + * @param canonicalName CNAME of the certificate to be issued via free certificate + * @return the next definition stage + */ + WithCreate withCanonicalName(String canonicalName); + } + + /** + * The stage of the certificate definition allowing to specify HostNames. + */ + interface WithHostNames { + /** + * Specifies hostNames. + * @param hostNames Host names the certificate applies to + * @return the next definition stage + */ + WithCreate withHostNames(List hostNames); + } + + /** + * The stage of the certificate definition allowing to specify KeyVaultId. + */ + interface WithKeyVaultId { + /** + * Specifies keyVaultId. + * @param keyVaultId Key Vault Csm resource Id + * @return the next definition stage + */ + WithCreate withKeyVaultId(String keyVaultId); + } + + /** + * The stage of the certificate definition allowing to specify KeyVaultSecretName. + */ + interface WithKeyVaultSecretName { + /** + * Specifies keyVaultSecretName. + * @param keyVaultSecretName Key Vault secret name + * @return the next definition stage + */ + WithCreate withKeyVaultSecretName(String keyVaultSecretName); + } + + /** + * The stage of the certificate definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the certificate definition allowing to specify PfxBlob. + */ + interface WithPfxBlob { + /** + * Specifies pfxBlob. + * @param pfxBlob Pfx blob + * @return the next definition stage + */ + WithCreate withPfxBlob(byte[] pfxBlob); + } + + /** + * The stage of the certificate definition allowing to specify ServerFarmId. + */ + interface WithServerFarmId { + /** + * Specifies serverFarmId. + * @param serverFarmId Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}" + * @return the next definition stage + */ + WithCreate withServerFarmId(String serverFarmId); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithCanonicalName, DefinitionStages.WithHostNames, DefinitionStages.WithKeyVaultId, DefinitionStages.WithKeyVaultSecretName, DefinitionStages.WithKind, DefinitionStages.WithPfxBlob, DefinitionStages.WithServerFarmId { + } + } + /** + * The template for a Certificate update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithCanonicalName, UpdateStages.WithHostNames, UpdateStages.WithKeyVaultId, UpdateStages.WithKeyVaultSecretName, UpdateStages.WithKind, UpdateStages.WithPfxBlob, UpdateStages.WithServerFarmId { + } + + /** + * Grouping of Certificate update stages. + */ + interface UpdateStages { + /** + * The stage of the certificate update allowing to specify CanonicalName. + */ + interface WithCanonicalName { + /** + * Specifies canonicalName. + * @param canonicalName CNAME of the certificate to be issued via free certificate + * @return the next update stage + */ + Update withCanonicalName(String canonicalName); + } + + /** + * The stage of the certificate update allowing to specify HostNames. + */ + interface WithHostNames { + /** + * Specifies hostNames. + * @param hostNames Host names the certificate applies to + * @return the next update stage + */ + Update withHostNames(List hostNames); + } + + /** + * The stage of the certificate update allowing to specify KeyVaultId. + */ + interface WithKeyVaultId { + /** + * Specifies keyVaultId. + * @param keyVaultId Key Vault Csm resource Id + * @return the next update stage + */ + Update withKeyVaultId(String keyVaultId); + } + + /** + * The stage of the certificate update allowing to specify KeyVaultSecretName. + */ + interface WithKeyVaultSecretName { + /** + * Specifies keyVaultSecretName. + * @param keyVaultSecretName Key Vault secret name + * @return the next update stage + */ + Update withKeyVaultSecretName(String keyVaultSecretName); + } + + /** + * The stage of the certificate update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the certificate update allowing to specify PfxBlob. + */ + interface WithPfxBlob { + /** + * Specifies pfxBlob. + * @param pfxBlob Pfx blob + * @return the next update stage + */ + Update withPfxBlob(byte[] pfxBlob); + } + + /** + * The stage of the certificate update allowing to specify ServerFarmId. + */ + interface WithServerFarmId { + /** + * Specifies serverFarmId. + * @param serverFarmId Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}" + * @return the next update stage + */ + Update withServerFarmId(String serverFarmId); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateDetails.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateDetails.java new file mode 100644 index 0000000000000..968dbfe026ee0 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 certificate Version. + * + * @return the version value + */ + public Integer version() { + return this.version; + } + + /** + * Get certificate Serial Number. + * + * @return the serialNumber value + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get certificate Thumbprint. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Get certificate Subject. + * + * @return the subject value + */ + public String subject() { + return this.subject; + } + + /** + * Get date Certificate is valid from. + * + * @return the notBefore value + */ + public DateTime notBefore() { + return this.notBefore; + } + + /** + * Get date Certificate is valid to. + * + * @return the notAfter value + */ + public DateTime notAfter() { + return this.notAfter; + } + + /** + * Get certificate Signature algorithm. + * + * @return the signatureAlgorithm value + */ + public String signatureAlgorithm() { + return this.signatureAlgorithm; + } + + /** + * Get certificate Issuer. + * + * @return the issuer value + */ + public String issuer() { + return this.issuer; + } + + /** + * Get raw certificate data. + * + * @return the rawData value + */ + public String rawData() { + return this.rawData; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateEmail.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateEmail.java new file mode 100644 index 0000000000000..7bcf7c51a365b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateEmail.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateEmailInner; +import org.joda.time.DateTime; + +/** + * Type representing CertificateEmail. + */ +public interface CertificateEmail extends HasInner, HasManager { + /** + * @return the emailId value. + */ + String emailId(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the timeStamp value. + */ + DateTime timeStamp(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateOrderAction.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateOrderAction.java new file mode 100644 index 0000000000000..3e264b5ad021e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateOrderAction.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateOrderActionInner; +import org.joda.time.DateTime; + +/** + * Type representing CertificateOrderAction. + */ +public interface CertificateOrderAction extends HasInner, HasManager { + /** + * @return the actionType value. + */ + CertificateOrderActionType actionType(); + + /** + * @return the createdAt value. + */ + DateTime createdAt(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateOrderActionType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateOrderActionType.java new file mode 100644 index 0000000000000..ed7344f0564db --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateOrderStatus.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateOrderStatus.java new file mode 100644 index 0000000000000..f95291fbdce10 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificatePatchResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificatePatchResource.java new file mode 100644 index 0000000000000..a2fe7bcd6bf95 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificatePatchResource.java @@ -0,0 +1,405 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * ARM resource for a certificate. + */ +@JsonFlatten +public class CertificatePatchResource 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 expiration 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; + + /** + * 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; + + /** + * CNAME of the certificate to be issued via free certificate. + */ + @JsonProperty(value = "properties.canonicalName") + private String canonicalName; + + /** + * Get friendly name of the certificate. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Get subject name of the certificate. + * + * @return the subjectName value + */ + public String subjectName() { + return this.subjectName; + } + + /** + * Get host names the certificate applies to. + * + * @return the hostNames value + */ + public List hostNames() { + return this.hostNames; + } + + /** + * Set host names the certificate applies to. + * + * @param hostNames the hostNames value to set + * @return the CertificatePatchResource object itself. + */ + public CertificatePatchResource withHostNames(List hostNames) { + this.hostNames = hostNames; + return this; + } + + /** + * Get pfx blob. + * + * @return the pfxBlob value + */ + public byte[] pfxBlob() { + return this.pfxBlob; + } + + /** + * Set pfx blob. + * + * @param pfxBlob the pfxBlob value to set + * @return the CertificatePatchResource object itself. + */ + public CertificatePatchResource withPfxBlob(byte[] pfxBlob) { + this.pfxBlob = pfxBlob; + return this; + } + + /** + * Get app name. + * + * @return the siteName value + */ + public String siteName() { + return this.siteName; + } + + /** + * Get self link. + * + * @return the selfLink value + */ + public String selfLink() { + return this.selfLink; + } + + /** + * Get certificate issuer. + * + * @return the issuer value + */ + public String issuer() { + return this.issuer; + } + + /** + * Get certificate issue Date. + * + * @return the issueDate value + */ + public DateTime issueDate() { + return this.issueDate; + } + + /** + * Get certificate expiration date. + * + * @return the expirationDate value + */ + public DateTime expirationDate() { + return this.expirationDate; + } + + /** + * Get certificate password. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set certificate password. + * + * @param password the password value to set + * @return the CertificatePatchResource object itself. + */ + public CertificatePatchResource withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get certificate thumbprint. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Get is the certificate valid?. + * + * @return the valid value + */ + public Boolean valid() { + return this.valid; + } + + /** + * Get raw bytes of .cer file. + * + * @return the cerBlob value + */ + public byte[] cerBlob() { + return this.cerBlob; + } + + /** + * Get public key hash. + * + * @return the publicKeyHash value + */ + public String publicKeyHash() { + return this.publicKeyHash; + } + + /** + * Get specification for the App Service Environment to use for the certificate. + * + * @return the hostingEnvironmentProfile value + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Get key Vault Csm resource Id. + * + * @return the keyVaultId value + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Set key Vault Csm resource Id. + * + * @param keyVaultId the keyVaultId value to set + * @return the CertificatePatchResource object itself. + */ + public CertificatePatchResource withKeyVaultId(String keyVaultId) { + this.keyVaultId = keyVaultId; + return this; + } + + /** + * Get key Vault secret name. + * + * @return the keyVaultSecretName value + */ + public String keyVaultSecretName() { + return this.keyVaultSecretName; + } + + /** + * Set key Vault secret name. + * + * @param keyVaultSecretName the keyVaultSecretName value to set + * @return the CertificatePatchResource object itself. + */ + public CertificatePatchResource withKeyVaultSecretName(String keyVaultSecretName) { + this.keyVaultSecretName = keyVaultSecretName; + return this; + } + + /** + * Get status of the Key Vault secret. Possible values include: 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', 'Unknown'. + * + * @return the keyVaultSecretStatus value + */ + public KeyVaultSecretStatus keyVaultSecretStatus() { + return this.keyVaultSecretStatus; + } + + /** + * Get resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + * + * @return the serverFarmId value + */ + public String serverFarmId() { + return this.serverFarmId; + } + + /** + * Set resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + * + * @param serverFarmId the serverFarmId value to set + * @return the CertificatePatchResource object itself. + */ + public CertificatePatchResource withServerFarmId(String serverFarmId) { + this.serverFarmId = serverFarmId; + return this; + } + + /** + * Get cNAME of the certificate to be issued via free certificate. + * + * @return the canonicalName value + */ + public String canonicalName() { + return this.canonicalName; + } + + /** + * Set cNAME of the certificate to be issued via free certificate. + * + * @param canonicalName the canonicalName value to set + * @return the CertificatePatchResource object itself. + */ + public CertificatePatchResource withCanonicalName(String canonicalName) { + this.canonicalName = canonicalName; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateProductType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateProductType.java new file mode 100644 index 0000000000000..472fb574f4b2b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateRegistrationProviders.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateRegistrationProviders.java new file mode 100644 index 0000000000000..9601c3dcf2852 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CertificateRegistrationProviders.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationProvidersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing CertificateRegistrationProviders. + */ +public interface CertificateRegistrationProviders extends HasInner { + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Description for 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 for the request + */ + Observable listOperationsAsync(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Certificates.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Certificates.java new file mode 100644 index 0000000000000..4cce6797d2ae1 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Certificates.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificatesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Certificates. + */ +public interface Certificates extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Channels.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Channels.java new file mode 100644 index 0000000000000..6cdb7821c258f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CheckNameResourceTypes.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CheckNameResourceTypes.java new file mode 100644 index 0000000000000..e94c844b0212d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CloneAbilityResult.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CloneAbilityResult.java new file mode 100644 index 0000000000000..168a8ebb5f28e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CloningInfo.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CloningInfo.java new file mode 100644 index 0000000000000..ae2b46c61e2d7 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CloningInfo.java @@ -0,0 +1,331 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +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; + + /** + * Location of source app ex: West US or North Europe. + */ + @JsonProperty(value = "sourceWebAppLocation") + private String sourceWebAppLocation; + + /** + * 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; + + /** + * Get correlation ID of cloning operation. This ID ties multiple cloning operations + together to use the same snapshot. + * + * @return the correlationId value + */ + public UUID correlationId() { + return this.correlationId; + } + + /** + * Set correlation ID of cloning operation. This ID ties multiple cloning operations + together to use the same snapshot. + * + * @param correlationId the correlationId value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withCorrelationId(UUID correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get <code>true</code> to overwrite destination app; otherwise, <code>false</code>. + * + * @return the overwrite value + */ + public Boolean overwrite() { + return this.overwrite; + } + + /** + * Set <code>true</code> to overwrite destination app; otherwise, <code>false</code>. + * + * @param overwrite the overwrite value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withOverwrite(Boolean overwrite) { + this.overwrite = overwrite; + return this; + } + + /** + * Get <code>true</code> to clone custom hostnames from source app; otherwise, <code>false</code>. + * + * @return the cloneCustomHostNames value + */ + public Boolean cloneCustomHostNames() { + return this.cloneCustomHostNames; + } + + /** + * Set <code>true</code> to clone custom hostnames from source app; otherwise, <code>false</code>. + * + * @param cloneCustomHostNames the cloneCustomHostNames value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withCloneCustomHostNames(Boolean cloneCustomHostNames) { + this.cloneCustomHostNames = cloneCustomHostNames; + return this; + } + + /** + * Get <code>true</code> to clone source control from source app; otherwise, <code>false</code>. + * + * @return the cloneSourceControl value + */ + public Boolean cloneSourceControl() { + return this.cloneSourceControl; + } + + /** + * Set <code>true</code> to clone source control from source app; otherwise, <code>false</code>. + * + * @param cloneSourceControl the cloneSourceControl value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withCloneSourceControl(Boolean cloneSourceControl) { + this.cloneSourceControl = cloneSourceControl; + return this; + } + + /** + * Get 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. + * + * @return the sourceWebAppId value + */ + public String sourceWebAppId() { + return this.sourceWebAppId; + } + + /** + * Set 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. + * + * @param sourceWebAppId the sourceWebAppId value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withSourceWebAppId(String sourceWebAppId) { + this.sourceWebAppId = sourceWebAppId; + return this; + } + + /** + * Get location of source app ex: West US or North Europe. + * + * @return the sourceWebAppLocation value + */ + public String sourceWebAppLocation() { + return this.sourceWebAppLocation; + } + + /** + * Set location of source app ex: West US or North Europe. + * + * @param sourceWebAppLocation the sourceWebAppLocation value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withSourceWebAppLocation(String sourceWebAppLocation) { + this.sourceWebAppLocation = sourceWebAppLocation; + return this; + } + + /** + * Get app Service Environment. + * + * @return the hostingEnvironment value + */ + public String hostingEnvironment() { + return this.hostingEnvironment; + } + + /** + * Set app Service Environment. + * + * @param hostingEnvironment the hostingEnvironment value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withHostingEnvironment(String hostingEnvironment) { + this.hostingEnvironment = hostingEnvironment; + return this; + } + + /** + * Get 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. + * + * @return the appSettingsOverrides value + */ + public Map appSettingsOverrides() { + return this.appSettingsOverrides; + } + + /** + * Set 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. + * + * @param appSettingsOverrides the appSettingsOverrides value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withAppSettingsOverrides(Map appSettingsOverrides) { + this.appSettingsOverrides = appSettingsOverrides; + return this; + } + + /** + * Get <code>true</code> to configure load balancing for source and destination app. + * + * @return the configureLoadBalancing value + */ + public Boolean configureLoadBalancing() { + return this.configureLoadBalancing; + } + + /** + * Set <code>true</code> to configure load balancing for source and destination app. + * + * @param configureLoadBalancing the configureLoadBalancing value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withConfigureLoadBalancing(Boolean configureLoadBalancing) { + this.configureLoadBalancing = configureLoadBalancing; + return this; + } + + /** + * Get 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}. + * + * @return the trafficManagerProfileId value + */ + public String trafficManagerProfileId() { + return this.trafficManagerProfileId; + } + + /** + * Set 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}. + * + * @param trafficManagerProfileId the trafficManagerProfileId value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withTrafficManagerProfileId(String trafficManagerProfileId) { + this.trafficManagerProfileId = trafficManagerProfileId; + return this; + } + + /** + * Get name of Traffic Manager profile to create. This is only needed if Traffic Manager profile does not already exist. + * + * @return the trafficManagerProfileName value + */ + public String trafficManagerProfileName() { + return this.trafficManagerProfileName; + } + + /** + * Set name of Traffic Manager profile to create. This is only needed if Traffic Manager profile does not already exist. + * + * @param trafficManagerProfileName the trafficManagerProfileName value to set + * @return the CloningInfo object itself. + */ + public CloningInfo withTrafficManagerProfileName(String trafficManagerProfileName) { + this.trafficManagerProfileName = trafficManagerProfileName; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ComputeModeOptions.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ComputeModeOptions.java new file mode 100644 index 0000000000000..47df6ca74c756 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ConfigReferenceLocation.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ConfigReferenceLocation.java new file mode 100644 index 0000000000000..386a53b6b11b6 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ConfigReferenceLocation.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ConfigReferenceLocation. + */ +public enum ConfigReferenceLocation { + /** Enum value ApplicationSetting. */ + APPLICATION_SETTING("ApplicationSetting"); + + /** The actual serialized value for a ConfigReferenceLocation instance. */ + private String value; + + ConfigReferenceLocation(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ConfigReferenceLocation instance. + * + * @param value the serialized value to parse. + * @return the parsed ConfigReferenceLocation object, or null if unable to parse. + */ + @JsonCreator + public static ConfigReferenceLocation fromString(String value) { + ConfigReferenceLocation[] items = ConfigReferenceLocation.values(); + for (ConfigReferenceLocation item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ConfigReferenceSource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ConfigReferenceSource.java new file mode 100644 index 0000000000000..f77c713aff261 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ConfigReferenceSource.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ConfigReferenceSource. + */ +public enum ConfigReferenceSource { + /** Enum value KeyVault. */ + KEY_VAULT("KeyVault"); + + /** The actual serialized value for a ConfigReferenceSource instance. */ + private String value; + + ConfigReferenceSource(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ConfigReferenceSource instance. + * + * @param value the serialized value to parse. + * @return the parsed ConfigReferenceSource object, or null if unable to parse. + */ + @JsonCreator + public static ConfigReferenceSource fromString(String value) { + ConfigReferenceSource[] items = ConfigReferenceSource.values(); + for (ConfigReferenceSource item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ConnStringInfo.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ConnStringInfo.java new file mode 100644 index 0000000000000..97545a8f01663 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 name of connection string. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of connection string. + * + * @param name the name value to set + * @return the ConnStringInfo object itself. + */ + public ConnStringInfo withName(String name) { + this.name = name; + return this; + } + + /** + * Get connection string value. + * + * @return the connectionString value + */ + public String connectionString() { + return this.connectionString; + } + + /** + * Set connection string value. + * + * @param connectionString the connectionString value to set + * @return the ConnStringInfo object itself. + */ + public ConnStringInfo withConnectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + + /** + * Get type of database. Possible values include: 'MySql', 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus', 'EventHub', 'ApiHub', 'DocDb', 'RedisCache', 'PostgreSQL'. + * + * @return the type value + */ + public ConnectionStringType type() { + return this.type; + } + + /** + * Set type of database. Possible values include: 'MySql', 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus', 'EventHub', 'ApiHub', 'DocDb', 'RedisCache', 'PostgreSQL'. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ConnStringValueTypePair.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ConnStringValueTypePair.java new file mode 100644 index 0000000000000..4e8d3b274fae7 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 value of pair. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set value of pair. + * + * @param value the value value to set + * @return the ConnStringValueTypePair object itself. + */ + public ConnStringValueTypePair withValue(String value) { + this.value = value; + return this; + } + + /** + * Get type of database. Possible values include: 'MySql', 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus', 'EventHub', 'ApiHub', 'DocDb', 'RedisCache', 'PostgreSQL'. + * + * @return the type value + */ + public ConnectionStringType type() { + return this.type; + } + + /** + * Set type of database. Possible values include: 'MySql', 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus', 'EventHub', 'ApiHub', 'DocDb', 'RedisCache', 'PostgreSQL'. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ConnectionStringDictionary.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ConnectionStringDictionary.java new file mode 100644 index 0000000000000..a4bf5bf2ba1b9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ConnectionStringDictionary.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.ConnectionStringDictionaryInner; +import java.util.Map; + +/** + * Type representing ConnectionStringDictionary. + */ +public interface ConnectionStringDictionary extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + Map properties(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ConnectionStringType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ConnectionStringType.java new file mode 100644 index 0000000000000..c8e6570acb514 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Contact.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Contact.java new file mode 100644 index 0000000000000..773180b90b923 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 mailing address. + * + * @return the addressMailing value + */ + public Address addressMailing() { + return this.addressMailing; + } + + /** + * Set mailing address. + * + * @param addressMailing the addressMailing value to set + * @return the Contact object itself. + */ + public Contact withAddressMailing(Address addressMailing) { + this.addressMailing = addressMailing; + return this; + } + + /** + * Get email address. + * + * @return the email value + */ + public String email() { + return this.email; + } + + /** + * Set email address. + * + * @param email the email value to set + * @return the Contact object itself. + */ + public Contact withEmail(String email) { + this.email = email; + return this; + } + + /** + * Get fax number. + * + * @return the fax value + */ + public String fax() { + return this.fax; + } + + /** + * Set fax number. + * + * @param fax the fax value to set + * @return the Contact object itself. + */ + public Contact withFax(String fax) { + this.fax = fax; + return this; + } + + /** + * Get job title. + * + * @return the jobTitle value + */ + public String jobTitle() { + return this.jobTitle; + } + + /** + * Set job title. + * + * @param jobTitle the jobTitle value to set + * @return the Contact object itself. + */ + public Contact withJobTitle(String jobTitle) { + this.jobTitle = jobTitle; + return this; + } + + /** + * Get first name. + * + * @return the nameFirst value + */ + public String nameFirst() { + return this.nameFirst; + } + + /** + * Set first name. + * + * @param nameFirst the nameFirst value to set + * @return the Contact object itself. + */ + public Contact withNameFirst(String nameFirst) { + this.nameFirst = nameFirst; + return this; + } + + /** + * Get last name. + * + * @return the nameLast value + */ + public String nameLast() { + return this.nameLast; + } + + /** + * Set last name. + * + * @param nameLast the nameLast value to set + * @return the Contact object itself. + */ + public Contact withNameLast(String nameLast) { + this.nameLast = nameLast; + return this; + } + + /** + * Get middle name. + * + * @return the nameMiddle value + */ + public String nameMiddle() { + return this.nameMiddle; + } + + /** + * Set middle name. + * + * @param nameMiddle the nameMiddle value to set + * @return the Contact object itself. + */ + public Contact withNameMiddle(String nameMiddle) { + this.nameMiddle = nameMiddle; + return this; + } + + /** + * Get organization contact belongs to. + * + * @return the organization value + */ + public String organization() { + return this.organization; + } + + /** + * Set organization contact belongs to. + * + * @param organization the organization value to set + * @return the Contact object itself. + */ + public Contact withOrganization(String organization) { + this.organization = organization; + return this; + } + + /** + * Get phone number. + * + * @return the phone value + */ + public String phone() { + return this.phone; + } + + /** + * Set phone number. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerCpuStatistics.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerCpuStatistics.java new file mode 100644 index 0000000000000..ddb8d19afeb15 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerCpuStatistics.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ContainerCpuStatistics model. + */ +public class ContainerCpuStatistics { + /** + * The cpuUsage property. + */ + @JsonProperty(value = "cpuUsage") + private ContainerCpuUsage cpuUsage; + + /** + * The systemCpuUsage property. + */ + @JsonProperty(value = "systemCpuUsage") + private Long systemCpuUsage; + + /** + * The onlineCpuCount property. + */ + @JsonProperty(value = "onlineCpuCount") + private Integer onlineCpuCount; + + /** + * The throttlingData property. + */ + @JsonProperty(value = "throttlingData") + private ContainerThrottlingData throttlingData; + + /** + * Get the cpuUsage value. + * + * @return the cpuUsage value + */ + public ContainerCpuUsage cpuUsage() { + return this.cpuUsage; + } + + /** + * Set the cpuUsage value. + * + * @param cpuUsage the cpuUsage value to set + * @return the ContainerCpuStatistics object itself. + */ + public ContainerCpuStatistics withCpuUsage(ContainerCpuUsage cpuUsage) { + this.cpuUsage = cpuUsage; + return this; + } + + /** + * Get the systemCpuUsage value. + * + * @return the systemCpuUsage value + */ + public Long systemCpuUsage() { + return this.systemCpuUsage; + } + + /** + * Set the systemCpuUsage value. + * + * @param systemCpuUsage the systemCpuUsage value to set + * @return the ContainerCpuStatistics object itself. + */ + public ContainerCpuStatistics withSystemCpuUsage(Long systemCpuUsage) { + this.systemCpuUsage = systemCpuUsage; + return this; + } + + /** + * Get the onlineCpuCount value. + * + * @return the onlineCpuCount value + */ + public Integer onlineCpuCount() { + return this.onlineCpuCount; + } + + /** + * Set the onlineCpuCount value. + * + * @param onlineCpuCount the onlineCpuCount value to set + * @return the ContainerCpuStatistics object itself. + */ + public ContainerCpuStatistics withOnlineCpuCount(Integer onlineCpuCount) { + this.onlineCpuCount = onlineCpuCount; + return this; + } + + /** + * Get the throttlingData value. + * + * @return the throttlingData value + */ + public ContainerThrottlingData throttlingData() { + return this.throttlingData; + } + + /** + * Set the throttlingData value. + * + * @param throttlingData the throttlingData value to set + * @return the ContainerCpuStatistics object itself. + */ + public ContainerCpuStatistics withThrottlingData(ContainerThrottlingData throttlingData) { + this.throttlingData = throttlingData; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerCpuUsage.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerCpuUsage.java new file mode 100644 index 0000000000000..bd6d20b162be2 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerCpuUsage.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.appservice.v2019_08_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ContainerCpuUsage model. + */ +public class ContainerCpuUsage { + /** + * The totalUsage property. + */ + @JsonProperty(value = "totalUsage") + private Long totalUsage; + + /** + * The perCpuUsage property. + */ + @JsonProperty(value = "perCpuUsage") + private List perCpuUsage; + + /** + * The kernelModeUsage property. + */ + @JsonProperty(value = "kernelModeUsage") + private Long kernelModeUsage; + + /** + * The userModeUsage property. + */ + @JsonProperty(value = "userModeUsage") + private Long userModeUsage; + + /** + * Get the totalUsage value. + * + * @return the totalUsage value + */ + public Long totalUsage() { + return this.totalUsage; + } + + /** + * Set the totalUsage value. + * + * @param totalUsage the totalUsage value to set + * @return the ContainerCpuUsage object itself. + */ + public ContainerCpuUsage withTotalUsage(Long totalUsage) { + this.totalUsage = totalUsage; + return this; + } + + /** + * Get the perCpuUsage value. + * + * @return the perCpuUsage value + */ + public List perCpuUsage() { + return this.perCpuUsage; + } + + /** + * Set the perCpuUsage value. + * + * @param perCpuUsage the perCpuUsage value to set + * @return the ContainerCpuUsage object itself. + */ + public ContainerCpuUsage withPerCpuUsage(List perCpuUsage) { + this.perCpuUsage = perCpuUsage; + return this; + } + + /** + * Get the kernelModeUsage value. + * + * @return the kernelModeUsage value + */ + public Long kernelModeUsage() { + return this.kernelModeUsage; + } + + /** + * Set the kernelModeUsage value. + * + * @param kernelModeUsage the kernelModeUsage value to set + * @return the ContainerCpuUsage object itself. + */ + public ContainerCpuUsage withKernelModeUsage(Long kernelModeUsage) { + this.kernelModeUsage = kernelModeUsage; + return this; + } + + /** + * Get the userModeUsage value. + * + * @return the userModeUsage value + */ + public Long userModeUsage() { + return this.userModeUsage; + } + + /** + * Set the userModeUsage value. + * + * @param userModeUsage the userModeUsage value to set + * @return the ContainerCpuUsage object itself. + */ + public ContainerCpuUsage withUserModeUsage(Long userModeUsage) { + this.userModeUsage = userModeUsage; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerInfo.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerInfo.java new file mode 100644 index 0000000000000..3d277c993b37a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerInfo.java @@ -0,0 +1,226 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ContainerInfo model. + */ +public class ContainerInfo { + /** + * The currentTimeStamp property. + */ + @JsonProperty(value = "currentTimeStamp") + private DateTime currentTimeStamp; + + /** + * The previousTimeStamp property. + */ + @JsonProperty(value = "previousTimeStamp") + private DateTime previousTimeStamp; + + /** + * The currentCpuStats property. + */ + @JsonProperty(value = "currentCpuStats") + private ContainerCpuStatistics currentCpuStats; + + /** + * The previousCpuStats property. + */ + @JsonProperty(value = "previousCpuStats") + private ContainerCpuStatistics previousCpuStats; + + /** + * The memoryStats property. + */ + @JsonProperty(value = "memoryStats") + private ContainerMemoryStatistics memoryStats; + + /** + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The id property. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The eth0 property. + */ + @JsonProperty(value = "eth0") + private ContainerNetworkInterfaceStatistics eth0; + + /** + * Get the currentTimeStamp value. + * + * @return the currentTimeStamp value + */ + public DateTime currentTimeStamp() { + return this.currentTimeStamp; + } + + /** + * Set the currentTimeStamp value. + * + * @param currentTimeStamp the currentTimeStamp value to set + * @return the ContainerInfo object itself. + */ + public ContainerInfo withCurrentTimeStamp(DateTime currentTimeStamp) { + this.currentTimeStamp = currentTimeStamp; + return this; + } + + /** + * Get the previousTimeStamp value. + * + * @return the previousTimeStamp value + */ + public DateTime previousTimeStamp() { + return this.previousTimeStamp; + } + + /** + * Set the previousTimeStamp value. + * + * @param previousTimeStamp the previousTimeStamp value to set + * @return the ContainerInfo object itself. + */ + public ContainerInfo withPreviousTimeStamp(DateTime previousTimeStamp) { + this.previousTimeStamp = previousTimeStamp; + return this; + } + + /** + * Get the currentCpuStats value. + * + * @return the currentCpuStats value + */ + public ContainerCpuStatistics currentCpuStats() { + return this.currentCpuStats; + } + + /** + * Set the currentCpuStats value. + * + * @param currentCpuStats the currentCpuStats value to set + * @return the ContainerInfo object itself. + */ + public ContainerInfo withCurrentCpuStats(ContainerCpuStatistics currentCpuStats) { + this.currentCpuStats = currentCpuStats; + return this; + } + + /** + * Get the previousCpuStats value. + * + * @return the previousCpuStats value + */ + public ContainerCpuStatistics previousCpuStats() { + return this.previousCpuStats; + } + + /** + * Set the previousCpuStats value. + * + * @param previousCpuStats the previousCpuStats value to set + * @return the ContainerInfo object itself. + */ + public ContainerInfo withPreviousCpuStats(ContainerCpuStatistics previousCpuStats) { + this.previousCpuStats = previousCpuStats; + return this; + } + + /** + * Get the memoryStats value. + * + * @return the memoryStats value + */ + public ContainerMemoryStatistics memoryStats() { + return this.memoryStats; + } + + /** + * Set the memoryStats value. + * + * @param memoryStats the memoryStats value to set + * @return the ContainerInfo object itself. + */ + public ContainerInfo withMemoryStats(ContainerMemoryStatistics memoryStats) { + this.memoryStats = memoryStats; + 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 ContainerInfo object itself. + */ + public ContainerInfo withName(String name) { + this.name = name; + 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 ContainerInfo object itself. + */ + public ContainerInfo withId(String id) { + this.id = id; + return this; + } + + /** + * Get the eth0 value. + * + * @return the eth0 value + */ + public ContainerNetworkInterfaceStatistics eth0() { + return this.eth0; + } + + /** + * Set the eth0 value. + * + * @param eth0 the eth0 value to set + * @return the ContainerInfo object itself. + */ + public ContainerInfo withEth0(ContainerNetworkInterfaceStatistics eth0) { + this.eth0 = eth0; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerMemoryStatistics.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerMemoryStatistics.java new file mode 100644 index 0000000000000..b263db6b4c3cf --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerMemoryStatistics.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ContainerMemoryStatistics model. + */ +public class ContainerMemoryStatistics { + /** + * The usage property. + */ + @JsonProperty(value = "usage") + private Long usage; + + /** + * The maxUsage property. + */ + @JsonProperty(value = "maxUsage") + private Long maxUsage; + + /** + * The limit property. + */ + @JsonProperty(value = "limit") + private Long limit; + + /** + * Get the usage value. + * + * @return the usage value + */ + public Long usage() { + return this.usage; + } + + /** + * Set the usage value. + * + * @param usage the usage value to set + * @return the ContainerMemoryStatistics object itself. + */ + public ContainerMemoryStatistics withUsage(Long usage) { + this.usage = usage; + return this; + } + + /** + * Get the maxUsage value. + * + * @return the maxUsage value + */ + public Long maxUsage() { + return this.maxUsage; + } + + /** + * Set the maxUsage value. + * + * @param maxUsage the maxUsage value to set + * @return the ContainerMemoryStatistics object itself. + */ + public ContainerMemoryStatistics withMaxUsage(Long maxUsage) { + this.maxUsage = maxUsage; + 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 ContainerMemoryStatistics object itself. + */ + public ContainerMemoryStatistics withLimit(Long limit) { + this.limit = limit; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerNetworkInterfaceStatistics.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerNetworkInterfaceStatistics.java new file mode 100644 index 0000000000000..5daa2db17d80a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerNetworkInterfaceStatistics.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ContainerNetworkInterfaceStatistics model. + */ +public class ContainerNetworkInterfaceStatistics { + /** + * The rxBytes property. + */ + @JsonProperty(value = "rxBytes") + private Long rxBytes; + + /** + * The rxPackets property. + */ + @JsonProperty(value = "rxPackets") + private Long rxPackets; + + /** + * The rxErrors property. + */ + @JsonProperty(value = "rxErrors") + private Long rxErrors; + + /** + * The rxDropped property. + */ + @JsonProperty(value = "rxDropped") + private Long rxDropped; + + /** + * The txBytes property. + */ + @JsonProperty(value = "txBytes") + private Long txBytes; + + /** + * The txPackets property. + */ + @JsonProperty(value = "txPackets") + private Long txPackets; + + /** + * The txErrors property. + */ + @JsonProperty(value = "txErrors") + private Long txErrors; + + /** + * The txDropped property. + */ + @JsonProperty(value = "txDropped") + private Long txDropped; + + /** + * Get the rxBytes value. + * + * @return the rxBytes value + */ + public Long rxBytes() { + return this.rxBytes; + } + + /** + * Set the rxBytes value. + * + * @param rxBytes the rxBytes value to set + * @return the ContainerNetworkInterfaceStatistics object itself. + */ + public ContainerNetworkInterfaceStatistics withRxBytes(Long rxBytes) { + this.rxBytes = rxBytes; + return this; + } + + /** + * Get the rxPackets value. + * + * @return the rxPackets value + */ + public Long rxPackets() { + return this.rxPackets; + } + + /** + * Set the rxPackets value. + * + * @param rxPackets the rxPackets value to set + * @return the ContainerNetworkInterfaceStatistics object itself. + */ + public ContainerNetworkInterfaceStatistics withRxPackets(Long rxPackets) { + this.rxPackets = rxPackets; + return this; + } + + /** + * Get the rxErrors value. + * + * @return the rxErrors value + */ + public Long rxErrors() { + return this.rxErrors; + } + + /** + * Set the rxErrors value. + * + * @param rxErrors the rxErrors value to set + * @return the ContainerNetworkInterfaceStatistics object itself. + */ + public ContainerNetworkInterfaceStatistics withRxErrors(Long rxErrors) { + this.rxErrors = rxErrors; + return this; + } + + /** + * Get the rxDropped value. + * + * @return the rxDropped value + */ + public Long rxDropped() { + return this.rxDropped; + } + + /** + * Set the rxDropped value. + * + * @param rxDropped the rxDropped value to set + * @return the ContainerNetworkInterfaceStatistics object itself. + */ + public ContainerNetworkInterfaceStatistics withRxDropped(Long rxDropped) { + this.rxDropped = rxDropped; + return this; + } + + /** + * Get the txBytes value. + * + * @return the txBytes value + */ + public Long txBytes() { + return this.txBytes; + } + + /** + * Set the txBytes value. + * + * @param txBytes the txBytes value to set + * @return the ContainerNetworkInterfaceStatistics object itself. + */ + public ContainerNetworkInterfaceStatistics withTxBytes(Long txBytes) { + this.txBytes = txBytes; + return this; + } + + /** + * Get the txPackets value. + * + * @return the txPackets value + */ + public Long txPackets() { + return this.txPackets; + } + + /** + * Set the txPackets value. + * + * @param txPackets the txPackets value to set + * @return the ContainerNetworkInterfaceStatistics object itself. + */ + public ContainerNetworkInterfaceStatistics withTxPackets(Long txPackets) { + this.txPackets = txPackets; + return this; + } + + /** + * Get the txErrors value. + * + * @return the txErrors value + */ + public Long txErrors() { + return this.txErrors; + } + + /** + * Set the txErrors value. + * + * @param txErrors the txErrors value to set + * @return the ContainerNetworkInterfaceStatistics object itself. + */ + public ContainerNetworkInterfaceStatistics withTxErrors(Long txErrors) { + this.txErrors = txErrors; + return this; + } + + /** + * Get the txDropped value. + * + * @return the txDropped value + */ + public Long txDropped() { + return this.txDropped; + } + + /** + * Set the txDropped value. + * + * @param txDropped the txDropped value to set + * @return the ContainerNetworkInterfaceStatistics object itself. + */ + public ContainerNetworkInterfaceStatistics withTxDropped(Long txDropped) { + this.txDropped = txDropped; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerThrottlingData.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerThrottlingData.java new file mode 100644 index 0000000000000..89b08707f544b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContainerThrottlingData.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ContainerThrottlingData model. + */ +public class ContainerThrottlingData { + /** + * The periods property. + */ + @JsonProperty(value = "periods") + private Integer periods; + + /** + * The throttledPeriods property. + */ + @JsonProperty(value = "throttledPeriods") + private Integer throttledPeriods; + + /** + * The throttledTime property. + */ + @JsonProperty(value = "throttledTime") + private Integer throttledTime; + + /** + * Get the periods value. + * + * @return the periods value + */ + public Integer periods() { + return this.periods; + } + + /** + * Set the periods value. + * + * @param periods the periods value to set + * @return the ContainerThrottlingData object itself. + */ + public ContainerThrottlingData withPeriods(Integer periods) { + this.periods = periods; + return this; + } + + /** + * Get the throttledPeriods value. + * + * @return the throttledPeriods value + */ + public Integer throttledPeriods() { + return this.throttledPeriods; + } + + /** + * Set the throttledPeriods value. + * + * @param throttledPeriods the throttledPeriods value to set + * @return the ContainerThrottlingData object itself. + */ + public ContainerThrottlingData withThrottledPeriods(Integer throttledPeriods) { + this.throttledPeriods = throttledPeriods; + return this; + } + + /** + * Get the throttledTime value. + * + * @return the throttledTime value + */ + public Integer throttledTime() { + return this.throttledTime; + } + + /** + * Set the throttledTime value. + * + * @param throttledTime the throttledTime value to set + * @return the ContainerThrottlingData object itself. + */ + public ContainerThrottlingData withThrottledTime(Integer throttledTime) { + this.throttledTime = throttledTime; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContinuousWebJob.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContinuousWebJob.java new file mode 100644 index 0000000000000..29aaaa378edea --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContinuousWebJob.java @@ -0,0 +1,93 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.ContinuousWebJobInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.Map; + +/** + * Type representing ContinuousWebJob. + */ +public interface ContinuousWebJob extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the detailedStatus value. + */ + String detailedStatus(); + + /** + * @return the error value. + */ + String error(); + + /** + * @return the extraInfoUrl value. + */ + String extraInfoUrl(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the logUrl value. + */ + String logUrl(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the runCommand value. + */ + String runCommand(); + + /** + * @return the settings value. + */ + Map settings(); + + /** + * @return the status value. + */ + ContinuousWebJobStatus status(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the url value. + */ + String url(); + + /** + * @return the usingSdk value. + */ + Boolean usingSdk(); + + /** + * @return the webJobType value. + */ + WebJobType webJobType(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContinuousWebJobStatus.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ContinuousWebJobStatus.java new file mode 100644 index 0000000000000..d7eb970745471 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CorsSettings.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CorsSettings.java new file mode 100644 index 0000000000000..3c0492d209c2a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CorsSettings.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.appservice.v2019_08_01; + +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; + + /** + * Gets or sets whether CORS requests with credentials are allowed. See + * https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials + * for more details. + */ + @JsonProperty(value = "supportCredentials") + private Boolean supportCredentials; + + /** + * Get 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. + * + * @return the allowedOrigins value + */ + public List allowedOrigins() { + return this.allowedOrigins; + } + + /** + * Set 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. + * + * @param allowedOrigins the allowedOrigins value to set + * @return the CorsSettings object itself. + */ + public CorsSettings withAllowedOrigins(List allowedOrigins) { + this.allowedOrigins = allowedOrigins; + return this; + } + + /** + * Get gets or sets whether CORS requests with credentials are allowed. See + https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials + for more details. + * + * @return the supportCredentials value + */ + public Boolean supportCredentials() { + return this.supportCredentials; + } + + /** + * Set gets or sets whether CORS requests with credentials are allowed. See + https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials + for more details. + * + * @param supportCredentials the supportCredentials value to set + * @return the CorsSettings object itself. + */ + public CorsSettings withSupportCredentials(Boolean supportCredentials) { + this.supportCredentials = supportCredentials; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmCopySlotEntity.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmCopySlotEntity.java new file mode 100644 index 0000000000000..ff86923bf2da3 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmCopySlotEntity.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Copy deployment slot parameters. + */ +public class CsmCopySlotEntity { + /** + * Destination deployment slot during copy operation. + */ + @JsonProperty(value = "targetSlot", required = true) + private String targetSlot; + + /** + * The site object which will be merged with the source slot site + * to produce new destination slot site object. + * <code>null</code> to just copy source slot content. + * Otherwise a <code>Site</code> + * object with properties to override source slot site. + */ + @JsonProperty(value = "siteConfig", required = true) + private SiteConfig siteConfig; + + /** + * Get destination deployment slot during copy operation. + * + * @return the targetSlot value + */ + public String targetSlot() { + return this.targetSlot; + } + + /** + * Set destination deployment slot during copy operation. + * + * @param targetSlot the targetSlot value to set + * @return the CsmCopySlotEntity object itself. + */ + public CsmCopySlotEntity withTargetSlot(String targetSlot) { + this.targetSlot = targetSlot; + return this; + } + + /** + * Get the site object which will be merged with the source slot site + to produce new destination slot site object. + <code>null</code> to just copy source slot content. Otherwise a <code>Site</code> + object with properties to override source slot site. + * + * @return the siteConfig value + */ + public SiteConfig siteConfig() { + return this.siteConfig; + } + + /** + * Set the site object which will be merged with the source slot site + to produce new destination slot site object. + <code>null</code> to just copy source slot content. Otherwise a <code>Site</code> + object with properties to override source slot site. + * + * @param siteConfig the siteConfig value to set + * @return the CsmCopySlotEntity object itself. + */ + public CsmCopySlotEntity withSiteConfig(SiteConfig siteConfig) { + this.siteConfig = siteConfig; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmMoveResourceEnvelope.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmMoveResourceEnvelope.java new file mode 100644 index 0000000000000..92be43b313af9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmMoveResourceEnvelope.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.appservice.v2019_08_01; + +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 CsmMoveResourceEnvelope { + /** + * 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 CsmMoveResourceEnvelope object itself. + */ + public CsmMoveResourceEnvelope 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 CsmMoveResourceEnvelope object itself. + */ + public CsmMoveResourceEnvelope withResources(List resources) { + this.resources = resources; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmOperationDescription.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmOperationDescription.java new file mode 100644 index 0000000000000..57bd4267df4d9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmOperationDescription.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CsmOperationDescriptionInner; + +/** + * Type representing CsmOperationDescription. + */ +public interface CsmOperationDescription extends HasInner, HasManager { + /** + * @return the display value. + */ + CsmOperationDisplay display(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the origin value. + */ + String origin(); + + /** + * @return the properties value. + */ + CsmOperationDescriptionProperties properties(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmOperationDescriptionProperties.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmOperationDescriptionProperties.java new file mode 100644 index 0000000000000..7710088c48761 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmOperationDisplay.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmOperationDisplay.java new file mode 100644 index 0000000000000..e1fbe936a6283 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmPublishingCredentialsPoliciesCollection.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmPublishingCredentialsPoliciesCollection.java new file mode 100644 index 0000000000000..baf1e3cc24e1f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmPublishingCredentialsPoliciesCollection.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CsmPublishingCredentialsPoliciesCollectionInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CsmPublishingCredentialsPoliciesEntityInner; + +/** + * Type representing CsmPublishingCredentialsPoliciesCollection. + */ +public interface CsmPublishingCredentialsPoliciesCollection extends HasInner, HasManager { + /** + * @return the ftp value. + */ + CsmPublishingCredentialsPoliciesEntityInner ftp(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the scm value. + */ + CsmPublishingCredentialsPoliciesEntityInner scm(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmPublishingCredentialsPoliciesEntity.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmPublishingCredentialsPoliciesEntity.java new file mode 100644 index 0000000000000..b2a85a39ac28e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmPublishingCredentialsPoliciesEntity.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CsmPublishingCredentialsPoliciesEntityInner; + +/** + * Type representing CsmPublishingCredentialsPoliciesEntity. + */ +public interface CsmPublishingCredentialsPoliciesEntity extends HasInner, HasManager { + /** + * @return the allow value. + */ + boolean allow(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmPublishingProfileOptions.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmPublishingProfileOptions.java new file mode 100644 index 0000000000000..a20c5d5cf7284 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmPublishingProfileOptions.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +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; + + /** + * Include the DisasterRecover endpoint if true. + */ + @JsonProperty(value = "includeDisasterRecoveryEndpoints") + private Boolean includeDisasterRecoveryEndpoints; + + /** + * Get name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp'. + * + * @return the format value + */ + public PublishingProfileFormat format() { + return this.format; + } + + /** + * Set name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp'. + * + * @param format the format value to set + * @return the CsmPublishingProfileOptions object itself. + */ + public CsmPublishingProfileOptions withFormat(PublishingProfileFormat format) { + this.format = format; + return this; + } + + /** + * Get include the DisasterRecover endpoint if true. + * + * @return the includeDisasterRecoveryEndpoints value + */ + public Boolean includeDisasterRecoveryEndpoints() { + return this.includeDisasterRecoveryEndpoints; + } + + /** + * Set include the DisasterRecover endpoint if true. + * + * @param includeDisasterRecoveryEndpoints the includeDisasterRecoveryEndpoints value to set + * @return the CsmPublishingProfileOptions object itself. + */ + public CsmPublishingProfileOptions withIncludeDisasterRecoveryEndpoints(Boolean includeDisasterRecoveryEndpoints) { + this.includeDisasterRecoveryEndpoints = includeDisasterRecoveryEndpoints; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmSlotEntity.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmSlotEntity.java new file mode 100644 index 0000000000000..f7d426d40f442 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CsmSlotEntity.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Deployment slot parameters. + */ +public class CsmSlotEntity { + /** + * 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 destination deployment slot during swap operation. + * + * @return the targetSlot value + */ + public String targetSlot() { + return this.targetSlot; + } + + /** + * Set destination deployment slot during swap operation. + * + * @param targetSlot the targetSlot value to set + * @return the CsmSlotEntity object itself. + */ + public CsmSlotEntity withTargetSlot(String targetSlot) { + this.targetSlot = targetSlot; + return this; + } + + /** + * Get <code>true</code> to preserve Virtual Network to the slot during swap; otherwise, <code>false</code>. + * + * @return the preserveVnet value + */ + public boolean preserveVnet() { + return this.preserveVnet; + } + + /** + * Set <code>true</code> to preserve Virtual Network to the slot during swap; otherwise, <code>false</code>. + * + * @param preserveVnet the preserveVnet value to set + * @return the CsmSlotEntity object itself. + */ + public CsmSlotEntity withPreserveVnet(boolean preserveVnet) { + this.preserveVnet = preserveVnet; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CustomHostNameDnsRecordType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CustomHostNameDnsRecordType.java new file mode 100644 index 0000000000000..413f07ea464e1 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CustomHostnameAnalysisResult.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CustomHostnameAnalysisResult.java new file mode 100644 index 0000000000000..84ade36f5087e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/CustomHostnameAnalysisResult.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CustomHostnameAnalysisResultInner; +import java.util.List; + +/** + * Type representing CustomHostnameAnalysisResult. + */ +public interface CustomHostnameAnalysisResult extends HasInner, HasManager { + /** + * @return the alternateCNameRecords value. + */ + List alternateCNameRecords(); + + /** + * @return the alternateTxtRecords value. + */ + List alternateTxtRecords(); + + /** + * @return the aRecords value. + */ + List aRecords(); + + /** + * @return the cNameRecords value. + */ + List cNameRecords(); + + /** + * @return the conflictingAppResourceId value. + */ + String conflictingAppResourceId(); + + /** + * @return the customDomainVerificationFailureInfo value. + */ + ErrorEntity customDomainVerificationFailureInfo(); + + /** + * @return the customDomainVerificationTest value. + */ + DnsVerificationTestResult customDomainVerificationTest(); + + /** + * @return the hasConflictAcrossSubscription value. + */ + Boolean hasConflictAcrossSubscription(); + + /** + * @return the hasConflictOnScaleUnit value. + */ + Boolean hasConflictOnScaleUnit(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the isHostnameAlreadyVerified value. + */ + Boolean isHostnameAlreadyVerified(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the txtRecords value. + */ + List txtRecords(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DataSource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DataSource.java new file mode 100644 index 0000000000000..dd3ba1ade146f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Class representing data source used by the detectors. + */ +public class DataSource { + /** + * Instructions if any for the data source. + */ + @JsonProperty(value = "instructions") + private List instructions; + + /** + * Datasource Uri Links. + */ + @JsonProperty(value = "dataSourceUri") + private List dataSourceUri; + + /** + * Get instructions if any for the data source. + * + * @return the instructions value + */ + public List instructions() { + return this.instructions; + } + + /** + * Set instructions if any for the data source. + * + * @param instructions the instructions value to set + * @return the DataSource object itself. + */ + public DataSource withInstructions(List instructions) { + this.instructions = instructions; + return this; + } + + /** + * Get datasource Uri Links. + * + * @return the dataSourceUri value + */ + public List dataSourceUri() { + return this.dataSourceUri; + } + + /** + * Set datasource Uri Links. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DataTableResponseColumn.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DataTableResponseColumn.java new file mode 100644 index 0000000000000..d1634a7d98b55 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DataTableResponseColumn.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Column definition. + */ +public class DataTableResponseColumn { + /** + * Name of the column. + */ + @JsonProperty(value = "columnName") + private String columnName; + + /** + * Data type which looks like 'String' or 'Int32'. + */ + @JsonProperty(value = "dataType") + private String dataType; + + /** + * Column Type. + */ + @JsonProperty(value = "columnType") + private String columnType; + + /** + * Get name of the column. + * + * @return the columnName value + */ + public String columnName() { + return this.columnName; + } + + /** + * Set name of the column. + * + * @param columnName the columnName value to set + * @return the DataTableResponseColumn object itself. + */ + public DataTableResponseColumn withColumnName(String columnName) { + this.columnName = columnName; + return this; + } + + /** + * Get data type which looks like 'String' or 'Int32'. + * + * @return the dataType value + */ + public String dataType() { + return this.dataType; + } + + /** + * Set data type which looks like 'String' or 'Int32'. + * + * @param dataType the dataType value to set + * @return the DataTableResponseColumn object itself. + */ + public DataTableResponseColumn withDataType(String dataType) { + this.dataType = dataType; + return this; + } + + /** + * Get column Type. + * + * @return the columnType value + */ + public String columnType() { + return this.columnType; + } + + /** + * Set column Type. + * + * @param columnType the columnType value to set + * @return the DataTableResponseColumn object itself. + */ + public DataTableResponseColumn withColumnType(String columnType) { + this.columnType = columnType; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DataTableResponseObject.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DataTableResponseObject.java new file mode 100644 index 0000000000000..1ee3af162076e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DataTableResponseObject.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.appservice.v2019_08_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Data Table which defines columns and raw row values. + */ +public class DataTableResponseObject { + /** + * Name of the table. + */ + @JsonProperty(value = "tableName") + private String tableName; + + /** + * List of columns with data types. + */ + @JsonProperty(value = "columns") + private List columns; + + /** + * Raw row values. + */ + @JsonProperty(value = "rows") + private List> rows; + + /** + * Get name of the table. + * + * @return the tableName value + */ + public String tableName() { + return this.tableName; + } + + /** + * Set name of the table. + * + * @param tableName the tableName value to set + * @return the DataTableResponseObject object itself. + */ + public DataTableResponseObject withTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get list of columns with data types. + * + * @return the columns value + */ + public List columns() { + return this.columns; + } + + /** + * Set list of columns with data types. + * + * @param columns the columns value to set + * @return the DataTableResponseObject object itself. + */ + public DataTableResponseObject withColumns(List columns) { + this.columns = columns; + return this; + } + + /** + * Get raw row values. + * + * @return the rows value + */ + public List> rows() { + return this.rows; + } + + /** + * Set raw row values. + * + * @param rows the rows value to set + * @return the DataTableResponseObject object itself. + */ + public DataTableResponseObject withRows(List> rows) { + this.rows = rows; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DatabaseBackupSetting.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DatabaseBackupSetting.java new file mode 100644 index 0000000000000..9f57194374fd8 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DatabaseBackupSetting.java @@ -0,0 +1,128 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +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 database type (e.g. SqlAzure / MySql). Possible values include: 'SqlAzure', 'MySql', 'LocalMySql', 'PostgreSql'. + * + * @return the databaseType value + */ + public DatabaseType databaseType() { + return this.databaseType; + } + + /** + * Set database type (e.g. SqlAzure / MySql). Possible values include: 'SqlAzure', 'MySql', 'LocalMySql', 'PostgreSql'. + * + * @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 contains a connection string name that is linked to the SiteConfig.ConnectionStrings. + This is used during restore with overwrite connection strings options. + * + * @return the connectionStringName value + */ + public String connectionStringName() { + return this.connectionStringName; + } + + /** + * Set contains a connection string name that is linked to the SiteConfig.ConnectionStrings. + This is used during restore with overwrite connection strings options. + * + * @param connectionStringName the connectionStringName value to set + * @return the DatabaseBackupSetting object itself. + */ + public DatabaseBackupSetting withConnectionStringName(String connectionStringName) { + this.connectionStringName = connectionStringName; + return this; + } + + /** + * Get 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. + * + * @return the connectionString value + */ + public String connectionString() { + return this.connectionString; + } + + /** + * Set 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. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DatabaseType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DatabaseType.java new file mode 100644 index 0000000000000..af5dc48f42c3f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DefaultErrorResponse.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DefaultErrorResponse.java new file mode 100644 index 0000000000000..12f106400ba40 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DefaultErrorResponse.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * App Service error response. + */ +public class DefaultErrorResponse { + /** + * Error model. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private DefaultErrorResponseError error; + + /** + * Get error model. + * + * @return the error value + */ + public DefaultErrorResponseError error() { + return this.error; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DefaultErrorResponseError.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DefaultErrorResponseError.java new file mode 100644 index 0000000000000..74c9b9ca3b038 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DefaultErrorResponseError.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error model. + */ +public class DefaultErrorResponseError { + /** + * Standardized string to programmatically identify the error. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /** + * Detailed error description and debugging information. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Detailed error description and debugging information. + */ + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) + private String target; + + /** + * The details property. + */ + @JsonProperty(value = "details") + private List details; + + /** + * More information to debug error. + */ + @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) + private String innererror; + + /** + * Get standardized string to programmatically identify the error. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Get detailed error description and debugging information. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get detailed error description and debugging information. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Get the details value. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set the details value. + * + * @param details the details value to set + * @return the DefaultErrorResponseError object itself. + */ + public DefaultErrorResponseError withDetails(List details) { + this.details = details; + return this; + } + + /** + * Get more information to debug error. + * + * @return the innererror value + */ + public String innererror() { + return this.innererror; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DefaultErrorResponseErrorDetailsItem.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DefaultErrorResponseErrorDetailsItem.java new file mode 100644 index 0000000000000..9030a4ce85bdf --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DefaultErrorResponseErrorDetailsItem.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Detailed errors. + */ +public class DefaultErrorResponseErrorDetailsItem { + /** + * Standardized string to programmatically identify the error. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /** + * Detailed error description and debugging information. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Detailed error description and debugging information. + */ + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) + private String target; + + /** + * Get standardized string to programmatically identify the error. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Get detailed error description and debugging information. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get detailed error description and debugging information. + * + * @return the target value + */ + public String target() { + return this.target; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DefaultErrorResponseException.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DefaultErrorResponseException.java new file mode 100644 index 0000000000000..3882fd282eb28 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DefaultErrorResponseException.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.appservice.v2019_08_01; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with DefaultErrorResponse + * information. + */ +public class DefaultErrorResponseException extends RestException { + /** + * Initializes a new instance of the DefaultErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public DefaultErrorResponseException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the DefaultErrorResponseException 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 DefaultErrorResponseException(final String message, final Response response, final DefaultErrorResponse body) { + super(message, response, body); + } + + @Override + public DefaultErrorResponse body() { + return (DefaultErrorResponse) super.body(); + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DeletedAppRestoreRequest.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DeletedAppRestoreRequest.java new file mode 100644 index 0000000000000..6ed0bcd612de8 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DeletedAppRestoreRequest.java @@ -0,0 +1,131 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Details about restoring a deleted app. + */ +@JsonFlatten +public class DeletedAppRestoreRequest extends ProxyOnlyResource { + /** + * ARM resource ID of the deleted app. Example: + * /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}. + */ + @JsonProperty(value = "properties.deletedSiteId") + private String deletedSiteId; + + /** + * If true, deleted site configuration, in addition to content, will be + * restored. + */ + @JsonProperty(value = "properties.recoverConfiguration") + private Boolean recoverConfiguration; + + /** + * Point in time to restore the deleted app from, formatted as a DateTime + * string. + * If unspecified, default value is the time that the app was deleted. + */ + @JsonProperty(value = "properties.snapshotTime") + private String snapshotTime; + + /** + * If true, the snapshot is retrieved from DRSecondary endpoint. + */ + @JsonProperty(value = "properties.useDRSecondary") + private Boolean useDRSecondary; + + /** + * Get aRM resource ID of the deleted app. Example: + /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}. + * + * @return the deletedSiteId value + */ + public String deletedSiteId() { + return this.deletedSiteId; + } + + /** + * Set aRM resource ID of the deleted app. Example: + /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}. + * + * @param deletedSiteId the deletedSiteId value to set + * @return the DeletedAppRestoreRequest object itself. + */ + public DeletedAppRestoreRequest withDeletedSiteId(String deletedSiteId) { + this.deletedSiteId = deletedSiteId; + return this; + } + + /** + * Get if true, deleted site configuration, in addition to content, will be restored. + * + * @return the recoverConfiguration value + */ + public Boolean recoverConfiguration() { + return this.recoverConfiguration; + } + + /** + * Set if true, deleted site configuration, in addition to content, will be restored. + * + * @param recoverConfiguration the recoverConfiguration value to set + * @return the DeletedAppRestoreRequest object itself. + */ + public DeletedAppRestoreRequest withRecoverConfiguration(Boolean recoverConfiguration) { + this.recoverConfiguration = recoverConfiguration; + return this; + } + + /** + * Get point in time to restore the deleted app from, formatted as a DateTime string. + If unspecified, default value is the time that the app was deleted. + * + * @return the snapshotTime value + */ + public String snapshotTime() { + return this.snapshotTime; + } + + /** + * Set point in time to restore the deleted app from, formatted as a DateTime string. + If unspecified, default value is the time that the app was deleted. + * + * @param snapshotTime the snapshotTime value to set + * @return the DeletedAppRestoreRequest object itself. + */ + public DeletedAppRestoreRequest withSnapshotTime(String snapshotTime) { + this.snapshotTime = snapshotTime; + return this; + } + + /** + * Get if true, the snapshot is retrieved from DRSecondary endpoint. + * + * @return the useDRSecondary value + */ + public Boolean useDRSecondary() { + return this.useDRSecondary; + } + + /** + * Set if true, the snapshot is retrieved from DRSecondary endpoint. + * + * @param useDRSecondary the useDRSecondary value to set + * @return the DeletedAppRestoreRequest object itself. + */ + public DeletedAppRestoreRequest withUseDRSecondary(Boolean useDRSecondary) { + this.useDRSecondary = useDRSecondary; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DeletedSite.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DeletedSite.java new file mode 100644 index 0000000000000..efd3738c3f966 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DeletedSite.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DeletedSiteInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing DeletedSite. + */ +public interface DeletedSite extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the deletedSiteId value. + */ + Integer deletedSiteId(); + + /** + * @return the deletedSiteKind value. + */ + String deletedSiteKind(); + + /** + * @return the deletedSiteName value. + */ + String deletedSiteName(); + + /** + * @return the deletedTimestamp value. + */ + String deletedTimestamp(); + + /** + * @return the geoRegionName value. + */ + String geoRegionName(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the resourceGroup value. + */ + String resourceGroup(); + + /** + * @return the slot value. + */ + String slot(); + + /** + * @return the subscription value. + */ + String subscription(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DeletedWebApps.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DeletedWebApps.java new file mode 100644 index 0000000000000..ef5b6b06af835 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DeletedWebApps.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.DeletedSite; + +/** + * Type representing DeletedWebApps. + */ +public interface DeletedWebApps { + /** + * Get deleted app for a subscription at location. + * Description for Get deleted app for a subscription at location. + * + * @param location the String value + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getDeletedWebAppByLocationAsync(String location, String deletedSiteId); + + /** + * Get all deleted apps for a subscription at location. + * Description for Get all deleted apps for a subscription at location. + * + * @param location the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByLocationAsync(final String location); + + /** + * Get all deleted apps for a subscription. + * Description for Get all deleted apps for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Deployment.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Deployment.java new file mode 100644 index 0000000000000..bffc50857aff4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Deployment.java @@ -0,0 +1,379 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DeploymentInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import org.joda.time.DateTime; + +/** + * Type representing Deployment. + */ +public interface Deployment extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the active value. + */ + Boolean active(); + + /** + * @return the author value. + */ + String author(); + + /** + * @return the authorEmail value. + */ + String authorEmail(); + + /** + * @return the deployer value. + */ + String deployer(); + + /** + * @return the details value. + */ + String details(); + + /** + * @return the endTime value. + */ + DateTime endTime(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the message value. + */ + String message(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the startTime value. + */ + DateTime startTime(); + + /** + * @return the status value. + */ + Integer status(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the Deployment definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithSite, DefinitionStages.WithCreate { + } + + /** + * Grouping of Deployment definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Deployment definition. + */ + interface Blank extends WithSite { + } + + /** + * The stage of the deployment definition allowing to specify Site. + */ + interface WithSite { + /** + * Specifies resourceGroupName, name. + * @param resourceGroupName Name of the resource group to which the resource belongs + * @param name Name of the app + * @return the next definition stage + */ + WithCreate withExistingSite(String resourceGroupName, String name); + } + + /** + * The stage of the deployment definition allowing to specify Active. + */ + interface WithActive { + /** + * Specifies active. + * @param active True if deployment is currently active, false if completed and null if not started + * @return the next definition stage + */ + WithCreate withActive(Boolean active); + } + + /** + * The stage of the deployment definition allowing to specify Author. + */ + interface WithAuthor { + /** + * Specifies author. + * @param author Who authored the deployment + * @return the next definition stage + */ + WithCreate withAuthor(String author); + } + + /** + * The stage of the deployment definition allowing to specify AuthorEmail. + */ + interface WithAuthorEmail { + /** + * Specifies authorEmail. + * @param authorEmail Author email + * @return the next definition stage + */ + WithCreate withAuthorEmail(String authorEmail); + } + + /** + * The stage of the deployment definition allowing to specify Deployer. + */ + interface WithDeployer { + /** + * Specifies deployer. + * @param deployer Who performed the deployment + * @return the next definition stage + */ + WithCreate withDeployer(String deployer); + } + + /** + * The stage of the deployment definition allowing to specify Details. + */ + interface WithDetails { + /** + * Specifies details. + * @param details Details on deployment + * @return the next definition stage + */ + WithCreate withDetails(String details); + } + + /** + * The stage of the deployment definition allowing to specify EndTime. + */ + interface WithEndTime { + /** + * Specifies endTime. + * @param endTime End time + * @return the next definition stage + */ + WithCreate withEndTime(DateTime endTime); + } + + /** + * The stage of the deployment definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the deployment definition allowing to specify Message. + */ + interface WithMessage { + /** + * Specifies message. + * @param message Details about deployment status + * @return the next definition stage + */ + WithCreate withMessage(String message); + } + + /** + * The stage of the deployment definition allowing to specify StartTime. + */ + interface WithStartTime { + /** + * Specifies startTime. + * @param startTime Start time + * @return the next definition stage + */ + WithCreate withStartTime(DateTime startTime); + } + + /** + * The stage of the deployment definition allowing to specify Status. + */ + interface WithStatus { + /** + * Specifies status. + * @param status Deployment status + * @return the next definition stage + */ + WithCreate withStatus(Integer status); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithActive, DefinitionStages.WithAuthor, DefinitionStages.WithAuthorEmail, DefinitionStages.WithDeployer, DefinitionStages.WithDetails, DefinitionStages.WithEndTime, DefinitionStages.WithKind, DefinitionStages.WithMessage, DefinitionStages.WithStartTime, DefinitionStages.WithStatus { + } + } + /** + * The template for a Deployment update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithActive, UpdateStages.WithAuthor, UpdateStages.WithAuthorEmail, UpdateStages.WithDeployer, UpdateStages.WithDetails, UpdateStages.WithEndTime, UpdateStages.WithKind, UpdateStages.WithMessage, UpdateStages.WithStartTime, UpdateStages.WithStatus { + } + + /** + * Grouping of Deployment update stages. + */ + interface UpdateStages { + /** + * The stage of the deployment update allowing to specify Active. + */ + interface WithActive { + /** + * Specifies active. + * @param active True if deployment is currently active, false if completed and null if not started + * @return the next update stage + */ + Update withActive(Boolean active); + } + + /** + * The stage of the deployment update allowing to specify Author. + */ + interface WithAuthor { + /** + * Specifies author. + * @param author Who authored the deployment + * @return the next update stage + */ + Update withAuthor(String author); + } + + /** + * The stage of the deployment update allowing to specify AuthorEmail. + */ + interface WithAuthorEmail { + /** + * Specifies authorEmail. + * @param authorEmail Author email + * @return the next update stage + */ + Update withAuthorEmail(String authorEmail); + } + + /** + * The stage of the deployment update allowing to specify Deployer. + */ + interface WithDeployer { + /** + * Specifies deployer. + * @param deployer Who performed the deployment + * @return the next update stage + */ + Update withDeployer(String deployer); + } + + /** + * The stage of the deployment update allowing to specify Details. + */ + interface WithDetails { + /** + * Specifies details. + * @param details Details on deployment + * @return the next update stage + */ + Update withDetails(String details); + } + + /** + * The stage of the deployment update allowing to specify EndTime. + */ + interface WithEndTime { + /** + * Specifies endTime. + * @param endTime End time + * @return the next update stage + */ + Update withEndTime(DateTime endTime); + } + + /** + * The stage of the deployment update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the deployment update allowing to specify Message. + */ + interface WithMessage { + /** + * Specifies message. + * @param message Details about deployment status + * @return the next update stage + */ + Update withMessage(String message); + } + + /** + * The stage of the deployment update allowing to specify StartTime. + */ + interface WithStartTime { + /** + * Specifies startTime. + * @param startTime Start time + * @return the next update stage + */ + Update withStartTime(DateTime startTime); + } + + /** + * The stage of the deployment update allowing to specify Status. + */ + interface WithStatus { + /** + * Specifies status. + * @param status Deployment status + * @return the next update stage + */ + Update withStatus(Integer status); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DetectorAbnormalTimePeriod.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DetectorAbnormalTimePeriod.java new file mode 100644 index 0000000000000..53d3f197be802 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 correlated event. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * End time of the correlated 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 start time of the correlated event. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set start time of the correlated event. + * + * @param startTime the startTime value to set + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get end time of the correlated event. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set end time of the correlated event. + * + * @param endTime the endTime value to set + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get message describing the event. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set message describing the event. + * + * @param message the message value to set + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get represents the name of the Detector. + * + * @return the source value + */ + public String source() { + return this.source; + } + + /** + * Set represents the name of the Detector. + * + * @param source the source value to set + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withSource(String source) { + this.source = source; + return this; + } + + /** + * Get represents the rank of the Detector. + * + * @return the priority value + */ + public Double priority() { + return this.priority; + } + + /** + * Set represents the rank of the Detector. + * + * @param priority the priority value to set + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withPriority(Double priority) { + this.priority = priority; + return this; + } + + /** + * Get downtime metadata. + * + * @return the metaData value + */ + public List> metaData() { + return this.metaData; + } + + /** + * Set downtime metadata. + * + * @param metaData the metaData value to set + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withMetaData(List> metaData) { + this.metaData = metaData; + return this; + } + + /** + * Get represents the type of the Detector. Possible values include: 'ServiceIncident', 'AppDeployment', 'AppCrash', 'RuntimeIssueDetected', 'AseDeployment', 'UserIssue', 'PlatformIssue', 'Other'. + * + * @return the type value + */ + public IssueType type() { + return this.type; + } + + /** + * Set represents the type of the Detector. Possible values include: 'ServiceIncident', 'AppDeployment', 'AppCrash', 'RuntimeIssueDetected', 'AseDeployment', 'UserIssue', 'PlatformIssue', 'Other'. + * + * @param type the type value to set + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withType(IssueType type) { + this.type = type; + return this; + } + + /** + * Get list of proposed solutions. + * + * @return the solutions value + */ + public List solutions() { + return this.solutions; + } + + /** + * Set list of proposed solutions. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DetectorDefinition.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DetectorDefinition.java new file mode 100644 index 0000000000000..be23de304066b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DetectorDefinition.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DetectorDefinitionInner; + +/** + * Type representing DetectorDefinition. + */ +public interface DetectorDefinition extends HasInner, HasManager { + /** + * @return the description value. + */ + String description(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the isEnabled value. + */ + Boolean isEnabled(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the rank value. + */ + Double rank(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DetectorInfo.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DetectorInfo.java new file mode 100644 index 0000000000000..91ae982e75e56 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DetectorInfo.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Definition of Detector. + */ +public class DetectorInfo { + /** + * Short description of the detector and its purpose. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Support Category. + */ + @JsonProperty(value = "category", access = JsonProperty.Access.WRITE_ONLY) + private String category; + + /** + * Support Sub Category. + */ + @JsonProperty(value = "subCategory", access = JsonProperty.Access.WRITE_ONLY) + private String subCategory; + + /** + * Support Topic Id. + */ + @JsonProperty(value = "supportTopicId", access = JsonProperty.Access.WRITE_ONLY) + private String supportTopicId; + + /** + * Get short description of the detector and its purpose. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Get support Category. + * + * @return the category value + */ + public String category() { + return this.category; + } + + /** + * Get support Sub Category. + * + * @return the subCategory value + */ + public String subCategory() { + return this.subCategory; + } + + /** + * Get support Topic Id. + * + * @return the supportTopicId value + */ + public String supportTopicId() { + return this.supportTopicId; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DetectorResponse.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DetectorResponse.java new file mode 100644 index 0000000000000..be949e89217c5 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DetectorResponse.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DetectorResponseInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; + +/** + * Type representing DetectorResponse. + */ +public interface DetectorResponse extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the dataset value. + */ + List dataset(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the metadata value. + */ + DetectorInfo metadata(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticAnalysis.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticAnalysis.java new file mode 100644 index 0000000000000..bf0553b9da5a8 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticAnalysis.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DiagnosticAnalysisInner; +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DetectorDefinitionInner; + +/** + * Type representing DiagnosticAnalysis. + */ +public interface DiagnosticAnalysis extends HasInner, HasManager { + /** + * @return the abnormalTimePeriods value. + */ + List abnormalTimePeriods(); + + /** + * @return the endTime value. + */ + DateTime endTime(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the nonCorrelatedDetectors value. + */ + List nonCorrelatedDetectors(); + + /** + * @return the payload value. + */ + List payload(); + + /** + * @return the startTime value. + */ + DateTime startTime(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticCategory.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticCategory.java new file mode 100644 index 0000000000000..f5c4c01a5b8ba --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticCategory.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DiagnosticCategoryInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing DiagnosticCategory. + */ +public interface DiagnosticCategory extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the description value. + */ + String description(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticData.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticData.java new file mode 100644 index 0000000000000..42097a8878152 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticData.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Set of data with rendering instructions. + */ +public class DiagnosticData { + /** + * Data in table form. + */ + @JsonProperty(value = "table") + private DataTableResponseObject table; + + /** + * Properties that describe how the table should be rendered. + */ + @JsonProperty(value = "renderingProperties") + private Rendering renderingProperties; + + /** + * Get data in table form. + * + * @return the table value + */ + public DataTableResponseObject table() { + return this.table; + } + + /** + * Set data in table form. + * + * @param table the table value to set + * @return the DiagnosticData object itself. + */ + public DiagnosticData withTable(DataTableResponseObject table) { + this.table = table; + return this; + } + + /** + * Get properties that describe how the table should be rendered. + * + * @return the renderingProperties value + */ + public Rendering renderingProperties() { + return this.renderingProperties; + } + + /** + * Set properties that describe how the table should be rendered. + * + * @param renderingProperties the renderingProperties value to set + * @return the DiagnosticData object itself. + */ + public DiagnosticData withRenderingProperties(Rendering renderingProperties) { + this.renderingProperties = renderingProperties; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticDetectorResponse.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticDetectorResponse.java new file mode 100644 index 0000000000000..b04e59c68f13d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticDetectorResponse.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DiagnosticDetectorResponseInner; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DetectorDefinitionInner; +import org.joda.time.DateTime; + +/** + * Type representing DiagnosticDetectorResponse. + */ +public interface DiagnosticDetectorResponse extends HasInner, HasManager { + /** + * @return the abnormalTimePeriods value. + */ + List abnormalTimePeriods(); + + /** + * @return the data value. + */ + List> data(); + + /** + * @return the detectorDefinition value. + */ + DetectorDefinitionInner detectorDefinition(); + + /** + * @return the endTime value. + */ + DateTime endTime(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the issueDetected value. + */ + Boolean issueDetected(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the metrics value. + */ + List metrics(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the responseMetaData value. + */ + ResponseMetaData responseMetaData(); + + /** + * @return the startTime value. + */ + DateTime startTime(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticMetricSample.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticMetricSample.java new file mode 100644 index 0000000000000..68dce1ea3b50a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticMetricSample.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +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 time at which metric is measured. + * + * @return the timestamp value + */ + public DateTime timestamp() { + return this.timestamp; + } + + /** + * Set time at which metric is measured. + * + * @param timestamp the timestamp value to set + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withTimestamp(DateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get 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. + * + * @return the roleInstance value + */ + public String roleInstance() { + return this.roleInstance; + } + + /** + * Set 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. + * + * @param roleInstance the roleInstance value to set + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withRoleInstance(String roleInstance) { + this.roleInstance = roleInstance; + return this; + } + + /** + * Get total value of the metric. If multiple measurements are made this will have sum of all. + * + * @return the total value + */ + public Double total() { + return this.total; + } + + /** + * Set total value of the metric. If multiple measurements are made this will have sum of all. + * + * @param total the total value to set + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withTotal(Double total) { + this.total = total; + return this; + } + + /** + * Get maximum of the metric sampled during the time period. + * + * @return the maximum value + */ + public Double maximum() { + return this.maximum; + } + + /** + * Set maximum of the metric sampled during the time period. + * + * @param maximum the maximum value to set + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withMaximum(Double maximum) { + this.maximum = maximum; + return this; + } + + /** + * Get minimum of the metric sampled during the time period. + * + * @return the minimum value + */ + public Double minimum() { + return this.minimum; + } + + /** + * Set minimum of the metric sampled during the time period. + * + * @param minimum the minimum value to set + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withMinimum(Double minimum) { + this.minimum = minimum; + return this; + } + + /** + * Get whether the values are aggregates across all workers or not. + * + * @return the isAggregated value + */ + public Boolean isAggregated() { + return this.isAggregated; + } + + /** + * Set whether the values are aggregates across all workers or not. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticMetricSet.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DiagnosticMetricSet.java new file mode 100644 index 0000000000000..c19ad37b8c668 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 name of the metric. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the metric. + * + * @param name the name value to set + * @return the DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet withName(String name) { + this.name = name; + return this; + } + + /** + * Get metric's unit. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set metric's unit. + * + * @param unit the unit value to set + * @return the DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get start time of the period. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set start time of the period. + * + * @param startTime the startTime value to set + * @return the DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get end time of the period. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set end time of the period. + * + * @param endTime the endTime value to set + * @return the DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get presented time grain. Supported grains at the moment are PT1M, PT1H, P1D. + * + * @return the timeGrain value + */ + public String timeGrain() { + return this.timeGrain; + } + + /** + * Set presented time grain. Supported grains at the moment are PT1M, PT1H, P1D. + * + * @param timeGrain the timeGrain value to set + * @return the DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet withTimeGrain(String timeGrain) { + this.timeGrain = timeGrain; + return this; + } + + /** + * Get collection of metric values for the selected period based on the {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain}. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Set collection of metric values for the selected period based on the {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain}. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Diagnostics.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Diagnostics.java new file mode 100644 index 0000000000000..2551d4a4d5740 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Diagnostics.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.appservice.v2019_08_01; + +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DiagnosticsInner; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.DetectorResponse; +import com.microsoft.azure.management.appservice.v2019_08_01.AnalysisDefinition; + +/** + * Type representing Diagnostics. + */ +public interface Diagnostics extends HasInner { + /** + * Get Diagnostics Categories. + * Description for 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 for the request + */ + Observable listSiteDiagnosticCategoriesSlotAsync(final String resourceGroupName, final String siteName, final String slot); + + /** + * Get Diagnostics Category. + * Description for 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 for the request + */ + Observable getSiteDiagnosticCategorySlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String slot); + + /** + * Get Diagnostics Category. + * Description for 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 for the request + */ + Observable getSiteDiagnosticCategoryAsync(String resourceGroupName, String siteName, String diagnosticCategory); + + /** + * Get Diagnostics Categories. + * Description for 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 for the request + */ + Observable listSiteDiagnosticCategoriesAsync(final String resourceGroupName, final String siteName); + + /** + * Get Hosting Environment Detector Response. + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name + * @param detectorName Detector Resource Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getHostingEnvironmentDetectorResponseAsync(String resourceGroupName, String name, String detectorName); + + /** + * List Hosting Environment Detector Responses. + * Description for List Hosting Environment Detector Responses. + * + * @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 for the request + */ + Observable listHostingEnvironmentDetectorResponsesAsync(final String resourceGroupName, final String name); + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @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 for the request + */ + Observable listSiteDetectorResponsesAsync(final String resourceGroupName, final String siteName); + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getSiteDetectorResponseAsync(String resourceGroupName, String siteName, String detectorName); + + /** + * Get Detectors. + * Description for 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 for the request + */ + Observable listSiteDetectorsAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory); + + /** + * Get Detector. + * Description for 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 for the request + */ + Observable getSiteDetectorAsync(String resourceGroupName, String siteName, String diagnosticCategory, String detectorName); + + /** + * Execute Detector. + * Description for 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 for the request + */ + Observable executeSiteDetectorAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory); + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @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 for the request + */ + Observable listSiteDetectorResponsesSlotAsync(final String resourceGroupName, final String siteName, final String slot); + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getSiteDetectorResponseSlotAsync(String resourceGroupName, String siteName, String detectorName, String slot); + + /** + * Get Detectors. + * Description for 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 for the request + */ + Observable listSiteDetectorsSlotAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String slot); + + /** + * Get Detector. + * Description for 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 for the request + */ + Observable getSiteDetectorSlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, String slot); + + /** + * Execute Detector. + * Description for 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 for the request + */ + Observable executeSiteDetectorSlotAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot); + + /** + * Get Site Analysis. + * Description for 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 for the request + */ + Observable getSiteAnalysisAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName); + + /** + * Get Site Analyses. + * Description for 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 for the request + */ + Observable listSiteAnalysesAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory); + + /** + * Execute Analysis. + * Description for 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 for the request + */ + Observable executeSiteAnalysisAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName); + + /** + * Get Site Analyses. + * Description for 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 for the request + */ + Observable listSiteAnalysesSlotAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String slot); + + /** + * Get Site Analysis. + * Description for 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 for the request + */ + Observable getSiteAnalysisSlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot); + + /** + * Execute Analysis. + * Description for 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 for the request + */ + Observable executeSiteAnalysisSlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Dimension.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Dimension.java new file mode 100644 index 0000000000000..482166c04f918 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DnsType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DnsType.java new file mode 100644 index 0000000000000..c9a1976b89284 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DnsVerificationTestResult.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DnsVerificationTestResult.java new file mode 100644 index 0000000000000..a7d574e5b9149 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Domain.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Domain.java new file mode 100644 index 0000000000000..e2927228308c8 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Domain.java @@ -0,0 +1,403 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DomainInner; + +/** + * Type representing Domain. + */ +public interface Domain extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the authCode value. + */ + String authCode(); + + /** + * @return the autoRenew value. + */ + Boolean autoRenew(); + + /** + * @return the consent value. + */ + DomainPurchaseConsent consent(); + + /** + * @return the contactAdmin value. + */ + Contact contactAdmin(); + + /** + * @return the contactBilling value. + */ + Contact contactBilling(); + + /** + * @return the contactRegistrant value. + */ + Contact contactRegistrant(); + + /** + * @return the contactTech value. + */ + Contact contactTech(); + + /** + * @return the createdTime value. + */ + DateTime createdTime(); + + /** + * @return the dnsType value. + */ + DnsType dnsType(); + + /** + * @return the dnsZoneId value. + */ + String dnsZoneId(); + + /** + * @return the domainNotRenewableReasons value. + */ + List domainNotRenewableReasons(); + + /** + * @return the expirationTime value. + */ + DateTime expirationTime(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the lastRenewedTime value. + */ + DateTime lastRenewedTime(); + + /** + * @return the managedHostNames value. + */ + List managedHostNames(); + + /** + * @return the nameServers value. + */ + List nameServers(); + + /** + * @return the privacy value. + */ + Boolean privacy(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the readyForDnsRecordManagement value. + */ + Boolean readyForDnsRecordManagement(); + + /** + * @return the registrationStatus value. + */ + DomainStatus registrationStatus(); + + /** + * @return the targetDnsType value. + */ + DnsType targetDnsType(); + + /** + * The entirety of the Domain definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithConsent, DefinitionStages.WithContactAdmin, DefinitionStages.WithContactBilling, DefinitionStages.WithContactRegistrant, DefinitionStages.WithContactTech, DefinitionStages.WithCreate { + } + + /** + * Grouping of Domain definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Domain definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the Domain definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the domain definition allowing to specify Consent. + */ + interface WithConsent { + /** + * Specifies consent. + * @param consent Legal agreement consent + * @return the next definition stage +*/ + WithContactAdmin withConsent(DomainPurchaseConsent consent); + } + + /** + * The stage of the domain definition allowing to specify ContactAdmin. + */ + interface WithContactAdmin { + /** + * Specifies contactAdmin. + * @param contactAdmin Administrative contact + * @return the next definition stage +*/ + WithContactBilling withContactAdmin(Contact contactAdmin); + } + + /** + * The stage of the domain definition allowing to specify ContactBilling. + */ + interface WithContactBilling { + /** + * Specifies contactBilling. + * @param contactBilling Billing contact + * @return the next definition stage +*/ + WithContactRegistrant withContactBilling(Contact contactBilling); + } + + /** + * The stage of the domain definition allowing to specify ContactRegistrant. + */ + interface WithContactRegistrant { + /** + * Specifies contactRegistrant. + * @param contactRegistrant Registrant contact + * @return the next definition stage +*/ + WithContactTech withContactRegistrant(Contact contactRegistrant); + } + + /** + * The stage of the domain definition allowing to specify ContactTech. + */ + interface WithContactTech { + /** + * Specifies contactTech. + * @param contactTech Technical contact + * @return the next definition stage +*/ + WithCreate withContactTech(Contact contactTech); + } + + /** + * The stage of the domain definition allowing to specify AuthCode. + */ + interface WithAuthCode { + /** + * Specifies authCode. + * @param authCode the authCode parameter value + * @return the next definition stage + */ + WithCreate withAuthCode(String authCode); + } + + /** + * The stage of the domain definition allowing to specify AutoRenew. + */ + interface WithAutoRenew { + /** + * Specifies autoRenew. + * @param autoRenew <code>true</code> if the domain should be automatically renewed; otherwise, <code>false</code> + * @return the next definition stage + */ + WithCreate withAutoRenew(Boolean autoRenew); + } + + /** + * The stage of the domain definition allowing to specify DnsType. + */ + interface WithDnsType { + /** + * Specifies dnsType. + * @param dnsType Current DNS type. Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns' + * @return the next definition stage + */ + WithCreate withDnsType(DnsType dnsType); + } + + /** + * The stage of the domain definition allowing to specify DnsZoneId. + */ + interface WithDnsZoneId { + /** + * Specifies dnsZoneId. + * @param dnsZoneId Azure DNS Zone to use + * @return the next definition stage + */ + WithCreate withDnsZoneId(String dnsZoneId); + } + + /** + * The stage of the domain definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the domain definition allowing to specify Privacy. + */ + interface WithPrivacy { + /** + * Specifies privacy. + * @param privacy <code>true</code> if domain privacy is enabled for this domain; otherwise, <code>false</code> + * @return the next definition stage + */ + WithCreate withPrivacy(Boolean privacy); + } + + /** + * The stage of the domain definition allowing to specify TargetDnsType. + */ + interface WithTargetDnsType { + /** + * Specifies targetDnsType. + * @param targetDnsType Target DNS type (would be used for migration). Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns' + * @return the next definition stage + */ + WithCreate withTargetDnsType(DnsType targetDnsType); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAuthCode, DefinitionStages.WithAutoRenew, DefinitionStages.WithDnsType, DefinitionStages.WithDnsZoneId, DefinitionStages.WithKind, DefinitionStages.WithPrivacy, DefinitionStages.WithTargetDnsType { + } + } + /** + * The template for a Domain update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAuthCode, UpdateStages.WithAutoRenew, UpdateStages.WithDnsType, UpdateStages.WithDnsZoneId, UpdateStages.WithKind, UpdateStages.WithPrivacy, UpdateStages.WithTargetDnsType { + } + + /** + * Grouping of Domain update stages. + */ + interface UpdateStages { + /** + * The stage of the domain update allowing to specify AuthCode. + */ + interface WithAuthCode { + /** + * Specifies authCode. + * @param authCode the authCode parameter value + * @return the next update stage + */ + Update withAuthCode(String authCode); + } + + /** + * The stage of the domain update allowing to specify AutoRenew. + */ + interface WithAutoRenew { + /** + * Specifies autoRenew. + * @param autoRenew <code>true</code> if the domain should be automatically renewed; otherwise, <code>false</code> + * @return the next update stage + */ + Update withAutoRenew(Boolean autoRenew); + } + + /** + * The stage of the domain update allowing to specify DnsType. + */ + interface WithDnsType { + /** + * Specifies dnsType. + * @param dnsType Current DNS type. Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns' + * @return the next update stage + */ + Update withDnsType(DnsType dnsType); + } + + /** + * The stage of the domain update allowing to specify DnsZoneId. + */ + interface WithDnsZoneId { + /** + * Specifies dnsZoneId. + * @param dnsZoneId Azure DNS Zone to use + * @return the next update stage + */ + Update withDnsZoneId(String dnsZoneId); + } + + /** + * The stage of the domain update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the domain update allowing to specify Privacy. + */ + interface WithPrivacy { + /** + * Specifies privacy. + * @param privacy <code>true</code> if domain privacy is enabled for this domain; otherwise, <code>false</code> + * @return the next update stage + */ + Update withPrivacy(Boolean privacy); + } + + /** + * The stage of the domain update allowing to specify TargetDnsType. + */ + interface WithTargetDnsType { + /** + * Specifies targetDnsType. + * @param targetDnsType Target DNS type (would be used for migration). Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns' + * @return the next update stage + */ + Update withTargetDnsType(DnsType targetDnsType); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainAvailabilityCheckResult.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainAvailabilityCheckResult.java new file mode 100644 index 0000000000000..af05648fcd4d4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainAvailabilityCheckResult.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DomainAvailabilityCheckResultInner; + +/** + * Type representing DomainAvailabilityCheckResult. + */ +public interface DomainAvailabilityCheckResult extends HasInner, HasManager { + /** + * @return the available value. + */ + Boolean available(); + + /** + * @return the domainType value. + */ + DomainType domainType(); + + /** + * @return the name value. + */ + String name(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainControlCenterSsoRequest.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainControlCenterSsoRequest.java new file mode 100644 index 0000000000000..57d3d666749ff --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainControlCenterSsoRequest.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DomainControlCenterSsoRequestInner; + +/** + * Type representing DomainControlCenterSsoRequest. + */ +public interface DomainControlCenterSsoRequest extends HasInner, HasManager { + /** + * @return the postParameterKey value. + */ + String postParameterKey(); + + /** + * @return the postParameterValue value. + */ + String postParameterValue(); + + /** + * @return the url value. + */ + String url(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainOwnershipIdentifier.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainOwnershipIdentifier.java new file mode 100644 index 0000000000000..dfb3ca600e283 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainOwnershipIdentifier.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DomainOwnershipIdentifierInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing DomainOwnershipIdentifier. + */ +public interface DomainOwnershipIdentifier extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the ownershipId value. + */ + String ownershipId(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the DomainOwnershipIdentifier definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithDomain, DefinitionStages.WithCreate { + } + + /** + * Grouping of DomainOwnershipIdentifier definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DomainOwnershipIdentifier definition. + */ + interface Blank extends WithDomain { + } + + /** + * The stage of the domainownershipidentifier definition allowing to specify Domain. + */ + interface WithDomain { + /** + * Specifies resourceGroupName, domainName. + * @param resourceGroupName Name of the resource group to which the resource belongs + * @param domainName Name of domain + * @return the next definition stage + */ + WithCreate withExistingDomain(String resourceGroupName, String domainName); + } + + /** + * The stage of the domainownershipidentifier definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the domainownershipidentifier definition allowing to specify OwnershipId. + */ + interface WithOwnershipId { + /** + * Specifies ownershipId. + * @param ownershipId Ownership Id + * @return the next definition stage + */ + WithCreate withOwnershipId(String ownershipId); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithKind, DefinitionStages.WithOwnershipId { + } + } + /** + * The template for a DomainOwnershipIdentifier update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithKind, UpdateStages.WithOwnershipId { + } + + /** + * Grouping of DomainOwnershipIdentifier update stages. + */ + interface UpdateStages { + /** + * The stage of the domainownershipidentifier update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the domainownershipidentifier update allowing to specify OwnershipId. + */ + interface WithOwnershipId { + /** + * Specifies ownershipId. + * @param ownershipId Ownership Id + * @return the next update stage + */ + Update withOwnershipId(String ownershipId); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainPatchResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainPatchResource.java new file mode 100644 index 0000000000000..4d2bfe5a0cc67 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainPatchResource.java @@ -0,0 +1,456 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * ARM resource for a domain. + */ +@JsonFlatten +public class DomainPatchResource 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 administrative contact. + * + * @return the contactAdmin value + */ + public Contact contactAdmin() { + return this.contactAdmin; + } + + /** + * Set administrative contact. + * + * @param contactAdmin the contactAdmin value to set + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withContactAdmin(Contact contactAdmin) { + this.contactAdmin = contactAdmin; + return this; + } + + /** + * Get billing contact. + * + * @return the contactBilling value + */ + public Contact contactBilling() { + return this.contactBilling; + } + + /** + * Set billing contact. + * + * @param contactBilling the contactBilling value to set + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withContactBilling(Contact contactBilling) { + this.contactBilling = contactBilling; + return this; + } + + /** + * Get registrant contact. + * + * @return the contactRegistrant value + */ + public Contact contactRegistrant() { + return this.contactRegistrant; + } + + /** + * Set registrant contact. + * + * @param contactRegistrant the contactRegistrant value to set + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withContactRegistrant(Contact contactRegistrant) { + this.contactRegistrant = contactRegistrant; + return this; + } + + /** + * Get technical contact. + * + * @return the contactTech value + */ + public Contact contactTech() { + return this.contactTech; + } + + /** + * Set technical contact. + * + * @param contactTech the contactTech value to set + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withContactTech(Contact contactTech) { + this.contactTech = contactTech; + return this; + } + + /** + * Get 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'. + * + * @return the registrationStatus value + */ + public DomainStatus registrationStatus() { + return this.registrationStatus; + } + + /** + * Get domain provisioning state. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name servers. + * + * @return the nameServers value + */ + public List nameServers() { + return this.nameServers; + } + + /** + * Get <code>true</code> if domain privacy is enabled for this domain; otherwise, <code>false</code>. + * + * @return the privacy value + */ + public Boolean privacy() { + return this.privacy; + } + + /** + * Set <code>true</code> if domain privacy is enabled for this domain; otherwise, <code>false</code>. + * + * @param privacy the privacy value to set + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withPrivacy(Boolean privacy) { + this.privacy = privacy; + return this; + } + + /** + * Get domain creation timestamp. + * + * @return the createdTime value + */ + public DateTime createdTime() { + return this.createdTime; + } + + /** + * Get domain expiration timestamp. + * + * @return the expirationTime value + */ + public DateTime expirationTime() { + return this.expirationTime; + } + + /** + * Get timestamp when the domain was renewed last time. + * + * @return the lastRenewedTime value + */ + public DateTime lastRenewedTime() { + return this.lastRenewedTime; + } + + /** + * Get <code>true</code> if the domain should be automatically renewed; otherwise, <code>false</code>. + * + * @return the autoRenew value + */ + public Boolean autoRenew() { + return this.autoRenew; + } + + /** + * Set <code>true</code> if the domain should be automatically renewed; otherwise, <code>false</code>. + * + * @param autoRenew the autoRenew value to set + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withAutoRenew(Boolean autoRenew) { + this.autoRenew = autoRenew; + return this; + } + + /** + * Get <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. + * + * @return the readyForDnsRecordManagement value + */ + public Boolean readyForDnsRecordManagement() { + return this.readyForDnsRecordManagement; + } + + /** + * Get all hostnames derived from the domain and assigned to Azure resources. + * + * @return the managedHostNames value + */ + public List managedHostNames() { + return this.managedHostNames; + } + + /** + * Get legal agreement consent. + * + * @return the consent value + */ + public DomainPurchaseConsent consent() { + return this.consent; + } + + /** + * Set legal agreement consent. + * + * @param consent the consent value to set + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withConsent(DomainPurchaseConsent consent) { + this.consent = consent; + return this; + } + + /** + * Get reasons why domain is not renewable. + * + * @return the domainNotRenewableReasons value + */ + public List domainNotRenewableReasons() { + return this.domainNotRenewableReasons; + } + + /** + * Get current DNS type. Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns'. + * + * @return the dnsType value + */ + public DnsType dnsType() { + return this.dnsType; + } + + /** + * Set current DNS type. Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns'. + * + * @param dnsType the dnsType value to set + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withDnsType(DnsType dnsType) { + this.dnsType = dnsType; + return this; + } + + /** + * Get azure DNS Zone to use. + * + * @return the dnsZoneId value + */ + public String dnsZoneId() { + return this.dnsZoneId; + } + + /** + * Set azure DNS Zone to use. + * + * @param dnsZoneId the dnsZoneId value to set + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withDnsZoneId(String dnsZoneId) { + this.dnsZoneId = dnsZoneId; + return this; + } + + /** + * Get target DNS type (would be used for migration). Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns'. + * + * @return the targetDnsType value + */ + public DnsType targetDnsType() { + return this.targetDnsType; + } + + /** + * Set target DNS type (would be used for migration). Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns'. + * + * @param targetDnsType the targetDnsType value to set + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource 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 DomainPatchResource object itself. + */ + public DomainPatchResource withAuthCode(String authCode) { + this.authCode = authCode; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainPurchaseConsent.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainPurchaseConsent.java new file mode 100644 index 0000000000000..c0e4c7979f9f4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 list of applicable legal agreement keys. This list can be retrieved using ListLegalAgreements API under <code>TopLevelDomain</code> resource. + * + * @return the agreementKeys value + */ + public List agreementKeys() { + return this.agreementKeys; + } + + /** + * Set list of applicable legal agreement keys. This list can be retrieved using ListLegalAgreements API under <code>TopLevelDomain</code> resource. + * + * @param agreementKeys the agreementKeys value to set + * @return the DomainPurchaseConsent object itself. + */ + public DomainPurchaseConsent withAgreementKeys(List agreementKeys) { + this.agreementKeys = agreementKeys; + return this; + } + + /** + * Get client IP address. + * + * @return the agreedBy value + */ + public String agreedBy() { + return this.agreedBy; + } + + /** + * Set client IP address. + * + * @param agreedBy the agreedBy value to set + * @return the DomainPurchaseConsent object itself. + */ + public DomainPurchaseConsent withAgreedBy(String agreedBy) { + this.agreedBy = agreedBy; + return this; + } + + /** + * Get timestamp when the agreements were accepted. + * + * @return the agreedAt value + */ + public DateTime agreedAt() { + return this.agreedAt; + } + + /** + * Set timestamp when the agreements were accepted. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainRecommendationSearchParameters.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainRecommendationSearchParameters.java new file mode 100644 index 0000000000000..00f30f9df0509 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainRecommendationSearchParameters.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Domain recommendation search parameters. + */ +public class DomainRecommendationSearchParameters { + /** + * 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 keywords to be used for generating domain recommendations. + * + * @return the keywords value + */ + public String keywords() { + return this.keywords; + } + + /** + * Set keywords to be used for generating domain recommendations. + * + * @param keywords the keywords value to set + * @return the DomainRecommendationSearchParameters object itself. + */ + public DomainRecommendationSearchParameters withKeywords(String keywords) { + this.keywords = keywords; + return this; + } + + /** + * Get maximum number of recommendations. + * + * @return the maxDomainRecommendations value + */ + public Integer maxDomainRecommendations() { + return this.maxDomainRecommendations; + } + + /** + * Set maximum number of recommendations. + * + * @param maxDomainRecommendations the maxDomainRecommendations value to set + * @return the DomainRecommendationSearchParameters object itself. + */ + public DomainRecommendationSearchParameters withMaxDomainRecommendations(Integer maxDomainRecommendations) { + this.maxDomainRecommendations = maxDomainRecommendations; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainRegistrationProviders.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainRegistrationProviders.java new file mode 100644 index 0000000000000..c57e770b9769e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainRegistrationProviders.java @@ -0,0 +1,28 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DomainRegistrationProvidersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing DomainRegistrationProviders. + */ +public interface DomainRegistrationProviders extends HasInner { + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Description for 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 for the request + */ + Observable listOperationsAsync(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainStatus.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainStatus.java new file mode 100644 index 0000000000000..b3bd1fb9a8181 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/DomainType.java new file mode 100644 index 0000000000000..f67647904cc5b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Domains.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Domains.java new file mode 100644 index 0000000000000..93ddf1466d0b4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Domains.java @@ -0,0 +1,108 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Completable; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DomainsInner; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.DomainOwnershipIdentifier; + +/** + * Type representing Domains. + */ +public interface Domains extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Begins definition for a new DomainOwnershipIdentifier resource. + * @param name resource name. + * @return the first stage of the new DomainOwnershipIdentifier definition. + */ + DomainOwnershipIdentifier.DefinitionStages.Blank defineDomainOwnershipIdentifier(String name); + + /** + * Renew a domain. + * Description for 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 observable for the request + */ + Completable renewAsync(String resourceGroupName, String domainName); + + /** + * Check if a domain is available for registration. + * Description for Check if a domain is available for registration. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkAvailabilityAsync(); + + /** + * Generate a single sign-on request for the domain management portal. + * Description for Generate a single sign-on request for the domain management portal. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getControlCenterSsoRequestAsync(); + + /** + * Get domain name recommendations based on keywords. + * Description for 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 for the request + */ + Observable listRecommendationsAsync(final DomainRecommendationSearchParameters parameters); + + /** + * Get ownership identifier for domain. + * Description for 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 for the request + */ + Observable getOwnershipIdentifierAsync(String resourceGroupName, String domainName, String name); + + /** + * Lists domain ownership identifiers. + * Description for 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 for the request + */ + Observable listOwnershipIdentifiersAsync(final String resourceGroupName, final String domainName); + + /** + * Delete ownership identifier for domain. + * Description for 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 observable for the request + */ + Completable deleteOwnershipIdentifierAsync(String resourceGroupName, String domainName, String name); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/EnabledConfig.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/EnabledConfig.java new file mode 100644 index 0000000000000..f4937696ea8c4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 true if configuration is enabled, false if it is disabled and null if configuration is not set. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set true if configuration is enabled, false if it is disabled and null if configuration is not set. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/EndpointDependency.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/EndpointDependency.java new file mode 100644 index 0000000000000..c568a9b1c8960 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/EndpointDependency.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.appservice.v2019_08_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A domain name that a service is reached at, including details of the current + * connection status. + */ +public class EndpointDependency { + /** + * The domain name of the dependency. + */ + @JsonProperty(value = "domainName") + private String domainName; + + /** + * The IP Addresses and Ports used when connecting to DomainName. + */ + @JsonProperty(value = "endpointDetails") + private List endpointDetails; + + /** + * Get the domain name of the dependency. + * + * @return the domainName value + */ + public String domainName() { + return this.domainName; + } + + /** + * Set the domain name of the dependency. + * + * @param domainName the domainName value to set + * @return the EndpointDependency object itself. + */ + public EndpointDependency withDomainName(String domainName) { + this.domainName = domainName; + return this; + } + + /** + * Get the IP Addresses and Ports used when connecting to DomainName. + * + * @return the endpointDetails value + */ + public List endpointDetails() { + return this.endpointDetails; + } + + /** + * Set the IP Addresses and Ports used when connecting to DomainName. + * + * @param endpointDetails the endpointDetails value to set + * @return the EndpointDependency object itself. + */ + public EndpointDependency withEndpointDetails(List endpointDetails) { + this.endpointDetails = endpointDetails; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/EndpointDetail.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/EndpointDetail.java new file mode 100644 index 0000000000000..168485c3e42ba --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/EndpointDetail.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Current TCP connectivity information from the App Service Environment to a + * single endpoint. + */ +public class EndpointDetail { + /** + * An IP Address that Domain Name currently resolves to. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * The port an endpoint is connected to. + */ + @JsonProperty(value = "port") + private Integer port; + + /** + * The time in milliseconds it takes for a TCP connection to be created + * from the App Service Environment to this IpAddress at this Port. + */ + @JsonProperty(value = "latency") + private Double latency; + + /** + * Whether it is possible to create a TCP connection from the App Service + * Environment to this IpAddress at this Port. + */ + @JsonProperty(value = "isAccessible") + private Boolean isAccessible; + + /** + * Get an IP Address that Domain Name currently resolves to. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set an IP Address that Domain Name currently resolves to. + * + * @param ipAddress the ipAddress value to set + * @return the EndpointDetail object itself. + */ + public EndpointDetail withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the port an endpoint is connected to. + * + * @return the port value + */ + public Integer port() { + return this.port; + } + + /** + * Set the port an endpoint is connected to. + * + * @param port the port value to set + * @return the EndpointDetail object itself. + */ + public EndpointDetail withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Get the time in milliseconds it takes for a TCP connection to be created from the App Service Environment to this IpAddress at this Port. + * + * @return the latency value + */ + public Double latency() { + return this.latency; + } + + /** + * Set the time in milliseconds it takes for a TCP connection to be created from the App Service Environment to this IpAddress at this Port. + * + * @param latency the latency value to set + * @return the EndpointDetail object itself. + */ + public EndpointDetail withLatency(Double latency) { + this.latency = latency; + return this; + } + + /** + * Get whether it is possible to create a TCP connection from the App Service Environment to this IpAddress at this Port. + * + * @return the isAccessible value + */ + public Boolean isAccessible() { + return this.isAccessible; + } + + /** + * Set whether it is possible to create a TCP connection from the App Service Environment to this IpAddress at this Port. + * + * @param isAccessible the isAccessible value to set + * @return the EndpointDetail object itself. + */ + public EndpointDetail withIsAccessible(Boolean isAccessible) { + this.isAccessible = isAccessible; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ErrorEntity.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ErrorEntity.java new file mode 100644 index 0000000000000..fab10a5a6d987 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 type of error. + * + * @return the extendedCode value + */ + public String extendedCode() { + return this.extendedCode; + } + + /** + * Set type of error. + * + * @param extendedCode the extendedCode value to set + * @return the ErrorEntity object itself. + */ + public ErrorEntity withExtendedCode(String extendedCode) { + this.extendedCode = extendedCode; + return this; + } + + /** + * Get message template. + * + * @return the messageTemplate value + */ + public String messageTemplate() { + return this.messageTemplate; + } + + /** + * Set message template. + * + * @param messageTemplate the messageTemplate value to set + * @return the ErrorEntity object itself. + */ + public ErrorEntity withMessageTemplate(String messageTemplate) { + this.messageTemplate = messageTemplate; + return this; + } + + /** + * Get parameters for the template. + * + * @return the parameters value + */ + public List parameters() { + return this.parameters; + } + + /** + * Set parameters for the template. + * + * @param parameters the parameters value to set + * @return the ErrorEntity object itself. + */ + public ErrorEntity withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Get inner errors. + * + * @return the innerErrors value + */ + public List innerErrors() { + return this.innerErrors; + } + + /** + * Set inner errors. + * + * @param innerErrors the innerErrors value to set + * @return the ErrorEntity object itself. + */ + public ErrorEntity withInnerErrors(List innerErrors) { + this.innerErrors = innerErrors; + return this; + } + + /** + * Get basic error code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set basic error code. + * + * @param code the code value to set + * @return the ErrorEntity object itself. + */ + public ErrorEntity withCode(String code) { + this.code = code; + return this; + } + + /** + * Get any details of the error. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set any details of the error. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Experiments.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Experiments.java new file mode 100644 index 0000000000000..744858c040692 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 list of ramp-up rules. + * + * @return the rampUpRules value + */ + public List rampUpRules() { + return this.rampUpRules; + } + + /** + * Set list of ramp-up rules. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/FileSystemApplicationLogsConfig.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/FileSystemApplicationLogsConfig.java new file mode 100644 index 0000000000000..6946fdccea42b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 log level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'. + * + * @return the level value + */ + public LogLevel level() { + return this.level; + } + + /** + * Set log level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/FileSystemHttpLogsConfig.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/FileSystemHttpLogsConfig.java new file mode 100644 index 0000000000000..c971abbcb1a97 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/FileSystemHttpLogsConfig.java @@ -0,0 +1,108 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +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 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. + * + * @return the retentionInMb value + */ + public Integer retentionInMb() { + return this.retentionInMb; + } + + /** + * Set 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. + * + * @param retentionInMb the retentionInMb value to set + * @return the FileSystemHttpLogsConfig object itself. + */ + public FileSystemHttpLogsConfig withRetentionInMb(Integer retentionInMb) { + this.retentionInMb = retentionInMb; + return this; + } + + /** + * Get retention in days. + Remove files older than X days. + 0 or lower means no retention. + * + * @return the retentionInDays value + */ + public Integer retentionInDays() { + return this.retentionInDays; + } + + /** + * Set retention in days. + Remove files older than X days. + 0 or lower means no retention. + * + * @param retentionInDays the retentionInDays value to set + * @return the FileSystemHttpLogsConfig object itself. + */ + public FileSystemHttpLogsConfig withRetentionInDays(Integer retentionInDays) { + this.retentionInDays = retentionInDays; + return this; + } + + /** + * Get true if configuration is enabled, false if it is disabled and null if configuration is not set. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set true if configuration is enabled, false if it is disabled and null if configuration is not set. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/FrequencyUnit.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/FrequencyUnit.java new file mode 100644 index 0000000000000..7d4a008256685 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/FtpsState.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/FtpsState.java new file mode 100644 index 0000000000000..264aa41cdcc3b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/FtpsState.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.appservice.v2019_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for FtpsState. + */ +public final class FtpsState extends ExpandableStringEnum { + /** Static value AllAllowed for FtpsState. */ + public static final FtpsState ALL_ALLOWED = fromString("AllAllowed"); + + /** Static value FtpsOnly for FtpsState. */ + public static final FtpsState FTPS_ONLY = fromString("FtpsOnly"); + + /** Static value Disabled for FtpsState. */ + public static final FtpsState DISABLED = fromString("Disabled"); + + /** + * Creates or finds a FtpsState from its string representation. + * @param name a name to look for + * @return the corresponding FtpsState + */ + @JsonCreator + public static FtpsState fromString(String name) { + return fromString(name, FtpsState.class); + } + + /** + * @return known FtpsState values + */ + public static Collection values() { + return values(FtpsState.class); + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/FunctionEnvelope.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/FunctionEnvelope.java new file mode 100644 index 0000000000000..73d26efc3bc16 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/FunctionEnvelope.java @@ -0,0 +1,495 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.FunctionEnvelopeInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.Map; + +/** + * Type representing FunctionEnvelope. + */ +public interface FunctionEnvelope extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the config value. + */ + Object config(); + + /** + * @return the configHref value. + */ + String configHref(); + + /** + * @return the files value. + */ + Map files(); + + /** + * @return the functionAppId value. + */ + String functionAppId(); + + /** + * @return the href value. + */ + String href(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the invokeUrlTemplate value. + */ + String invokeUrlTemplate(); + + /** + * @return the isDisabled value. + */ + Boolean isDisabled(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the language value. + */ + String language(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the scriptHref value. + */ + String scriptHref(); + + /** + * @return the scriptRootPathHref value. + */ + String scriptRootPathHref(); + + /** + * @return the secretsFileHref value. + */ + String secretsFileHref(); + + /** + * @return the testData value. + */ + String testData(); + + /** + * @return the testDataHref value. + */ + String testDataHref(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the FunctionEnvelope definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithSite, DefinitionStages.WithCreate { + } + + /** + * Grouping of FunctionEnvelope definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a FunctionEnvelope definition. + */ + interface Blank extends WithSite { + } + + /** + * The stage of the functionenvelope definition allowing to specify Site. + */ + interface WithSite { + /** + * Specifies resourceGroupName, name. + * @param resourceGroupName Name of the resource group to which the resource belongs + * @param name Site name + * @return the next definition stage + */ + WithCreate withExistingSite(String resourceGroupName, String name); + } + + /** + * The stage of the functionenvelope definition allowing to specify Config. + */ + interface WithConfig { + /** + * Specifies config. + * @param config Config information + * @return the next definition stage + */ + WithCreate withConfig(Object config); + } + + /** + * The stage of the functionenvelope definition allowing to specify ConfigHref. + */ + interface WithConfigHref { + /** + * Specifies configHref. + * @param configHref Config URI + * @return the next definition stage + */ + WithCreate withConfigHref(String configHref); + } + + /** + * The stage of the functionenvelope definition allowing to specify Files. + */ + interface WithFiles { + /** + * Specifies files. + * @param files File list + * @return the next definition stage + */ + WithCreate withFiles(Map files); + } + + /** + * The stage of the functionenvelope definition allowing to specify FunctionAppId. + */ + interface WithFunctionAppId { + /** + * Specifies functionAppId. + * @param functionAppId Function App ID + * @return the next definition stage + */ + WithCreate withFunctionAppId(String functionAppId); + } + + /** + * The stage of the functionenvelope definition allowing to specify Href. + */ + interface WithHref { + /** + * Specifies href. + * @param href Function URI + * @return the next definition stage + */ + WithCreate withHref(String href); + } + + /** + * The stage of the functionenvelope definition allowing to specify InvokeUrlTemplate. + */ + interface WithInvokeUrlTemplate { + /** + * Specifies invokeUrlTemplate. + * @param invokeUrlTemplate The invocation URL + * @return the next definition stage + */ + WithCreate withInvokeUrlTemplate(String invokeUrlTemplate); + } + + /** + * The stage of the functionenvelope definition allowing to specify IsDisabled. + */ + interface WithIsDisabled { + /** + * Specifies isDisabled. + * @param isDisabled Gets or sets a value indicating whether the function is disabled + * @return the next definition stage + */ + WithCreate withIsDisabled(Boolean isDisabled); + } + + /** + * The stage of the functionenvelope definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the functionenvelope definition allowing to specify Language. + */ + interface WithLanguage { + /** + * Specifies language. + * @param language The function language + * @return the next definition stage + */ + WithCreate withLanguage(String language); + } + + /** + * The stage of the functionenvelope definition allowing to specify ScriptHref. + */ + interface WithScriptHref { + /** + * Specifies scriptHref. + * @param scriptHref Script URI + * @return the next definition stage + */ + WithCreate withScriptHref(String scriptHref); + } + + /** + * The stage of the functionenvelope definition allowing to specify ScriptRootPathHref. + */ + interface WithScriptRootPathHref { + /** + * Specifies scriptRootPathHref. + * @param scriptRootPathHref Script root path URI + * @return the next definition stage + */ + WithCreate withScriptRootPathHref(String scriptRootPathHref); + } + + /** + * The stage of the functionenvelope definition allowing to specify SecretsFileHref. + */ + interface WithSecretsFileHref { + /** + * Specifies secretsFileHref. + * @param secretsFileHref Secrets file URI + * @return the next definition stage + */ + WithCreate withSecretsFileHref(String secretsFileHref); + } + + /** + * The stage of the functionenvelope definition allowing to specify TestData. + */ + interface WithTestData { + /** + * Specifies testData. + * @param testData Test data used when testing via the Azure Portal + * @return the next definition stage + */ + WithCreate withTestData(String testData); + } + + /** + * The stage of the functionenvelope definition allowing to specify TestDataHref. + */ + interface WithTestDataHref { + /** + * Specifies testDataHref. + * @param testDataHref Test data URI + * @return the next definition stage + */ + WithCreate withTestDataHref(String testDataHref); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithConfig, DefinitionStages.WithConfigHref, DefinitionStages.WithFiles, DefinitionStages.WithFunctionAppId, DefinitionStages.WithHref, DefinitionStages.WithInvokeUrlTemplate, DefinitionStages.WithIsDisabled, DefinitionStages.WithKind, DefinitionStages.WithLanguage, DefinitionStages.WithScriptHref, DefinitionStages.WithScriptRootPathHref, DefinitionStages.WithSecretsFileHref, DefinitionStages.WithTestData, DefinitionStages.WithTestDataHref { + } + } + /** + * The template for a FunctionEnvelope update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithConfig, UpdateStages.WithConfigHref, UpdateStages.WithFiles, UpdateStages.WithFunctionAppId, UpdateStages.WithHref, UpdateStages.WithInvokeUrlTemplate, UpdateStages.WithIsDisabled, UpdateStages.WithKind, UpdateStages.WithLanguage, UpdateStages.WithScriptHref, UpdateStages.WithScriptRootPathHref, UpdateStages.WithSecretsFileHref, UpdateStages.WithTestData, UpdateStages.WithTestDataHref { + } + + /** + * Grouping of FunctionEnvelope update stages. + */ + interface UpdateStages { + /** + * The stage of the functionenvelope update allowing to specify Config. + */ + interface WithConfig { + /** + * Specifies config. + * @param config Config information + * @return the next update stage + */ + Update withConfig(Object config); + } + + /** + * The stage of the functionenvelope update allowing to specify ConfigHref. + */ + interface WithConfigHref { + /** + * Specifies configHref. + * @param configHref Config URI + * @return the next update stage + */ + Update withConfigHref(String configHref); + } + + /** + * The stage of the functionenvelope update allowing to specify Files. + */ + interface WithFiles { + /** + * Specifies files. + * @param files File list + * @return the next update stage + */ + Update withFiles(Map files); + } + + /** + * The stage of the functionenvelope update allowing to specify FunctionAppId. + */ + interface WithFunctionAppId { + /** + * Specifies functionAppId. + * @param functionAppId Function App ID + * @return the next update stage + */ + Update withFunctionAppId(String functionAppId); + } + + /** + * The stage of the functionenvelope update allowing to specify Href. + */ + interface WithHref { + /** + * Specifies href. + * @param href Function URI + * @return the next update stage + */ + Update withHref(String href); + } + + /** + * The stage of the functionenvelope update allowing to specify InvokeUrlTemplate. + */ + interface WithInvokeUrlTemplate { + /** + * Specifies invokeUrlTemplate. + * @param invokeUrlTemplate The invocation URL + * @return the next update stage + */ + Update withInvokeUrlTemplate(String invokeUrlTemplate); + } + + /** + * The stage of the functionenvelope update allowing to specify IsDisabled. + */ + interface WithIsDisabled { + /** + * Specifies isDisabled. + * @param isDisabled Gets or sets a value indicating whether the function is disabled + * @return the next update stage + */ + Update withIsDisabled(Boolean isDisabled); + } + + /** + * The stage of the functionenvelope update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the functionenvelope update allowing to specify Language. + */ + interface WithLanguage { + /** + * Specifies language. + * @param language The function language + * @return the next update stage + */ + Update withLanguage(String language); + } + + /** + * The stage of the functionenvelope update allowing to specify ScriptHref. + */ + interface WithScriptHref { + /** + * Specifies scriptHref. + * @param scriptHref Script URI + * @return the next update stage + */ + Update withScriptHref(String scriptHref); + } + + /** + * The stage of the functionenvelope update allowing to specify ScriptRootPathHref. + */ + interface WithScriptRootPathHref { + /** + * Specifies scriptRootPathHref. + * @param scriptRootPathHref Script root path URI + * @return the next update stage + */ + Update withScriptRootPathHref(String scriptRootPathHref); + } + + /** + * The stage of the functionenvelope update allowing to specify SecretsFileHref. + */ + interface WithSecretsFileHref { + /** + * Specifies secretsFileHref. + * @param secretsFileHref Secrets file URI + * @return the next update stage + */ + Update withSecretsFileHref(String secretsFileHref); + } + + /** + * The stage of the functionenvelope update allowing to specify TestData. + */ + interface WithTestData { + /** + * Specifies testData. + * @param testData Test data used when testing via the Azure Portal + * @return the next update stage + */ + Update withTestData(String testData); + } + + /** + * The stage of the functionenvelope update allowing to specify TestDataHref. + */ + interface WithTestDataHref { + /** + * Specifies testDataHref. + * @param testDataHref Test data URI + * @return the next update stage + */ + Update withTestDataHref(String testDataHref); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/FunctionSecrets.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/FunctionSecrets.java new file mode 100644 index 0000000000000..2a6a2df2895f1 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/FunctionSecrets.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.FunctionSecretsInner; + +/** + * Type representing FunctionSecrets. + */ +public interface FunctionSecrets extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the key value. + */ + String keyVal(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the triggerUrl value. + */ + String triggerUrl(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/GlobalCsmSkuDescription.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/GlobalCsmSkuDescription.java new file mode 100644 index 0000000000000..e33c6f8bf06a6 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.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 name of the resource SKU. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the resource SKU. + * + * @param name the name value to set + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withName(String name) { + this.name = name; + return this; + } + + /** + * Get service Tier of the resource SKU. + * + * @return the tier value + */ + public String tier() { + return this.tier; + } + + /** + * Set service Tier of the resource SKU. + * + * @param tier the tier value to set + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withTier(String tier) { + this.tier = tier; + return this; + } + + /** + * Get size specifier of the resource SKU. + * + * @return the size value + */ + public String size() { + return this.size; + } + + /** + * Set size specifier of the resource SKU. + * + * @param size the size value to set + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withSize(String size) { + this.size = size; + return this; + } + + /** + * Get family code of the resource SKU. + * + * @return the family value + */ + public String family() { + return this.family; + } + + /** + * Set family code of the resource SKU. + * + * @param family the family value to set + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get min, max, and default scale values of the SKU. + * + * @return the capacity value + */ + public SkuCapacity capacity() { + return this.capacity; + } + + /** + * Set min, max, and default scale values of the SKU. + * + * @param capacity the capacity value to set + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withCapacity(SkuCapacity capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get locations of the SKU. + * + * @return the locations value + */ + public List locations() { + return this.locations; + } + + /** + * Set locations of the SKU. + * + * @param locations the locations value to set + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Get capabilities of the SKU, e.g., is traffic manager enabled?. + * + * @return the capabilities value + */ + public List capabilities() { + return this.capabilities; + } + + /** + * Set capabilities of the SKU, e.g., is traffic manager enabled?. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HandlerMapping.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HandlerMapping.java new file mode 100644 index 0000000000000..706d57efa267a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 requests with this extension will be handled using the specified FastCGI application. + * + * @return the extension value + */ + public String extension() { + return this.extension; + } + + /** + * Set requests with this extension will be handled using the specified FastCGI application. + * + * @param extension the extension value to set + * @return the HandlerMapping object itself. + */ + public HandlerMapping withExtension(String extension) { + this.extension = extension; + return this; + } + + /** + * Get the absolute path to the FastCGI application. + * + * @return the scriptProcessor value + */ + public String scriptProcessor() { + return this.scriptProcessor; + } + + /** + * Set the absolute path to the FastCGI application. + * + * @param scriptProcessor the scriptProcessor value to set + * @return the HandlerMapping object itself. + */ + public HandlerMapping withScriptProcessor(String scriptProcessor) { + this.scriptProcessor = scriptProcessor; + return this; + } + + /** + * Get command-line arguments to be passed to the script processor. + * + * @return the arguments value + */ + public String arguments() { + return this.arguments; + } + + /** + * Set command-line arguments to be passed to the script processor. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostKeys.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostKeys.java new file mode 100644 index 0000000000000..dc933aa8a9dfe --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostKeys.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.HostKeysInner; +import java.util.Map; + +/** + * Type representing HostKeys. + */ +public interface HostKeys extends HasInner, HasManager { + /** + * @return the functionKeys value. + */ + Map functionKeys(); + + /** + * @return the masterKey value. + */ + String masterKey(); + + /** + * @return the systemKeys value. + */ + Map systemKeys(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostName.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostName.java new file mode 100644 index 0000000000000..e5d5dd00c3660 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 name of the hostname. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the hostname. + * + * @param name the name value to set + * @return the HostName object itself. + */ + public HostName withName(String name) { + this.name = name; + return this; + } + + /** + * Get 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. + * + * @return the siteNames value + */ + public List siteNames() { + return this.siteNames; + } + + /** + * Set 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. + * + * @param siteNames the siteNames value to set + * @return the HostName object itself. + */ + public HostName withSiteNames(List siteNames) { + this.siteNames = siteNames; + return this; + } + + /** + * Get 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. + * + * @return the azureResourceName value + */ + public String azureResourceName() { + return this.azureResourceName; + } + + /** + * Set 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. + * + * @param azureResourceName the azureResourceName value to set + * @return the HostName object itself. + */ + public HostName withAzureResourceName(String azureResourceName) { + this.azureResourceName = azureResourceName; + return this; + } + + /** + * Get type of the Azure resource the hostname is assigned to. Possible values include: 'Website', 'TrafficManager'. + * + * @return the azureResourceType value + */ + public AzureResourceType azureResourceType() { + return this.azureResourceType; + } + + /** + * Set type of the Azure resource the hostname is assigned to. Possible values include: 'Website', 'TrafficManager'. + * + * @param azureResourceType the azureResourceType value to set + * @return the HostName object itself. + */ + public HostName withAzureResourceType(AzureResourceType azureResourceType) { + this.azureResourceType = azureResourceType; + return this; + } + + /** + * Get type of the DNS record. Possible values include: 'CName', 'A'. + * + * @return the customHostNameDnsRecordType value + */ + public CustomHostNameDnsRecordType customHostNameDnsRecordType() { + return this.customHostNameDnsRecordType; + } + + /** + * Set type of the DNS record. Possible values include: 'CName', 'A'. + * + * @param customHostNameDnsRecordType the customHostNameDnsRecordType value to set + * @return the HostName object itself. + */ + public HostName withCustomHostNameDnsRecordType(CustomHostNameDnsRecordType customHostNameDnsRecordType) { + this.customHostNameDnsRecordType = customHostNameDnsRecordType; + return this; + } + + /** + * Get type of the hostname. Possible values include: 'Verified', 'Managed'. + * + * @return the hostNameType value + */ + public HostNameType hostNameType() { + return this.hostNameType; + } + + /** + * Set type of the hostname. Possible values include: 'Verified', 'Managed'. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostNameBinding.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostNameBinding.java new file mode 100644 index 0000000000000..d94358af4971c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostNameBinding.java @@ -0,0 +1,354 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.HostNameBindingInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing HostNameBinding. + */ +public interface HostNameBinding extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the azureResourceName value. + */ + String azureResourceName(); + + /** + * @return the azureResourceType value. + */ + AzureResourceType azureResourceType(); + + /** + * @return the customHostNameDnsRecordType value. + */ + CustomHostNameDnsRecordType customHostNameDnsRecordType(); + + /** + * @return the domainId value. + */ + String domainId(); + + /** + * @return the hostNameType value. + */ + HostNameType hostNameType(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the siteName value. + */ + String siteName(); + + /** + * @return the sslState value. + */ + SslState sslState(); + + /** + * @return the thumbprint value. + */ + String thumbprint(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the virtualIP value. + */ + String virtualIP(); + + /** + * The entirety of the HostNameBinding definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithSite, DefinitionStages.WithCreate { + } + + /** + * Grouping of HostNameBinding definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a HostNameBinding definition. + */ + interface Blank extends WithSite { + } + + /** + * The stage of the hostnamebinding definition allowing to specify Site. + */ + interface WithSite { + /** + * Specifies resourceGroupName, name. + * @param resourceGroupName Name of the resource group to which the resource belongs + * @param name Name of the app + * @return the next definition stage + */ + WithCreate withExistingSite(String resourceGroupName, String name); + } + + /** + * The stage of the hostnamebinding definition allowing to specify AzureResourceName. + */ + interface WithAzureResourceName { + /** + * Specifies azureResourceName. + * @param azureResourceName Azure resource name + * @return the next definition stage + */ + WithCreate withAzureResourceName(String azureResourceName); + } + + /** + * The stage of the hostnamebinding definition allowing to specify AzureResourceType. + */ + interface WithAzureResourceType { + /** + * Specifies azureResourceType. + * @param azureResourceType Azure resource type. Possible values include: 'Website', 'TrafficManager' + * @return the next definition stage + */ + WithCreate withAzureResourceType(AzureResourceType azureResourceType); + } + + /** + * The stage of the hostnamebinding definition allowing to specify CustomHostNameDnsRecordType. + */ + interface WithCustomHostNameDnsRecordType { + /** + * Specifies customHostNameDnsRecordType. + * @param customHostNameDnsRecordType Custom DNS record type. Possible values include: 'CName', 'A' + * @return the next definition stage + */ + WithCreate withCustomHostNameDnsRecordType(CustomHostNameDnsRecordType customHostNameDnsRecordType); + } + + /** + * The stage of the hostnamebinding definition allowing to specify DomainId. + */ + interface WithDomainId { + /** + * Specifies domainId. + * @param domainId Fully qualified ARM domain resource URI + * @return the next definition stage + */ + WithCreate withDomainId(String domainId); + } + + /** + * The stage of the hostnamebinding definition allowing to specify HostNameType. + */ + interface WithHostNameType { + /** + * Specifies hostNameType. + * @param hostNameType Hostname type. Possible values include: 'Verified', 'Managed' + * @return the next definition stage + */ + WithCreate withHostNameType(HostNameType hostNameType); + } + + /** + * The stage of the hostnamebinding definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the hostnamebinding definition allowing to specify SiteName. + */ + interface WithSiteName { + /** + * Specifies siteName. + * @param siteName App Service app name + * @return the next definition stage + */ + WithCreate withSiteName(String siteName); + } + + /** + * The stage of the hostnamebinding definition allowing to specify SslState. + */ + interface WithSslState { + /** + * Specifies sslState. + * @param sslState SSL type. Possible values include: 'Disabled', 'SniEnabled', 'IpBasedEnabled' + * @return the next definition stage + */ + WithCreate withSslState(SslState sslState); + } + + /** + * The stage of the hostnamebinding definition allowing to specify Thumbprint. + */ + interface WithThumbprint { + /** + * Specifies thumbprint. + * @param thumbprint SSL certificate thumbprint + * @return the next definition stage + */ + WithCreate withThumbprint(String thumbprint); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithAzureResourceName, DefinitionStages.WithAzureResourceType, DefinitionStages.WithCustomHostNameDnsRecordType, DefinitionStages.WithDomainId, DefinitionStages.WithHostNameType, DefinitionStages.WithKind, DefinitionStages.WithSiteName, DefinitionStages.WithSslState, DefinitionStages.WithThumbprint { + } + } + /** + * The template for a HostNameBinding update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithAzureResourceName, UpdateStages.WithAzureResourceType, UpdateStages.WithCustomHostNameDnsRecordType, UpdateStages.WithDomainId, UpdateStages.WithHostNameType, UpdateStages.WithKind, UpdateStages.WithSiteName, UpdateStages.WithSslState, UpdateStages.WithThumbprint { + } + + /** + * Grouping of HostNameBinding update stages. + */ + interface UpdateStages { + /** + * The stage of the hostnamebinding update allowing to specify AzureResourceName. + */ + interface WithAzureResourceName { + /** + * Specifies azureResourceName. + * @param azureResourceName Azure resource name + * @return the next update stage + */ + Update withAzureResourceName(String azureResourceName); + } + + /** + * The stage of the hostnamebinding update allowing to specify AzureResourceType. + */ + interface WithAzureResourceType { + /** + * Specifies azureResourceType. + * @param azureResourceType Azure resource type. Possible values include: 'Website', 'TrafficManager' + * @return the next update stage + */ + Update withAzureResourceType(AzureResourceType azureResourceType); + } + + /** + * The stage of the hostnamebinding update allowing to specify CustomHostNameDnsRecordType. + */ + interface WithCustomHostNameDnsRecordType { + /** + * Specifies customHostNameDnsRecordType. + * @param customHostNameDnsRecordType Custom DNS record type. Possible values include: 'CName', 'A' + * @return the next update stage + */ + Update withCustomHostNameDnsRecordType(CustomHostNameDnsRecordType customHostNameDnsRecordType); + } + + /** + * The stage of the hostnamebinding update allowing to specify DomainId. + */ + interface WithDomainId { + /** + * Specifies domainId. + * @param domainId Fully qualified ARM domain resource URI + * @return the next update stage + */ + Update withDomainId(String domainId); + } + + /** + * The stage of the hostnamebinding update allowing to specify HostNameType. + */ + interface WithHostNameType { + /** + * Specifies hostNameType. + * @param hostNameType Hostname type. Possible values include: 'Verified', 'Managed' + * @return the next update stage + */ + Update withHostNameType(HostNameType hostNameType); + } + + /** + * The stage of the hostnamebinding update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the hostnamebinding update allowing to specify SiteName. + */ + interface WithSiteName { + /** + * Specifies siteName. + * @param siteName App Service app name + * @return the next update stage + */ + Update withSiteName(String siteName); + } + + /** + * The stage of the hostnamebinding update allowing to specify SslState. + */ + interface WithSslState { + /** + * Specifies sslState. + * @param sslState SSL type. Possible values include: 'Disabled', 'SniEnabled', 'IpBasedEnabled' + * @return the next update stage + */ + Update withSslState(SslState sslState); + } + + /** + * The stage of the hostnamebinding update allowing to specify Thumbprint. + */ + interface WithThumbprint { + /** + * Specifies thumbprint. + * @param thumbprint SSL certificate thumbprint + * @return the next update stage + */ + Update withThumbprint(String thumbprint); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostNameSslState.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostNameSslState.java new file mode 100644 index 0000000000000..c4fb382a03c13 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 hostname. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set hostname. + * + * @param name the name value to set + * @return the HostNameSslState object itself. + */ + public HostNameSslState withName(String name) { + this.name = name; + return this; + } + + /** + * Get sSL type. Possible values include: 'Disabled', 'SniEnabled', 'IpBasedEnabled'. + * + * @return the sslState value + */ + public SslState sslState() { + return this.sslState; + } + + /** + * Set sSL type. Possible values include: 'Disabled', 'SniEnabled', 'IpBasedEnabled'. + * + * @param sslState the sslState value to set + * @return the HostNameSslState object itself. + */ + public HostNameSslState withSslState(SslState sslState) { + this.sslState = sslState; + return this; + } + + /** + * Get virtual IP address assigned to the hostname if IP based SSL is enabled. + * + * @return the virtualIP value + */ + public String virtualIP() { + return this.virtualIP; + } + + /** + * Set virtual IP address assigned to the hostname if IP based SSL is enabled. + * + * @param virtualIP the virtualIP value to set + * @return the HostNameSslState object itself. + */ + public HostNameSslState withVirtualIP(String virtualIP) { + this.virtualIP = virtualIP; + return this; + } + + /** + * Get sSL certificate thumbprint. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Set sSL certificate thumbprint. + * + * @param thumbprint the thumbprint value to set + * @return the HostNameSslState object itself. + */ + public HostNameSslState withThumbprint(String thumbprint) { + this.thumbprint = thumbprint; + return this; + } + + /** + * Get set to <code>true</code> to update existing hostname. + * + * @return the toUpdate value + */ + public Boolean toUpdate() { + return this.toUpdate; + } + + /** + * Set set to <code>true</code> to update existing hostname. + * + * @param toUpdate the toUpdate value to set + * @return the HostNameSslState object itself. + */ + public HostNameSslState withToUpdate(Boolean toUpdate) { + this.toUpdate = toUpdate; + return this; + } + + /** + * Get indicates whether the hostname is a standard or repository hostname. Possible values include: 'Standard', 'Repository'. + * + * @return the hostType value + */ + public HostType hostType() { + return this.hostType; + } + + /** + * Set indicates whether the hostname is a standard or repository hostname. Possible values include: 'Standard', 'Repository'. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostNameType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostNameType.java new file mode 100644 index 0000000000000..bf2ff3abc8811 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostType.java new file mode 100644 index 0000000000000..b9f1358d07a1b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostingEnvironmentAppServicePlan.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostingEnvironmentAppServicePlan.java new file mode 100644 index 0000000000000..a59547cbae5f1 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostingEnvironmentAppServicePlan.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.AppServicePlanInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import org.joda.time.DateTime; +import java.util.Map; + +/** + * Type representing HostingEnvironmentAppServicePlan. + */ +public interface HostingEnvironmentAppServicePlan extends HasInner, HasManager { + /** + * @return the freeOfferExpirationTime value. + */ + DateTime freeOfferExpirationTime(); + + /** + * @return the geoRegion value. + */ + String geoRegion(); + + /** + * @return the hostingEnvironmentProfile value. + */ + HostingEnvironmentProfile hostingEnvironmentProfile(); + + /** + * @return the hyperV value. + */ + Boolean hyperV(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the isSpot value. + */ + Boolean isSpot(); + + /** + * @return the isXenon value. + */ + Boolean isXenon(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the maximumElasticWorkerCount value. + */ + Integer maximumElasticWorkerCount(); + + /** + * @return the maximumNumberOfWorkers value. + */ + Integer maximumNumberOfWorkers(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the numberOfSites value. + */ + Integer numberOfSites(); + + /** + * @return the perSiteScaling value. + */ + Boolean perSiteScaling(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the reserved value. + */ + Boolean reserved(); + + /** + * @return the resourceGroup value. + */ + String resourceGroup(); + + /** + * @return the sku value. + */ + SkuDescription sku(); + + /** + * @return the spotExpirationTime value. + */ + DateTime spotExpirationTime(); + + /** + * @return the status value. + */ + StatusOptions status(); + + /** + * @return the subscription value. + */ + String subscription(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the targetWorkerCount value. + */ + Integer targetWorkerCount(); + + /** + * @return the targetWorkerSizeId value. + */ + Integer targetWorkerSizeId(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the workerTierName value. + */ + String workerTierName(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostingEnvironmentDeploymentInfo.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostingEnvironmentDeploymentInfo.java new file mode 100644 index 0000000000000..c48d4b1cc27c3 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 name of the App Service Environment. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the App Service Environment. + * + * @param name the name value to set + * @return the HostingEnvironmentDeploymentInfo object itself. + */ + public HostingEnvironmentDeploymentInfo withName(String name) { + this.name = name; + return this; + } + + /** + * Get location of the App Service Environment. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set location of the App Service Environment. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostingEnvironmentDiagnostics.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostingEnvironmentDiagnostics.java new file mode 100644 index 0000000000000..9dbc636fa90a6 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostingEnvironmentDiagnostics.java @@ -0,0 +1,30 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.HostingEnvironmentDiagnosticsInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing HostingEnvironmentDiagnostics. + */ +public interface HostingEnvironmentDiagnostics extends HasInner, HasManager { + /** + * @return the diagnosticsOutput value. + */ + String diagnosticsOutput(); + + /** + * @return the name value. + */ + String name(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostingEnvironmentProfile.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostingEnvironmentProfile.java new file mode 100644 index 0000000000000..2f51ba59bb34a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 resource ID of the App Service Environment. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID of the App Service Environment. + * + * @param id the id value to set + * @return the HostingEnvironmentProfile object itself. + */ + public HostingEnvironmentProfile withId(String id) { + this.id = id; + return this; + } + + /** + * Get name of the App Service Environment. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get resource type of the App Service Environment. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostingEnvironmentSite.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostingEnvironmentSite.java new file mode 100644 index 0000000000000..8a96482a90bb0 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostingEnvironmentSite.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; +import java.util.UUID; +import org.joda.time.DateTime; +import java.util.Map; + +/** + * Type representing HostingEnvironmentSite. + */ +public interface HostingEnvironmentSite extends HasInner, HasManager { + /** + * @return the availabilityState value. + */ + SiteAvailabilityState availabilityState(); + + /** + * @return the clientAffinityEnabled value. + */ + Boolean clientAffinityEnabled(); + + /** + * @return the clientCertEnabled value. + */ + Boolean clientCertEnabled(); + + /** + * @return the clientCertExclusionPaths value. + */ + String clientCertExclusionPaths(); + + /** + * @return the cloningInfo value. + */ + CloningInfo cloningInfo(); + + /** + * @return the containerSize value. + */ + Integer containerSize(); + + /** + * @return the dailyMemoryTimeQuota value. + */ + Integer dailyMemoryTimeQuota(); + + /** + * @return the defaultHostName value. + */ + String defaultHostName(); + + /** + * @return the enabled value. + */ + Boolean enabled(); + + /** + * @return the enabledHostNames value. + */ + List enabledHostNames(); + + /** + * @return the hostingEnvironmentProfile value. + */ + HostingEnvironmentProfile hostingEnvironmentProfile(); + + /** + * @return the hostNames value. + */ + List hostNames(); + + /** + * @return the hostNamesDisabled value. + */ + Boolean hostNamesDisabled(); + + /** + * @return the hostNameSslStates value. + */ + List hostNameSslStates(); + + /** + * @return the httpsOnly value. + */ + Boolean httpsOnly(); + + /** + * @return the hyperV value. + */ + Boolean hyperV(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * @return the inProgressOperationId value. + */ + UUID inProgressOperationId(); + + /** + * @return the isDefaultContainer value. + */ + Boolean isDefaultContainer(); + + /** + * @return the isXenon value. + */ + Boolean isXenon(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the lastModifiedTimeUtc value. + */ + DateTime lastModifiedTimeUtc(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the maxNumberOfWorkers value. + */ + Integer maxNumberOfWorkers(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the outboundIpAddresses value. + */ + String outboundIpAddresses(); + + /** + * @return the possibleOutboundIpAddresses value. + */ + String possibleOutboundIpAddresses(); + + /** + * @return the redundancyMode value. + */ + RedundancyMode redundancyMode(); + + /** + * @return the repositorySiteName value. + */ + String repositorySiteName(); + + /** + * @return the reserved value. + */ + Boolean reserved(); + + /** + * @return the resourceGroup value. + */ + String resourceGroup(); + + /** + * @return the scmSiteAlsoStopped value. + */ + Boolean scmSiteAlsoStopped(); + + /** + * @return the serverFarmId value. + */ + String serverFarmId(); + + /** + * @return the siteConfig value. + */ + SiteConfig siteConfig(); + + /** + * @return the slotSwapStatus value. + */ + SlotSwapStatus slotSwapStatus(); + + /** + * @return the state value. + */ + String state(); + + /** + * @return the suspendedTill value. + */ + DateTime suspendedTill(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the targetSwapSlot value. + */ + String targetSwapSlot(); + + /** + * @return the trafficManagerHostNames value. + */ + List trafficManagerHostNames(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the usageState value. + */ + UsageState usageState(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostingEnvironmentStatus.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HostingEnvironmentStatus.java new file mode 100644 index 0000000000000..44babb5b59ea3 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HttpLogsConfig.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HttpLogsConfig.java new file mode 100644 index 0000000000000..1a41cac5d3d8c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 http logs to file system configuration. + * + * @return the fileSystem value + */ + public FileSystemHttpLogsConfig fileSystem() { + return this.fileSystem; + } + + /** + * Set http logs to file system configuration. + * + * @param fileSystem the fileSystem value to set + * @return the HttpLogsConfig object itself. + */ + public HttpLogsConfig withFileSystem(FileSystemHttpLogsConfig fileSystem) { + this.fileSystem = fileSystem; + return this; + } + + /** + * Get http logs to azure blob storage configuration. + * + * @return the azureBlobStorage value + */ + public AzureBlobStorageHttpLogsConfig azureBlobStorage() { + return this.azureBlobStorage; + } + + /** + * Set http logs to azure blob storage configuration. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HybridConnection.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HybridConnection.java new file mode 100644 index 0000000000000..0c4f07880ddbe --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HybridConnection.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.HybridConnectionInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing HybridConnection. + */ +public interface HybridConnection extends HasInner, HasManager { + /** + * @return the hostname value. + */ + String hostname(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the port value. + */ + Integer port(); + + /** + * @return the relayArmUri value. + */ + String relayArmUri(); + + /** + * @return the relayName value. + */ + String relayName(); + + /** + * @return the sendKeyName value. + */ + String sendKeyName(); + + /** + * @return the sendKeyValue value. + */ + String sendKeyValue(); + + /** + * @return the serviceBusNamespace value. + */ + String serviceBusNamespace(); + + /** + * @return the serviceBusSuffix value. + */ + String serviceBusSuffix(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HybridConnectionKey.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HybridConnectionKey.java new file mode 100644 index 0000000000000..d0640beaaa2b9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HybridConnectionKey.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.HybridConnectionKeyInner; + +/** + * Type representing HybridConnectionKey. + */ +public interface HybridConnectionKey extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the sendKeyName value. + */ + String sendKeyName(); + + /** + * @return the sendKeyValue value. + */ + String sendKeyValue(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HybridConnectionLimits.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HybridConnectionLimits.java new file mode 100644 index 0000000000000..1b3940d760b20 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/HybridConnectionLimits.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.HybridConnectionLimitsInner; + +/** + * Type representing HybridConnectionLimits. + */ +public interface HybridConnectionLimits extends HasInner, HasManager { + /** + * @return the current value. + */ + Integer current(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the maximum value. + */ + Integer maximum(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Identifier.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Identifier.java new file mode 100644 index 0000000000000..46a86ac5b762e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Identifier.java @@ -0,0 +1,146 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.IdentifierInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing Identifier. + */ +public interface Identifier extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the value value. + */ + String value(); + + /** + * The entirety of the Identifier definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithSite, DefinitionStages.WithCreate { + } + + /** + * Grouping of Identifier definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Identifier definition. + */ + interface Blank extends WithSite { + } + + /** + * The stage of the identifier definition allowing to specify Site. + */ + interface WithSite { + /** + * Specifies resourceGroupName, name. + * @param resourceGroupName Name of the resource group to which the resource belongs + * @param name Name of the app + * @return the next definition stage + */ + WithCreate withExistingSite(String resourceGroupName, String name); + } + + /** + * The stage of the identifier definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the identifier definition allowing to specify Value. + */ + interface WithValue { + /** + * Specifies value. + * @param value String representation of the identity + * @return the next definition stage + */ + WithCreate withValue(String value); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithKind, DefinitionStages.WithValue { + } + } + /** + * The template for a Identifier update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithKind, UpdateStages.WithValue { + } + + /** + * Grouping of Identifier update stages. + */ + interface UpdateStages { + /** + * The stage of the identifier update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the identifier update allowing to specify Value. + */ + interface WithValue { + /** + * Specifies value. + * @param value String representation of the identity + * @return the next update stage + */ + Update withValue(String value); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/InAvailabilityReasonType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/InAvailabilityReasonType.java new file mode 100644 index 0000000000000..7776464e2e7ee --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/InboundEnvironmentEndpoint.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/InboundEnvironmentEndpoint.java new file mode 100644 index 0000000000000..f237cb68f381c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/InboundEnvironmentEndpoint.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.InboundEnvironmentEndpointInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; + +/** + * Type representing InboundEnvironmentEndpoint. + */ +public interface InboundEnvironmentEndpoint extends HasInner, HasManager { + /** + * @return the description value. + */ + String description(); + + /** + * @return the endpoints value. + */ + List endpoints(); + + /** + * @return the ports value. + */ + List ports(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/InternalLoadBalancingMode.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/InternalLoadBalancingMode.java new file mode 100644 index 0000000000000..e4315ad1baf77 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/IpFilterTag.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/IpFilterTag.java new file mode 100644 index 0000000000000..54c38683621a3 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/IpFilterTag.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for IpFilterTag. + */ +public enum IpFilterTag { + /** Enum value Default. */ + DEFAULT("Default"), + + /** Enum value XffProxy. */ + XFF_PROXY("XffProxy"); + + /** The actual serialized value for a IpFilterTag instance. */ + private String value; + + IpFilterTag(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a IpFilterTag instance. + * + * @param value the serialized value to parse. + * @return the parsed IpFilterTag object, or null if unable to parse. + */ + @JsonCreator + public static IpFilterTag fromString(String value) { + IpFilterTag[] items = IpFilterTag.values(); + for (IpFilterTag item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/IpSecurityRestriction.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/IpSecurityRestriction.java new file mode 100644 index 0000000000000..898e5408d4bda --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/IpSecurityRestriction.java @@ -0,0 +1,287 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * IP security restriction on an app. + */ +public class IpSecurityRestriction { + /** + * IP address the security restriction is valid for. + * It can be in form of pure ipv4 address (required SubnetMask property) or + * CIDR notation such as ipv4/mask (leading bit match). For CIDR, + * SubnetMask property must not be specified. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * Subnet mask for the range of IP addresses the restriction is valid for. + */ + @JsonProperty(value = "subnetMask") + private String subnetMask; + + /** + * Virtual network resource id. + */ + @JsonProperty(value = "vnetSubnetResourceId") + private String vnetSubnetResourceId; + + /** + * (internal) Vnet traffic tag. + */ + @JsonProperty(value = "vnetTrafficTag") + private Integer vnetTrafficTag; + + /** + * (internal) Subnet traffic tag. + */ + @JsonProperty(value = "subnetTrafficTag") + private Integer subnetTrafficTag; + + /** + * Allow or Deny access for this IP range. + */ + @JsonProperty(value = "action") + private String action; + + /** + * Defines what this IP filter will be used for. This is to support IP + * filtering on proxies. Possible values include: 'Default', 'XffProxy'. + */ + @JsonProperty(value = "tag") + private IpFilterTag tag; + + /** + * Priority of IP restriction rule. + */ + @JsonProperty(value = "priority") + private Integer priority; + + /** + * IP restriction rule name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * IP restriction rule description. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get iP address the security restriction is valid for. + It can be in form of pure ipv4 address (required SubnetMask property) or + CIDR notation such as ipv4/mask (leading bit match). For CIDR, + SubnetMask property must not be specified. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set iP address the security restriction is valid for. + It can be in form of pure ipv4 address (required SubnetMask property) or + CIDR notation such as ipv4/mask (leading bit match). For CIDR, + SubnetMask property must not be specified. + * + * @param ipAddress the ipAddress value to set + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get subnet mask for the range of IP addresses the restriction is valid for. + * + * @return the subnetMask value + */ + public String subnetMask() { + return this.subnetMask; + } + + /** + * Set subnet mask for the range of IP addresses the restriction is valid for. + * + * @param subnetMask the subnetMask value to set + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withSubnetMask(String subnetMask) { + this.subnetMask = subnetMask; + return this; + } + + /** + * Get virtual network resource id. + * + * @return the vnetSubnetResourceId value + */ + public String vnetSubnetResourceId() { + return this.vnetSubnetResourceId; + } + + /** + * Set virtual network resource id. + * + * @param vnetSubnetResourceId the vnetSubnetResourceId value to set + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withVnetSubnetResourceId(String vnetSubnetResourceId) { + this.vnetSubnetResourceId = vnetSubnetResourceId; + return this; + } + + /** + * Get (internal) Vnet traffic tag. + * + * @return the vnetTrafficTag value + */ + public Integer vnetTrafficTag() { + return this.vnetTrafficTag; + } + + /** + * Set (internal) Vnet traffic tag. + * + * @param vnetTrafficTag the vnetTrafficTag value to set + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withVnetTrafficTag(Integer vnetTrafficTag) { + this.vnetTrafficTag = vnetTrafficTag; + return this; + } + + /** + * Get (internal) Subnet traffic tag. + * + * @return the subnetTrafficTag value + */ + public Integer subnetTrafficTag() { + return this.subnetTrafficTag; + } + + /** + * Set (internal) Subnet traffic tag. + * + * @param subnetTrafficTag the subnetTrafficTag value to set + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withSubnetTrafficTag(Integer subnetTrafficTag) { + this.subnetTrafficTag = subnetTrafficTag; + return this; + } + + /** + * Get allow or Deny access for this IP range. + * + * @return the action value + */ + public String action() { + return this.action; + } + + /** + * Set allow or Deny access for this IP range. + * + * @param action the action value to set + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withAction(String action) { + this.action = action; + return this; + } + + /** + * Get defines what this IP filter will be used for. This is to support IP filtering on proxies. Possible values include: 'Default', 'XffProxy'. + * + * @return the tag value + */ + public IpFilterTag tag() { + return this.tag; + } + + /** + * Set defines what this IP filter will be used for. This is to support IP filtering on proxies. Possible values include: 'Default', 'XffProxy'. + * + * @param tag the tag value to set + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withTag(IpFilterTag tag) { + this.tag = tag; + return this; + } + + /** + * Get priority of IP restriction rule. + * + * @return the priority value + */ + public Integer priority() { + return this.priority; + } + + /** + * Set priority of IP restriction rule. + * + * @param priority the priority value to set + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get iP restriction rule name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set iP restriction rule name. + * + * @param name the name value to set + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withName(String name) { + this.name = name; + return this; + } + + /** + * Get iP restriction rule description. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set iP restriction rule description. + * + * @param description the description value to set + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/IssueType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/IssueType.java new file mode 100644 index 0000000000000..acf636b698f25 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/KeyInfo.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/KeyInfo.java new file mode 100644 index 0000000000000..4a8df624d26bc --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/KeyInfo.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.KeyInfoInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing KeyInfo. + */ +public interface KeyInfo extends HasInner, Indexable, HasManager { + /** + * @return the name value. + */ + String name(); + + /** + * @return the value value. + */ + String value(); + + /** + * The entirety of the KeyInfo definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithFunction, DefinitionStages.WithCreate { + } + + /** + * Grouping of KeyInfo definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a KeyInfo definition. + */ + interface Blank extends WithFunction { + } + + /** + * The stage of the keyinfo definition allowing to specify Function. + */ + interface WithFunction { + /** + * Specifies resourceGroupName, name, functionName. + * @param resourceGroupName Name of the resource group to which the resource belongs + * @param name Site name + * @param functionName The name of the function + * @return the next definition stage + */ + WithCreate withExistingFunction(String resourceGroupName, String name, String functionName); + } + + /** + * The stage of the keyinfo definition allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name Key name + * @return the next definition stage + */ + WithCreate withName(String name); + } + + /** + * The stage of the keyinfo definition allowing to specify Value. + */ + interface WithValue { + /** + * Specifies value. + * @param value Key value + * @return the next definition stage + */ + WithCreate withValue(String value); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithName, DefinitionStages.WithValue { + } + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/KeyVaultReferenceCollection.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/KeyVaultReferenceCollection.java new file mode 100644 index 0000000000000..ccb23352015f2 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/KeyVaultReferenceCollection.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.KeyVaultReferenceCollectionInner; +import java.util.Map; + +/** + * Type representing KeyVaultReferenceCollection. + */ +public interface KeyVaultReferenceCollection extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the keyToReferenceStatuses value. + */ + Map keyToReferenceStatuses(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/KeyVaultReferenceResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/KeyVaultReferenceResource.java new file mode 100644 index 0000000000000..c1fe7aeb58f1d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/KeyVaultReferenceResource.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.KeyVaultReferenceResourceInner; + +/** + * Type representing KeyVaultReferenceResource. + */ +public interface KeyVaultReferenceResource extends HasInner, HasManager { + /** + * @return the details value. + */ + String details(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the identityType value. + */ + ManagedServiceIdentityType identityType(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the location value. + */ + ConfigReferenceLocation location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the reference value. + */ + String reference(); + + /** + * @return the secretName value. + */ + String secretName(); + + /** + * @return the secretVersion value. + */ + String secretVersion(); + + /** + * @return the source value. + */ + ConfigReferenceSource source(); + + /** + * @return the status value. + */ + ResolveStatus status(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the vaultName value. + */ + String vaultName(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/KeyVaultSecretStatus.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/KeyVaultSecretStatus.java new file mode 100644 index 0000000000000..2970260b4aa2b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/LocalizableString.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/LocalizableString.java new file mode 100644 index 0000000000000..b488f3a7e8bd7 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 non-localized name. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set non-localized name. + * + * @param value the value value to set + * @return the LocalizableString object itself. + */ + public LocalizableString withValue(String value) { + this.value = value; + return this; + } + + /** + * Get localized name. + * + * @return the localizedValue value + */ + public String localizedValue() { + return this.localizedValue; + } + + /** + * Set localized name. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/LogLevel.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/LogLevel.java new file mode 100644 index 0000000000000..fe9dd4269643f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/LogSpecification.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/LogSpecification.java new file mode 100644 index 0000000000000..a44eb310ad410 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/LogSpecification.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Log Definition of a single resource metric. + */ +public class LogSpecification { + /** + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The displayName property. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * The blobDuration property. + */ + @JsonProperty(value = "blobDuration") + private String blobDuration; + + /** + * 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 LogSpecification object itself. + */ + public LogSpecification 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 LogSpecification object itself. + */ + public LogSpecification withDisplayName(String displayName) { + this.displayName = displayName; + 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 LogSpecification object itself. + */ + public LogSpecification withBlobDuration(String blobDuration) { + this.blobDuration = blobDuration; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeploy.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeploy.java new file mode 100644 index 0000000000000..18b22c3448f51 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeploy.java @@ -0,0 +1,245 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * MSDeploy ARM PUT information. + */ +@JsonFlatten +public class MSDeploy 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; + + /** + * List of Add-On packages. Add-On packages implicitly enable the Do Not + * Delete MSDeploy rule. + */ + @JsonProperty(value = "properties.addOnPackages") + private List addOnPackages; + + /** + * Get package URI. + * + * @return the packageUri value + */ + public String packageUri() { + return this.packageUri; + } + + /** + * Set package URI. + * + * @param packageUri the packageUri value to set + * @return the MSDeploy object itself. + */ + public MSDeploy withPackageUri(String packageUri) { + this.packageUri = packageUri; + return this; + } + + /** + * Get sQL Connection String. + * + * @return the connectionString value + */ + public String connectionString() { + return this.connectionString; + } + + /** + * Set sQL Connection String. + * + * @param connectionString the connectionString value to set + * @return the MSDeploy object itself. + */ + public MSDeploy withConnectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + + /** + * Get database Type. + * + * @return the dbType value + */ + public String dbType() { + return this.dbType; + } + + /** + * Set database Type. + * + * @param dbType the dbType value to set + * @return the MSDeploy object itself. + */ + public MSDeploy withDbType(String dbType) { + this.dbType = dbType; + return this; + } + + /** + * Get uRI of MSDeploy Parameters file. Must not be set if SetParameters is used. + * + * @return the setParametersXmlFileUri value + */ + public String setParametersXmlFileUri() { + return this.setParametersXmlFileUri; + } + + /** + * Set uRI of MSDeploy Parameters file. Must not be set if SetParameters is used. + * + * @param setParametersXmlFileUri the setParametersXmlFileUri value to set + * @return the MSDeploy object itself. + */ + public MSDeploy withSetParametersXmlFileUri(String setParametersXmlFileUri) { + this.setParametersXmlFileUri = setParametersXmlFileUri; + return this; + } + + /** + * Get mSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. + * + * @return the setParameters value + */ + public Map setParameters() { + return this.setParameters; + } + + /** + * Set mSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. + * + * @param setParameters the setParameters value to set + * @return the MSDeploy object itself. + */ + public MSDeploy withSetParameters(Map setParameters) { + this.setParameters = setParameters; + return this; + } + + /** + * Get 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. + * + * @return the skipAppData value + */ + public Boolean skipAppData() { + return this.skipAppData; + } + + /** + * Set 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. + * + * @param skipAppData the skipAppData value to set + * @return the MSDeploy object itself. + */ + public MSDeploy withSkipAppData(Boolean skipAppData) { + this.skipAppData = skipAppData; + return this; + } + + /** + * Get sets the AppOffline rule while the MSDeploy operation executes. + Setting is <code>false</code> by default. + * + * @return the appOffline value + */ + public Boolean appOffline() { + return this.appOffline; + } + + /** + * Set sets the AppOffline rule while the MSDeploy operation executes. + Setting is <code>false</code> by default. + * + * @param appOffline the appOffline value to set + * @return the MSDeploy object itself. + */ + public MSDeploy withAppOffline(Boolean appOffline) { + this.appOffline = appOffline; + return this; + } + + /** + * Get list of Add-On packages. Add-On packages implicitly enable the Do Not Delete MSDeploy rule. + * + * @return the addOnPackages value + */ + public List addOnPackages() { + return this.addOnPackages; + } + + /** + * Set list of Add-On packages. Add-On packages implicitly enable the Do Not Delete MSDeploy rule. + * + * @param addOnPackages the addOnPackages value to set + * @return the MSDeploy object itself. + */ + public MSDeploy withAddOnPackages(List addOnPackages) { + this.addOnPackages = addOnPackages; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeployCore.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeployCore.java new file mode 100644 index 0000000000000..44087fc50c88c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeployCore.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * MSDeploy ARM PUT core information. + */ +public class MSDeployCore { + /** + * Package URI. + */ + @JsonProperty(value = "packageUri") + private String packageUri; + + /** + * SQL Connection String. + */ + @JsonProperty(value = "connectionString") + private String connectionString; + + /** + * Database Type. + */ + @JsonProperty(value = "dbType") + private String dbType; + + /** + * URI of MSDeploy Parameters file. Must not be set if SetParameters is + * used. + */ + @JsonProperty(value = "setParametersXmlFileUri") + private String setParametersXmlFileUri; + + /** + * MSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. + */ + @JsonProperty(value = "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 = "skipAppData") + private Boolean skipAppData; + + /** + * Sets the AppOffline rule while the MSDeploy operation executes. + * Setting is <code>false</code> by default. + */ + @JsonProperty(value = "appOffline") + private Boolean appOffline; + + /** + * Get package URI. + * + * @return the packageUri value + */ + public String packageUri() { + return this.packageUri; + } + + /** + * Set package URI. + * + * @param packageUri the packageUri value to set + * @return the MSDeployCore object itself. + */ + public MSDeployCore withPackageUri(String packageUri) { + this.packageUri = packageUri; + return this; + } + + /** + * Get sQL Connection String. + * + * @return the connectionString value + */ + public String connectionString() { + return this.connectionString; + } + + /** + * Set sQL Connection String. + * + * @param connectionString the connectionString value to set + * @return the MSDeployCore object itself. + */ + public MSDeployCore withConnectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + + /** + * Get database Type. + * + * @return the dbType value + */ + public String dbType() { + return this.dbType; + } + + /** + * Set database Type. + * + * @param dbType the dbType value to set + * @return the MSDeployCore object itself. + */ + public MSDeployCore withDbType(String dbType) { + this.dbType = dbType; + return this; + } + + /** + * Get uRI of MSDeploy Parameters file. Must not be set if SetParameters is used. + * + * @return the setParametersXmlFileUri value + */ + public String setParametersXmlFileUri() { + return this.setParametersXmlFileUri; + } + + /** + * Set uRI of MSDeploy Parameters file. Must not be set if SetParameters is used. + * + * @param setParametersXmlFileUri the setParametersXmlFileUri value to set + * @return the MSDeployCore object itself. + */ + public MSDeployCore withSetParametersXmlFileUri(String setParametersXmlFileUri) { + this.setParametersXmlFileUri = setParametersXmlFileUri; + return this; + } + + /** + * Get mSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. + * + * @return the setParameters value + */ + public Map setParameters() { + return this.setParameters; + } + + /** + * Set mSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. + * + * @param setParameters the setParameters value to set + * @return the MSDeployCore object itself. + */ + public MSDeployCore withSetParameters(Map setParameters) { + this.setParameters = setParameters; + return this; + } + + /** + * Get 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. + * + * @return the skipAppData value + */ + public Boolean skipAppData() { + return this.skipAppData; + } + + /** + * Set 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. + * + * @param skipAppData the skipAppData value to set + * @return the MSDeployCore object itself. + */ + public MSDeployCore withSkipAppData(Boolean skipAppData) { + this.skipAppData = skipAppData; + return this; + } + + /** + * Get sets the AppOffline rule while the MSDeploy operation executes. + Setting is <code>false</code> by default. + * + * @return the appOffline value + */ + public Boolean appOffline() { + return this.appOffline; + } + + /** + * Set sets the AppOffline rule while the MSDeploy operation executes. + Setting is <code>false</code> by default. + * + * @param appOffline the appOffline value to set + * @return the MSDeployCore object itself. + */ + public MSDeployCore withAppOffline(Boolean appOffline) { + this.appOffline = appOffline; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeployLog.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeployLog.java new file mode 100644 index 0000000000000..b20fd865bb7aa --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeployLog.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.MSDeployLogInner; +import java.util.List; + +/** + * Type representing MSDeployLog. + */ +public interface MSDeployLog extends HasInner, HasManager { + /** + * @return the entries value. + */ + List entries(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeployLogEntry.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeployLogEntry.java new file mode 100644 index 0000000000000..24a7aacd744ad --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 timestamp of log entry. + * + * @return the time value + */ + public DateTime time() { + return this.time; + } + + /** + * Get log entry type. Possible values include: 'Message', 'Warning', 'Error'. + * + * @return the type value + */ + public MSDeployLogEntryType type() { + return this.type; + } + + /** + * Get log entry message. + * + * @return the message value + */ + public String message() { + return this.message; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeployLogEntryType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeployLogEntryType.java new file mode 100644 index 0000000000000..b2f0d8fe69300 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeployProvisioningState.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeployProvisioningState.java new file mode 100644 index 0000000000000..5bc1cc41c67bf --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeployStatus.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeployStatus.java new file mode 100644 index 0000000000000..70b550f8ec144 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MSDeployStatus.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.MSDeployStatusInner; +import org.joda.time.DateTime; + +/** + * Type representing MSDeployStatus. + */ +public interface MSDeployStatus extends HasInner, HasManager { + /** + * @return the complete value. + */ + Boolean complete(); + + /** + * @return the deployer value. + */ + String deployer(); + + /** + * @return the endTime value. + */ + DateTime endTime(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provisioningState value. + */ + MSDeployProvisioningState provisioningState(); + + /** + * @return the startTime value. + */ + DateTime startTime(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ManagedPipelineMode.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ManagedPipelineMode.java new file mode 100644 index 0000000000000..f405212f2bc92 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ManagedServiceIdentity.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ManagedServiceIdentity.java new file mode 100644 index 0000000000000..a018e355cc672 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ManagedServiceIdentity.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Managed service identity. + */ +public class ManagedServiceIdentity { + /** + * Type of managed service identity. Possible values include: + * 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + * 'None'. + */ + @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; + + /** + * The list of user assigned identities associated with the resource. The + * user identity dictionary key references will be ARM resource ids in the + * form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + */ + @JsonProperty(value = "userAssignedIdentities") + private Map userAssignedIdentities; + + /** + * Get type of managed service identity. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. + * + * @return the type value + */ + public ManagedServiceIdentityType type() { + return this.type; + } + + /** + * Set type of managed service identity. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. + * + * @param type the type value to set + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get tenant of managed service identity. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get principal Id of managed service identity. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the list of user assigned identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * + * @return the userAssignedIdentities value + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the list of user assigned identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * + * @param userAssignedIdentities the userAssignedIdentities value to set + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ManagedServiceIdentityType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ManagedServiceIdentityType.java new file mode 100644 index 0000000000000..0edf2514910f1 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ManagedServiceIdentityType.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ManagedServiceIdentityType. + */ +public enum ManagedServiceIdentityType { + /** Enum value SystemAssigned. */ + SYSTEM_ASSIGNED("SystemAssigned"), + + /** Enum value UserAssigned. */ + USER_ASSIGNED("UserAssigned"), + + /** Enum value SystemAssigned, UserAssigned. */ + SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned, UserAssigned"), + + /** Enum value None. */ + NONE("None"); + + /** The actual serialized value for a ManagedServiceIdentityType instance. */ + private String value; + + ManagedServiceIdentityType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ManagedServiceIdentityType instance. + * + * @param value the serialized value to parse. + * @return the parsed ManagedServiceIdentityType object, or null if unable to parse. + */ + @JsonCreator + public static ManagedServiceIdentityType fromString(String value) { + ManagedServiceIdentityType[] items = ManagedServiceIdentityType.values(); + for (ManagedServiceIdentityType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ManagedServiceIdentityUserAssignedIdentitiesValue.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ManagedServiceIdentityUserAssignedIdentitiesValue.java new file mode 100644 index 0000000000000..67dae5090201c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ManagedServiceIdentityUserAssignedIdentitiesValue.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ManagedServiceIdentityUserAssignedIdentitiesValue model. + */ +public class ManagedServiceIdentityUserAssignedIdentitiesValue { + /** + * Principal Id of user assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /** + * Client Id of user assigned identity. + */ + @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) + private String clientId; + + /** + * Get principal Id of user assigned identity. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Get client Id of user assigned identity. + * + * @return the clientId value + */ + public String clientId() { + return this.clientId; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MetricAvailability.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MetricAvailability.java new file mode 100644 index 0000000000000..85249619b7b60 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MetricSpecification.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MetricSpecification.java new file mode 100644 index 0000000000000..221afe7e69e67 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MetricSpecification.java @@ -0,0 +1,434 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +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; + + /** + * The supportedTimeGrainTypes property. + */ + @JsonProperty(value = "supportedTimeGrainTypes") + private List supportedTimeGrainTypes; + + /** + * 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; + } + + /** + * Get the supportedTimeGrainTypes value. + * + * @return the supportedTimeGrainTypes value + */ + public List supportedTimeGrainTypes() { + return this.supportedTimeGrainTypes; + } + + /** + * Set the supportedTimeGrainTypes value. + * + * @param supportedTimeGrainTypes the supportedTimeGrainTypes value to set + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSupportedTimeGrainTypes(List supportedTimeGrainTypes) { + this.supportedTimeGrainTypes = supportedTimeGrainTypes; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MigrateMySqlRequest.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MigrateMySqlRequest.java new file mode 100644 index 0000000000000..cdbaeb0eed60b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MigrateMySqlRequest.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * MySQL migration request. + */ +@JsonFlatten +public class MigrateMySqlRequest 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 connection string to the remote MySQL database. + * + * @return the connectionString value + */ + public String connectionString() { + return this.connectionString; + } + + /** + * Set connection string to the remote MySQL database. + * + * @param connectionString the connectionString value to set + * @return the MigrateMySqlRequest object itself. + */ + public MigrateMySqlRequest withConnectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + + /** + * Get the type of migration operation to be done. Possible values include: 'LocalToRemote', 'RemoteToLocal'. + * + * @return the migrationType value + */ + public MySqlMigrationType migrationType() { + return this.migrationType; + } + + /** + * Set the type of migration operation to be done. Possible values include: 'LocalToRemote', 'RemoteToLocal'. + * + * @param migrationType the migrationType value to set + * @return the MigrateMySqlRequest object itself. + */ + public MigrateMySqlRequest withMigrationType(MySqlMigrationType migrationType) { + this.migrationType = migrationType; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MigrateMySqlStatus.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MigrateMySqlStatus.java new file mode 100644 index 0000000000000..898472e1f540b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MigrateMySqlStatus.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.MigrateMySqlStatusInner; + +/** + * Type representing MigrateMySqlStatus. + */ +public interface MigrateMySqlStatus extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the localMySqlEnabled value. + */ + Boolean localMySqlEnabled(); + + /** + * @return the migrationOperationStatus value. + */ + OperationStatus migrationOperationStatus(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the operationId value. + */ + String operationId(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MultiRolePools.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MultiRolePools.java new file mode 100644 index 0000000000000..24640d288d98a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MultiRolePools.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.WorkerPoolResourceInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; + +/** + * Type representing MultiRolePools. + */ +public interface MultiRolePools extends HasInner, HasManager { + /** + * @return the computeMode value. + */ + ComputeModeOptions computeMode(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the instanceNames value. + */ + List instanceNames(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the sku value. + */ + SkuDescription sku(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the workerCount value. + */ + Integer workerCount(); + + /** + * @return the workerSize value. + */ + String workerSize(); + + /** + * @return the workerSizeId value. + */ + Integer workerSizeId(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MySqlMigrationType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/MySqlMigrationType.java new file mode 100644 index 0000000000000..b9609a8f3e4de --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/NameIdentifier.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/NameIdentifier.java new file mode 100644 index 0000000000000..1bd07d9cf4a4a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/NameIdentifier.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.NameIdentifierInner; + +/** + * Type representing NameIdentifier. + */ +public interface NameIdentifier extends HasInner, HasManager { + /** + * @return the name value. + */ + String name(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/NameValuePair.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/NameValuePair.java new file mode 100644 index 0000000000000..42396e7491497 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 pair name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set pair name. + * + * @param name the name value to set + * @return the NameValuePair object itself. + */ + public NameValuePair withName(String name) { + this.name = name; + return this; + } + + /** + * Get pair value. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set pair 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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/NetworkAccessControlEntry.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/NetworkAccessControlEntry.java new file mode 100644 index 0000000000000..1899e459e3dd4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 action object. Possible values include: 'Permit', 'Deny'. + * + * @return the action value + */ + public AccessControlEntryAction action() { + return this.action; + } + + /** + * Set action object. Possible values include: 'Permit', 'Deny'. + * + * @param action the action value to set + * @return the NetworkAccessControlEntry object itself. + */ + public NetworkAccessControlEntry withAction(AccessControlEntryAction action) { + this.action = action; + return this; + } + + /** + * Get description of network access control entry. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of network access control entry. + * + * @param description the description value to set + * @return the NetworkAccessControlEntry object itself. + */ + public NetworkAccessControlEntry withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get order of precedence. + * + * @return the order value + */ + public Integer order() { + return this.order; + } + + /** + * Set order of precedence. + * + * @param order the order value to set + * @return the NetworkAccessControlEntry object itself. + */ + public NetworkAccessControlEntry withOrder(Integer order) { + this.order = order; + return this; + } + + /** + * Get remote subnet. + * + * @return the remoteSubnet value + */ + public String remoteSubnet() { + return this.remoteSubnet; + } + + /** + * Set remote subnet. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/NetworkFeatures.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/NetworkFeatures.java new file mode 100644 index 0000000000000..76b052ea74d00 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/NetworkFeatures.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.NetworkFeaturesInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; + +/** + * Type representing NetworkFeatures. + */ +public interface NetworkFeatures extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the hybridConnections value. + */ + List hybridConnections(); + + /** + * @return the hybridConnectionsV2 value. + */ + List hybridConnectionsV2(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the virtualNetworkConnection value. + */ + SiteVnetInfo virtualNetworkConnection(); + + /** + * @return the virtualNetworkName value. + */ + String virtualNetworkName(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/NetworkTrace.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/NetworkTrace.java new file mode 100644 index 0000000000000..0570270e4b68b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/NetworkTrace.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.NetworkTraceInner; + +/** + * Type representing NetworkTrace. + */ +public interface NetworkTrace extends HasInner, HasManager { + /** + * @return the message value. + */ + String message(); + + /** + * @return the path value. + */ + String path(); + + /** + * @return the status value. + */ + String status(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/NotificationLevel.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/NotificationLevel.java new file mode 100644 index 0000000000000..5dd8653cfb326 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Operation.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Operation.java new file mode 100644 index 0000000000000..228f9d89ddb9a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Operation.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.OperationInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import org.joda.time.DateTime; +import java.util.List; +import java.util.UUID; + +/** + * Type representing Operation. + */ +public interface Operation extends HasInner, HasManager { + /** + * @return the createdTime value. + */ + DateTime createdTime(); + + /** + * @return the errors value. + */ + List errors(); + + /** + * @return the expirationTime value. + */ + DateTime expirationTime(); + + /** + * @return the geoMasterOperationId value. + */ + UUID geoMasterOperationId(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the modifiedTime value. + */ + DateTime modifiedTime(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the status value. + */ + OperationStatus status(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/OperationStatus.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/OperationStatus.java new file mode 100644 index 0000000000000..64565d5d670a1 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/OutboundEnvironmentEndpoint.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/OutboundEnvironmentEndpoint.java new file mode 100644 index 0000000000000..579447be3130f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/OutboundEnvironmentEndpoint.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.OutboundEnvironmentEndpointInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; + +/** + * Type representing OutboundEnvironmentEndpoint. + */ +public interface OutboundEnvironmentEndpoint extends HasInner, HasManager { + /** + * @return the category value. + */ + String category(); + + /** + * @return the endpoints value. + */ + List endpoints(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PerfMonResponse.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PerfMonResponse.java new file mode 100644 index 0000000000000..d149ec4a43fea --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PerfMonResponse.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.PerfMonResponseInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing PerfMonResponse. + */ +public interface PerfMonResponse extends HasInner, HasManager { + /** + * @return the code value. + */ + String code(); + + /** + * @return the data value. + */ + PerfMonSet data(); + + /** + * @return the message value. + */ + String message(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PerfMonSample.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PerfMonSample.java new file mode 100644 index 0000000000000..0a3c9220832c8 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PerfMonSample.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.appservice.v2019_08_01; + +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; + + /** + * Get point in time for which counter was measured. + * + * @return the time value + */ + public DateTime time() { + return this.time; + } + + /** + * Set point in time for which counter was measured. + * + * @param time the time value to set + * @return the PerfMonSample object itself. + */ + public PerfMonSample withTime(DateTime time) { + this.time = time; + return this; + } + + /** + * Get name of the server on which the measurement is made. + * + * @return the instanceName value + */ + public String instanceName() { + return this.instanceName; + } + + /** + * Set name of the server on which the measurement is made. + * + * @param instanceName the instanceName value to set + * @return the PerfMonSample object itself. + */ + public PerfMonSample withInstanceName(String instanceName) { + this.instanceName = instanceName; + return this; + } + + /** + * Get value of counter at a certain time. + * + * @return the value value + */ + public Double value() { + return this.value; + } + + /** + * Set value of counter at a certain time. + * + * @param value the value value to set + * @return the PerfMonSample object itself. + */ + public PerfMonSample withValue(Double value) { + this.value = value; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PerfMonSet.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PerfMonSet.java new file mode 100644 index 0000000000000..69872cf19b36d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 unique key name of the counter. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set unique key name of the counter. + * + * @param name the name value to set + * @return the PerfMonSet object itself. + */ + public PerfMonSet withName(String name) { + this.name = name; + return this; + } + + /** + * Get start time of the period. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set start time of the period. + * + * @param startTime the startTime value to set + * @return the PerfMonSet object itself. + */ + public PerfMonSet withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get end time of the period. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set end time of the period. + * + * @param endTime the endTime value to set + * @return the PerfMonSet object itself. + */ + public PerfMonSet withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get presented time grain. + * + * @return the timeGrain value + */ + public String timeGrain() { + return this.timeGrain; + } + + /** + * Set presented time grain. + * + * @param timeGrain the timeGrain value to set + * @return the PerfMonSet object itself. + */ + public PerfMonSet withTimeGrain(String timeGrain) { + this.timeGrain = timeGrain; + return this; + } + + /** + * Get collection of workers that are active during this time. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Set collection of workers that are active during this time. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PremierAddOn.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PremierAddOn.java new file mode 100644 index 0000000000000..8be876c01728d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PremierAddOn.java @@ -0,0 +1,297 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.PremierAddOnInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.Map; + +/** + * Type representing PremierAddOn. + */ +public interface PremierAddOn extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the marketplaceOffer value. + */ + String marketplaceOffer(); + + /** + * @return the marketplacePublisher value. + */ + String marketplacePublisher(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the product value. + */ + String product(); + + /** + * @return the sku value. + */ + String sku(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the vendor value. + */ + String vendor(); + + /** + * The entirety of the PremierAddOn definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithSite, DefinitionStages.WithLocation, DefinitionStages.WithCreate { + } + + /** + * Grouping of PremierAddOn definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a PremierAddOn definition. + */ + interface Blank extends WithSite { + } + + /** + * The stage of the premieraddon definition allowing to specify Site. + */ + interface WithSite { + /** + * Specifies resourceGroupName, name. + * @param resourceGroupName Name of the resource group to which the resource belongs + * @param name Name of the app + * @return the next definition stage + */ + WithLocation withExistingSite(String resourceGroupName, String name); + } + + /** + * The stage of the premieraddon definition allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location Resource Location + * @return the next definition stage + */ + WithCreate withLocation(String location); + } + + /** + * The stage of the premieraddon definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the premieraddon definition allowing to specify MarketplaceOffer. + */ + interface WithMarketplaceOffer { + /** + * Specifies marketplaceOffer. + * @param marketplaceOffer Premier add on Marketplace offer + * @return the next definition stage + */ + WithCreate withMarketplaceOffer(String marketplaceOffer); + } + + /** + * The stage of the premieraddon definition allowing to specify MarketplacePublisher. + */ + interface WithMarketplacePublisher { + /** + * Specifies marketplacePublisher. + * @param marketplacePublisher Premier add on Marketplace publisher + * @return the next definition stage + */ + WithCreate withMarketplacePublisher(String marketplacePublisher); + } + + /** + * The stage of the premieraddon definition allowing to specify Product. + */ + interface WithProduct { + /** + * Specifies product. + * @param product Premier add on Product + * @return the next definition stage + */ + WithCreate withProduct(String product); + } + + /** + * The stage of the premieraddon definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku Premier add on SKU + * @return the next definition stage + */ + WithCreate withSku(String sku); + } + + /** + * The stage of the premieraddon definition allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next definition stage + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the premieraddon definition allowing to specify Vendor. + */ + interface WithVendor { + /** + * Specifies vendor. + * @param vendor Premier add on Vendor + * @return the next definition stage + */ + WithCreate withVendor(String vendor); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithKind, DefinitionStages.WithMarketplaceOffer, DefinitionStages.WithMarketplacePublisher, DefinitionStages.WithProduct, DefinitionStages.WithSku, DefinitionStages.WithTags, DefinitionStages.WithVendor { + } + } + /** + * The template for a PremierAddOn update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithKind, UpdateStages.WithMarketplaceOffer, UpdateStages.WithMarketplacePublisher, UpdateStages.WithProduct, UpdateStages.WithSku, UpdateStages.WithVendor { + } + + /** + * Grouping of PremierAddOn update stages. + */ + interface UpdateStages { + /** + * The stage of the premieraddon update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the premieraddon update allowing to specify MarketplaceOffer. + */ + interface WithMarketplaceOffer { + /** + * Specifies marketplaceOffer. + * @param marketplaceOffer Premier add on Marketplace offer + * @return the next update stage + */ + Update withMarketplaceOffer(String marketplaceOffer); + } + + /** + * The stage of the premieraddon update allowing to specify MarketplacePublisher. + */ + interface WithMarketplacePublisher { + /** + * Specifies marketplacePublisher. + * @param marketplacePublisher Premier add on Marketplace publisher + * @return the next update stage + */ + Update withMarketplacePublisher(String marketplacePublisher); + } + + /** + * The stage of the premieraddon update allowing to specify Product. + */ + interface WithProduct { + /** + * Specifies product. + * @param product Premier add on Product + * @return the next update stage + */ + Update withProduct(String product); + } + + /** + * The stage of the premieraddon update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku Premier add on SKU + * @return the next update stage + */ + Update withSku(String sku); + } + + /** + * The stage of the premieraddon update allowing to specify Vendor. + */ + interface WithVendor { + /** + * Specifies vendor. + * @param vendor Premier add on Vendor + * @return the next update stage + */ + Update withVendor(String vendor); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PremierAddOnPatchResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PremierAddOnPatchResource.java new file mode 100644 index 0000000000000..87f257800bba9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PremierAddOnPatchResource.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * ARM resource for a PremierAddOn. + */ +@JsonFlatten +public class PremierAddOnPatchResource extends ProxyOnlyResource { + /** + * 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 Marketplace publisher. + */ + @JsonProperty(value = "properties.marketplacePublisher") + private String marketplacePublisher; + + /** + * Premier add on Marketplace offer. + */ + @JsonProperty(value = "properties.marketplaceOffer") + private String marketplaceOffer; + + /** + * Get premier add on SKU. + * + * @return the sku value + */ + public String sku() { + return this.sku; + } + + /** + * Set premier add on SKU. + * + * @param sku the sku value to set + * @return the PremierAddOnPatchResource object itself. + */ + public PremierAddOnPatchResource withSku(String sku) { + this.sku = sku; + return this; + } + + /** + * Get premier add on Product. + * + * @return the product value + */ + public String product() { + return this.product; + } + + /** + * Set premier add on Product. + * + * @param product the product value to set + * @return the PremierAddOnPatchResource object itself. + */ + public PremierAddOnPatchResource withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get premier add on Vendor. + * + * @return the vendor value + */ + public String vendor() { + return this.vendor; + } + + /** + * Set premier add on Vendor. + * + * @param vendor the vendor value to set + * @return the PremierAddOnPatchResource object itself. + */ + public PremierAddOnPatchResource withVendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Get premier add on Marketplace publisher. + * + * @return the marketplacePublisher value + */ + public String marketplacePublisher() { + return this.marketplacePublisher; + } + + /** + * Set premier add on Marketplace publisher. + * + * @param marketplacePublisher the marketplacePublisher value to set + * @return the PremierAddOnPatchResource object itself. + */ + public PremierAddOnPatchResource withMarketplacePublisher(String marketplacePublisher) { + this.marketplacePublisher = marketplacePublisher; + return this; + } + + /** + * Get premier add on Marketplace offer. + * + * @return the marketplaceOffer value + */ + public String marketplaceOffer() { + return this.marketplaceOffer; + } + + /** + * Set premier add on Marketplace offer. + * + * @param marketplaceOffer the marketplaceOffer value to set + * @return the PremierAddOnPatchResource object itself. + */ + public PremierAddOnPatchResource withMarketplaceOffer(String marketplaceOffer) { + this.marketplaceOffer = marketplaceOffer; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateAccess.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateAccess.java new file mode 100644 index 0000000000000..c022898c1aa69 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateAccess.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.PrivateAccessInner; +import java.util.List; + +/** + * Type representing PrivateAccess. + */ +public interface PrivateAccess extends HasInner, HasManager { + /** + * @return the enabled value. + */ + Boolean enabled(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the virtualNetworks value. + */ + List virtualNetworks(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateAccessSubnet.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateAccessSubnet.java new file mode 100644 index 0000000000000..12d9bd2048b57 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateAccessSubnet.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description of a Virtual Network subnet that is useable for private site + * access. + */ +public class PrivateAccessSubnet { + /** + * The name of the subnet. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The key (ID) of the subnet. + */ + @JsonProperty(value = "key") + private Integer key; + + /** + * Get the name of the subnet. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the subnet. + * + * @param name the name value to set + * @return the PrivateAccessSubnet object itself. + */ + public PrivateAccessSubnet withName(String name) { + this.name = name; + return this; + } + + /** + * Get the key (ID) of the subnet. + * + * @return the key value + */ + public Integer key() { + return this.key; + } + + /** + * Set the key (ID) of the subnet. + * + * @param key the key value to set + * @return the PrivateAccessSubnet object itself. + */ + public PrivateAccessSubnet withKey(Integer key) { + this.key = key; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateAccessVirtualNetwork.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateAccessVirtualNetwork.java new file mode 100644 index 0000000000000..6b177a95aa733 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateAccessVirtualNetwork.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.appservice.v2019_08_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description of a Virtual Network that is useable for private site access. + */ +public class PrivateAccessVirtualNetwork { + /** + * The name of the Virtual Network. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The key (ID) of the Virtual Network. + */ + @JsonProperty(value = "key") + private Integer key; + + /** + * The ARM uri of the Virtual Network. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * A List of subnets that access is allowed to on this Virtual Network. An + * empty array (but not null) is interpreted to mean that all subnets are + * allowed within this Virtual Network. + */ + @JsonProperty(value = "subnets") + private List subnets; + + /** + * Get the name of the Virtual Network. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the Virtual Network. + * + * @param name the name value to set + * @return the PrivateAccessVirtualNetwork object itself. + */ + public PrivateAccessVirtualNetwork withName(String name) { + this.name = name; + return this; + } + + /** + * Get the key (ID) of the Virtual Network. + * + * @return the key value + */ + public Integer key() { + return this.key; + } + + /** + * Set the key (ID) of the Virtual Network. + * + * @param key the key value to set + * @return the PrivateAccessVirtualNetwork object itself. + */ + public PrivateAccessVirtualNetwork withKey(Integer key) { + this.key = key; + return this; + } + + /** + * Get the ARM uri of the Virtual Network. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the ARM uri of the Virtual Network. + * + * @param resourceId the resourceId value to set + * @return the PrivateAccessVirtualNetwork object itself. + */ + public PrivateAccessVirtualNetwork withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get a List of subnets that access is allowed to on this Virtual Network. An empty array (but not null) is interpreted to mean that all subnets are allowed within this Virtual Network. + * + * @return the subnets value + */ + public List subnets() { + return this.subnets; + } + + /** + * Set a List of subnets that access is allowed to on this Virtual Network. An empty array (but not null) is interpreted to mean that all subnets are allowed within this Virtual Network. + * + * @param subnets the subnets value to set + * @return the PrivateAccessVirtualNetwork object itself. + */ + public PrivateAccessVirtualNetwork withSubnets(List subnets) { + this.subnets = subnets; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateEndpointConnectionResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateEndpointConnectionResource.java new file mode 100644 index 0000000000000..81042b17657b9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateEndpointConnectionResource.java @@ -0,0 +1,156 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.PrivateEndpointConnectionResourceInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing PrivateEndpointConnectionResource. + */ +public interface PrivateEndpointConnectionResource extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the privateEndpoint value. + */ + ArmIdWrapper privateEndpoint(); + + /** + * @return the privateLinkServiceConnectionState value. + */ + PrivateLinkConnectionState privateLinkServiceConnectionState(); + + /** + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the PrivateEndpointConnectionResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithSite, DefinitionStages.WithCreate { + } + + /** + * Grouping of PrivateEndpointConnectionResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a PrivateEndpointConnectionResource definition. + */ + interface Blank extends WithSite { + } + + /** + * The stage of the privateendpointconnectionresource definition allowing to specify Site. + */ + interface WithSite { + /** + * Specifies resourceGroupName, name. + * @param resourceGroupName Name of the resource group to which the resource belongs + * @param name Name of the site + * @return the next definition stage + */ + WithCreate withExistingSite(String resourceGroupName, String name); + } + + /** + * The stage of the privateendpointconnectionresource definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the privateendpointconnectionresource definition allowing to specify PrivateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies privateLinkServiceConnectionState. + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState parameter value + * @return the next definition stage + */ + WithCreate withPrivateLinkServiceConnectionState(PrivateLinkConnectionState privateLinkServiceConnectionState); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithKind, DefinitionStages.WithPrivateLinkServiceConnectionState { + } + } + /** + * The template for a PrivateEndpointConnectionResource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithKind, UpdateStages.WithPrivateLinkServiceConnectionState { + } + + /** + * Grouping of PrivateEndpointConnectionResource update stages. + */ + interface UpdateStages { + /** + * The stage of the privateendpointconnectionresource update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the privateendpointconnectionresource update allowing to specify PrivateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies privateLinkServiceConnectionState. + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState parameter value + * @return the next update stage + */ + Update withPrivateLinkServiceConnectionState(PrivateLinkConnectionState privateLinkServiceConnectionState); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateLinkConnectionApprovalRequestResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateLinkConnectionApprovalRequestResource.java new file mode 100644 index 0000000000000..dd71a1569f1de --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateLinkConnectionApprovalRequestResource.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Private Endpoint Connection Approval ARM resource. + */ +@JsonFlatten +public class PrivateLinkConnectionApprovalRequestResource extends ProxyOnlyResource { + /** + * The privateLinkServiceConnectionState property. + */ + @JsonProperty(value = "properties.privateLinkServiceConnectionState") + private PrivateLinkConnectionState privateLinkServiceConnectionState; + + /** + * Get the privateLinkServiceConnectionState value. + * + * @return the privateLinkServiceConnectionState value + */ + public PrivateLinkConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState value. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set + * @return the PrivateLinkConnectionApprovalRequestResource object itself. + */ + public PrivateLinkConnectionApprovalRequestResource withPrivateLinkServiceConnectionState(PrivateLinkConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateLinkConnectionState.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateLinkConnectionState.java new file mode 100644 index 0000000000000..58ee0975c6e38 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateLinkConnectionState.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The state of a private link connection. + */ +public class PrivateLinkConnectionState { + /** + * Status of a private link connection. + */ + @JsonProperty(value = "status") + private String status; + + /** + * Description of a private link connection. + */ + @JsonProperty(value = "description") + private String description; + + /** + * ActionsRequired for a private link connection. + */ + @JsonProperty(value = "actionsRequired") + private String actionsRequired; + + /** + * Get status of a private link connection. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set status of a private link connection. + * + * @param status the status value to set + * @return the PrivateLinkConnectionState object itself. + */ + public PrivateLinkConnectionState withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get description of a private link connection. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of a private link connection. + * + * @param description the description value to set + * @return the PrivateLinkConnectionState object itself. + */ + public PrivateLinkConnectionState withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get actionsRequired for a private link connection. + * + * @return the actionsRequired value + */ + public String actionsRequired() { + return this.actionsRequired; + } + + /** + * Set actionsRequired for a private link connection. + * + * @param actionsRequired the actionsRequired value to set + * @return the PrivateLinkConnectionState object itself. + */ + public PrivateLinkConnectionState withActionsRequired(String actionsRequired) { + this.actionsRequired = actionsRequired; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateLinkResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateLinkResource.java new file mode 100644 index 0000000000000..52c9ca6445a72 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateLinkResource.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A private link resource. + */ +public class PrivateLinkResource { + /** + * The id property. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * Name of a private link resource. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * The type property. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** + * Properties of a private link resource. + */ + @JsonProperty(value = "properties", required = true) + private PrivateLinkResourceProperties properties; + + /** + * 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 PrivateLinkResource object itself. + */ + public PrivateLinkResource withId(String id) { + this.id = id; + return this; + } + + /** + * Get name of a private link resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of a private link resource. + * + * @param name the name value to set + * @return the PrivateLinkResource object itself. + */ + public PrivateLinkResource withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type value. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type value. + * + * @param type the type value to set + * @return the PrivateLinkResource object itself. + */ + public PrivateLinkResource withType(String type) { + this.type = type; + return this; + } + + /** + * Get properties of a private link resource. + * + * @return the properties value + */ + public PrivateLinkResourceProperties properties() { + return this.properties; + } + + /** + * Set properties of a private link resource. + * + * @param properties the properties value to set + * @return the PrivateLinkResource object itself. + */ + public PrivateLinkResource withProperties(PrivateLinkResourceProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateLinkResourceProperties.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateLinkResourceProperties.java new file mode 100644 index 0000000000000..a32718b66dea4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateLinkResourceProperties.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.appservice.v2019_08_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of a private link resource. + */ +public class PrivateLinkResourceProperties { + /** + * GroupId of a private link resource. + */ + @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY) + private String groupId; + + /** + * RequiredMembers of a private link resource. + */ + @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY) + private List requiredMembers; + + /** + * RequiredZoneNames of a private link resource. + */ + @JsonProperty(value = "requiredZoneNames", access = JsonProperty.Access.WRITE_ONLY) + private List requiredZoneNames; + + /** + * Get groupId of a private link resource. + * + * @return the groupId value + */ + public String groupId() { + return this.groupId; + } + + /** + * Get requiredMembers of a private link resource. + * + * @return the requiredMembers value + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Get requiredZoneNames of a private link resource. + * + * @return the requiredZoneNames value + */ + public List requiredZoneNames() { + return this.requiredZoneNames; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateLinkResourcesWrapper.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateLinkResourcesWrapper.java new file mode 100644 index 0000000000000..8ad726dd334e9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PrivateLinkResourcesWrapper.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.PrivateLinkResourcesWrapperInner; +import java.util.List; + +/** + * Type representing PrivateLinkResourcesWrapper. + */ +public interface PrivateLinkResourcesWrapper extends HasInner, HasManager { + /** + * @return the value value. + */ + List value(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ProcessInfo.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ProcessInfo.java new file mode 100644 index 0000000000000..9f7cc4d422f9d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ProcessInfo.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.ProcessInfoInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; +import java.util.Map; +import org.joda.time.DateTime; + +/** + * Type representing ProcessInfo. + */ +public interface ProcessInfo extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the children value. + */ + List children(); + + /** + * @return the commandLine value. + */ + String commandLine(); + + /** + * @return the deploymentName value. + */ + String deploymentName(); + + /** + * @return the description value. + */ + String description(); + + /** + * @return the environmentVariables value. + */ + Map environmentVariables(); + + /** + * @return the fileName value. + */ + String fileName(); + + /** + * @return the handleCount value. + */ + Integer handleCount(); + + /** + * @return the href value. + */ + String href(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the identifier value. + */ + Integer identifier(); + + /** + * @return the iisProfileTimeoutInSeconds value. + */ + Double iisProfileTimeoutInSeconds(); + + /** + * @return the isIisProfileRunning value. + */ + Boolean isIisProfileRunning(); + + /** + * @return the isProfileRunning value. + */ + Boolean isProfileRunning(); + + /** + * @return the isScmSite value. + */ + Boolean isScmSite(); + + /** + * @return the isWebjob value. + */ + Boolean isWebjob(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the minidump value. + */ + String minidump(); + + /** + * @return the moduleCount value. + */ + Integer moduleCount(); + + /** + * @return the modules value. + */ + List modules(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the nonPagedSystemMemory value. + */ + Long nonPagedSystemMemory(); + + /** + * @return the openFileHandles value. + */ + List openFileHandles(); + + /** + * @return the pagedMemory value. + */ + Long pagedMemory(); + + /** + * @return the pagedSystemMemory value. + */ + Long pagedSystemMemory(); + + /** + * @return the parent value. + */ + String parent(); + + /** + * @return the peakPagedMemory value. + */ + Long peakPagedMemory(); + + /** + * @return the peakVirtualMemory value. + */ + Long peakVirtualMemory(); + + /** + * @return the peakWorkingSet value. + */ + Long peakWorkingSet(); + + /** + * @return the privateMemory value. + */ + Long privateMemory(); + + /** + * @return the privilegedCpuTime value. + */ + String privilegedCpuTime(); + + /** + * @return the startTime value. + */ + DateTime startTime(); + + /** + * @return the threadCount value. + */ + Integer threadCount(); + + /** + * @return the threads value. + */ + List threads(); + + /** + * @return the timeStamp value. + */ + DateTime timeStamp(); + + /** + * @return the totalCpuTime value. + */ + String totalCpuTime(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the userCpuTime value. + */ + String userCpuTime(); + + /** + * @return the userName value. + */ + String userName(); + + /** + * @return the virtualMemory value. + */ + Long virtualMemory(); + + /** + * @return the workingSet value. + */ + Long workingSet(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ProcessModuleInfo.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ProcessModuleInfo.java new file mode 100644 index 0000000000000..f8b9055010af7 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ProcessModuleInfo.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.ProcessModuleInfoInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing ProcessModuleInfo. + */ +public interface ProcessModuleInfo extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the baseAddress value. + */ + String baseAddress(); + + /** + * @return the fileDescription value. + */ + String fileDescription(); + + /** + * @return the fileName value. + */ + String fileName(); + + /** + * @return the filePath value. + */ + String filePath(); + + /** + * @return the fileVersion value. + */ + String fileVersion(); + + /** + * @return the href value. + */ + String href(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the isDebug value. + */ + Boolean isDebug(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the language value. + */ + String language(); + + /** + * @return the moduleMemorySize value. + */ + Integer moduleMemorySize(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the product value. + */ + String product(); + + /** + * @return the productVersion value. + */ + String productVersion(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ProcessThreadInfo.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ProcessThreadInfo.java new file mode 100644 index 0000000000000..e18e82901ab45 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ProcessThreadInfo.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.ProcessThreadInfoInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import org.joda.time.DateTime; + +/** + * Type representing ProcessThreadInfo. + */ +public interface ProcessThreadInfo extends HasInner, HasManager { + /** + * @return the basePriority value. + */ + Integer basePriority(); + + /** + * @return the currentPriority value. + */ + Integer currentPriority(); + + /** + * @return the href value. + */ + String href(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the identifier value. + */ + Integer identifier(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the priorityLevel value. + */ + String priorityLevel(); + + /** + * @return the process value. + */ + String process(); + + /** + * @return the startAddress value. + */ + String startAddress(); + + /** + * @return the startTime value. + */ + DateTime startTime(); + + /** + * @return the state value. + */ + String state(); + + /** + * @return the totalProcessorTime value. + */ + String totalProcessorTime(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the userProcessorTime value. + */ + String userProcessorTime(); + + /** + * @return the waitReason value. + */ + String waitReason(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Providers.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Providers.java new file mode 100644 index 0000000000000..516b19abe7db5 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Providers.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.appservice.v2019_08_01; + +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.ProvidersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Providers. + */ +public interface Providers extends HasInner { + /** + * Get available application frameworks and their versions. + * Description for Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAvailableStacksAsync(); + + /** + * Get available application frameworks and their versions. + * Description for Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * Description for 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 for the request + */ + Observable listOperationsAsync(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ProvisioningState.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ProvisioningState.java new file mode 100644 index 0000000000000..3e9cf94046c96 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ProxyOnlyResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ProxyOnlyResource.java new file mode 100644 index 0000000000000..76683d930c912 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ProxyOnlyResource.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; + +/** + * Azure proxy only resource. This resource is not tracked by Azure Resource + * Manager. + */ +public class ProxyOnlyResource extends ProxyResource { + /** + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get kind of resource. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Set kind of resource. + * + * @param kind the kind value to set + * @return the ProxyOnlyResource object itself. + */ + public ProxyOnlyResource withKind(String kind) { + this.kind = kind; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PublicCertificate.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PublicCertificate.java new file mode 100644 index 0000000000000..38e37e5c9a686 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PublicCertificate.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.PublicCertificateInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing PublicCertificate. + */ +public interface PublicCertificate extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the blob value. + */ + byte[] blob(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the publicCertificateLocation value. + */ + PublicCertificateLocation publicCertificateLocation(); + + /** + * @return the thumbprint value. + */ + String thumbprint(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the PublicCertificate definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithSite, DefinitionStages.WithCreate { + } + + /** + * Grouping of PublicCertificate definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a PublicCertificate definition. + */ + interface Blank extends WithSite { + } + + /** + * The stage of the publiccertificate definition allowing to specify Site. + */ + interface WithSite { + /** + * Specifies resourceGroupName, name. + * @param resourceGroupName Name of the resource group to which the resource belongs + * @param name Name of the app + * @return the next definition stage + */ + WithCreate withExistingSite(String resourceGroupName, String name); + } + + /** + * The stage of the publiccertificate definition allowing to specify Blob. + */ + interface WithBlob { + /** + * Specifies blob. + * @param blob Public Certificate byte array + * @return the next definition stage + */ + WithCreate withBlob(byte[] blob); + } + + /** + * The stage of the publiccertificate definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the publiccertificate definition allowing to specify PublicCertificateLocation. + */ + interface WithPublicCertificateLocation { + /** + * Specifies publicCertificateLocation. + * @param publicCertificateLocation Public Certificate Location. Possible values include: 'CurrentUserMy', 'LocalMachineMy', 'Unknown' + * @return the next definition stage + */ + WithCreate withPublicCertificateLocation(PublicCertificateLocation publicCertificateLocation); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithBlob, DefinitionStages.WithKind, DefinitionStages.WithPublicCertificateLocation { + } + } + /** + * The template for a PublicCertificate update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithBlob, UpdateStages.WithKind, UpdateStages.WithPublicCertificateLocation { + } + + /** + * Grouping of PublicCertificate update stages. + */ + interface UpdateStages { + /** + * The stage of the publiccertificate update allowing to specify Blob. + */ + interface WithBlob { + /** + * Specifies blob. + * @param blob Public Certificate byte array + * @return the next update stage + */ + Update withBlob(byte[] blob); + } + + /** + * The stage of the publiccertificate update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the publiccertificate update allowing to specify PublicCertificateLocation. + */ + interface WithPublicCertificateLocation { + /** + * Specifies publicCertificateLocation. + * @param publicCertificateLocation Public Certificate Location. Possible values include: 'CurrentUserMy', 'LocalMachineMy', 'Unknown' + * @return the next update stage + */ + Update withPublicCertificateLocation(PublicCertificateLocation publicCertificateLocation); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PublicCertificateLocation.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PublicCertificateLocation.java new file mode 100644 index 0000000000000..0ed87b90a6c10 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PublishingProfileFormat.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PublishingProfileFormat.java new file mode 100644 index 0000000000000..96c51a899f78a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PushSettings.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PushSettings.java new file mode 100644 index 0000000000000..6a25ee5a07126 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/PushSettings.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.PushSettingsInner; + +/** + * Type representing PushSettings. + */ +public interface PushSettings extends HasInner, HasManager { + /** + * @return the dynamicTagsJson value. + */ + String dynamicTagsJson(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the isPushEnabled value. + */ + boolean isPushEnabled(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the tagsRequiringAuth value. + */ + String tagsRequiringAuth(); + + /** + * @return the tagWhitelistJson value. + */ + String tagWhitelistJson(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RampUpRule.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RampUpRule.java new file mode 100644 index 0000000000000..bfcb4566785bb --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RampUpRule.java @@ -0,0 +1,246 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +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 add/remove from + * <code>ReroutePercentage</code> until it reaches + * \n<code>MinReroutePercentage</code> or + * <code>MaxReroutePercentage</code>. Site metrics are checked + * every N minutes specified in + * <code>ChangeIntervalInMinutes</code>.\nCustom 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 minutes 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 hostname of a slot to which the traffic will be redirected if decided to. E.g. myapp-stage.azurewebsites.net. + * + * @return the actionHostName value + */ + public String actionHostName() { + return this.actionHostName; + } + + /** + * Set hostname of a slot to which the traffic will be redirected if decided to. E.g. myapp-stage.azurewebsites.net. + * + * @param actionHostName the actionHostName value to set + * @return the RampUpRule object itself. + */ + public RampUpRule withActionHostName(String actionHostName) { + this.actionHostName = actionHostName; + return this; + } + + /** + * Get percentage of the traffic which will be redirected to <code>ActionHostName</code>. + * + * @return the reroutePercentage value + */ + public Double reroutePercentage() { + return this.reroutePercentage; + } + + /** + * Set percentage of the traffic which will be redirected to <code>ActionHostName</code>. + * + * @param reroutePercentage the reroutePercentage value to set + * @return the RampUpRule object itself. + */ + public RampUpRule withReroutePercentage(Double reroutePercentage) { + this.reroutePercentage = reroutePercentage; + return this; + } + + /** + * Get in auto ramp up scenario this is the step to add/remove from <code>ReroutePercentage</code> until it reaches \n<code>MinReroutePercentage</code> or + <code>MaxReroutePercentage</code>. Site metrics are checked every N minutes specified in <code>ChangeIntervalInMinutes</code>.\nCustom decision algorithm + can be provided in TiPCallback site extension which URL can be specified in <code>ChangeDecisionCallbackUrl</code>. + * + * @return the changeStep value + */ + public Double changeStep() { + return this.changeStep; + } + + /** + * Set in auto ramp up scenario this is the step to add/remove from <code>ReroutePercentage</code> until it reaches \n<code>MinReroutePercentage</code> or + <code>MaxReroutePercentage</code>. Site metrics are checked every N minutes specified in <code>ChangeIntervalInMinutes</code>.\nCustom decision algorithm + can be provided in TiPCallback site extension which URL can be specified in <code>ChangeDecisionCallbackUrl</code>. + * + * @param changeStep the changeStep value to set + * @return the RampUpRule object itself. + */ + public RampUpRule withChangeStep(Double changeStep) { + this.changeStep = changeStep; + return this; + } + + /** + * Get specifies interval in minutes to reevaluate ReroutePercentage. + * + * @return the changeIntervalInMinutes value + */ + public Integer changeIntervalInMinutes() { + return this.changeIntervalInMinutes; + } + + /** + * Set specifies interval in minutes to reevaluate ReroutePercentage. + * + * @param changeIntervalInMinutes the changeIntervalInMinutes value to set + * @return the RampUpRule object itself. + */ + public RampUpRule withChangeIntervalInMinutes(Integer changeIntervalInMinutes) { + this.changeIntervalInMinutes = changeIntervalInMinutes; + return this; + } + + /** + * Get specifies lower boundary above which ReroutePercentage will stay. + * + * @return the minReroutePercentage value + */ + public Double minReroutePercentage() { + return this.minReroutePercentage; + } + + /** + * Set specifies lower boundary above which ReroutePercentage will stay. + * + * @param minReroutePercentage the minReroutePercentage value to set + * @return the RampUpRule object itself. + */ + public RampUpRule withMinReroutePercentage(Double minReroutePercentage) { + this.minReroutePercentage = minReroutePercentage; + return this; + } + + /** + * Get specifies upper boundary below which ReroutePercentage will stay. + * + * @return the maxReroutePercentage value + */ + public Double maxReroutePercentage() { + return this.maxReroutePercentage; + } + + /** + * Set specifies upper boundary below which ReroutePercentage will stay. + * + * @param maxReroutePercentage the maxReroutePercentage value to set + * @return the RampUpRule object itself. + */ + public RampUpRule withMaxReroutePercentage(Double maxReroutePercentage) { + this.maxReroutePercentage = maxReroutePercentage; + return this; + } + + /** + * Get 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/. + * + * @return the changeDecisionCallbackUrl value + */ + public String changeDecisionCallbackUrl() { + return this.changeDecisionCallbackUrl; + } + + /** + * Set 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/. + * + * @param changeDecisionCallbackUrl the changeDecisionCallbackUrl value to set + * @return the RampUpRule object itself. + */ + public RampUpRule withChangeDecisionCallbackUrl(String changeDecisionCallbackUrl) { + this.changeDecisionCallbackUrl = changeDecisionCallbackUrl; + return this; + } + + /** + * Get name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Recommendation.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Recommendation.java new file mode 100644 index 0000000000000..bab1e71ac8c30 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Recommendation.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.RecommendationInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; +import org.joda.time.DateTime; +import java.util.UUID; + +/** + * Type representing Recommendation. + */ +public interface Recommendation extends HasInner, HasManager { + /** + * @return the actionName value. + */ + String actionName(); + + /** + * @return the bladeName value. + */ + String bladeName(); + + /** + * @return the categoryTags value. + */ + List categoryTags(); + + /** + * @return the channels value. + */ + Channels channels(); + + /** + * @return the creationTime value. + */ + DateTime creationTime(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the enabled value. + */ + Integer enabled(); + + /** + * @return the endTime value. + */ + DateTime endTime(); + + /** + * @return the extensionName value. + */ + String extensionName(); + + /** + * @return the forwardLink value. + */ + String forwardLink(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the isDynamic value. + */ + Boolean isDynamic(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the level value. + */ + NotificationLevel level(); + + /** + * @return the message value. + */ + String message(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the nextNotificationTime value. + */ + DateTime nextNotificationTime(); + + /** + * @return the notificationExpirationTime value. + */ + DateTime notificationExpirationTime(); + + /** + * @return the notifiedTime value. + */ + DateTime notifiedTime(); + + /** + * @return the recommendationId value. + */ + UUID recommendationId(); + + /** + * @return the resourceId value. + */ + String resourceId(); + + /** + * @return the resourceScope value. + */ + ResourceScopeType resourceScope(); + + /** + * @return the ruleName value. + */ + String ruleName(); + + /** + * @return the score value. + */ + Double score(); + + /** + * @return the startTime value. + */ + DateTime startTime(); + + /** + * @return the states value. + */ + List states(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RecommendationRule.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RecommendationRule.java new file mode 100644 index 0000000000000..dc8092b154723 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RecommendationRule.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.RecommendationRuleInner; +import java.util.List; +import java.util.UUID; + +/** + * Type representing RecommendationRule. + */ +public interface RecommendationRule extends HasInner, HasManager { + /** + * @return the actionName value. + */ + String actionName(); + + /** + * @return the bladeName value. + */ + String bladeName(); + + /** + * @return the categoryTags value. + */ + List categoryTags(); + + /** + * @return the channels value. + */ + Channels channels(); + + /** + * @return the description value. + */ + String description(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the extensionName value. + */ + String extensionName(); + + /** + * @return the forwardLink value. + */ + String forwardLink(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the isDynamic value. + */ + Boolean isDynamic(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the level value. + */ + NotificationLevel level(); + + /** + * @return the message value. + */ + String message(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the recommendationId value. + */ + UUID recommendationId(); + + /** + * @return the recommendationName value. + */ + String recommendationName(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Recommendations.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Recommendations.java new file mode 100644 index 0000000000000..283927e9b0edf --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Recommendations.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.RecommendationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Recommendations. + */ +public interface Recommendations extends SupportsListing, HasInner { + /** + * Reset all recommendation opt-out settings for a subscription. + * Description for Reset all recommendation opt-out settings for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable resetAllFiltersAsync(); + + /** + * Disables the specified rule so it will not apply to a subscription in the future. + * Description for 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 observable for the request + */ + Completable disableRecommendationForSubscriptionAsync(String name); + + /** + * Get all recommendations for an app. + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listRecommendedRulesForHostingEnvironmentAsync(final String resourceGroupName, final String hostingEnvironmentName); + + /** + * Disable all recommendations for an app. + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName the String value + * @param environmentName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable disableAllForHostingEnvironmentAsync(String resourceGroupName, String hostingEnvironmentName, String environmentName); + + /** + * Reset all recommendation opt-out settings for an app. + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName the String value + * @param environmentName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable resetAllFiltersForHostingEnvironmentAsync(String resourceGroupName, String hostingEnvironmentName, String environmentName); + + /** + * Get a recommendation rule for an app. + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param name Name of the recommendation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getRuleDetailsByHostingEnvironmentAsync(String resourceGroupName, String hostingEnvironmentName, String name); + + /** + * Disables the specific rule for a web site permanently. + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Rule name + * @param hostingEnvironmentName the String value + * @param environmentName Site name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable disableRecommendationForHostingEnvironmentAsync(String resourceGroupName, String name, String hostingEnvironmentName, String environmentName); + + /** + * Get all recommendations for an app. + * Description for 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 for the request + */ + Observable listRecommendedRulesForWebAppAsync(final String resourceGroupName, final String siteName); + + /** + * Disable all recommendations for an app. + * Description for 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 observable for the request + */ + Completable disableAllForWebAppAsync(String resourceGroupName, String siteName); + + /** + * Reset all recommendation opt-out settings for an app. + * Description for 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 observable for the request + */ + Completable resetAllFiltersForWebAppAsync(String resourceGroupName, String siteName); + + /** + * Get a recommendation rule for an app. + * Description for 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 for the request + */ + Observable getRuleDetailsByWebAppAsync(String resourceGroupName, String siteName, String name); + + /** + * Disables the specific rule for a web site permanently. + * Description for 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 observable for the request + */ + Completable disableRecommendationForSiteAsync(String resourceGroupName, String siteName, String name); + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Description for 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 hostingEnvironmentName Name of the hosting environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listHistoryForHostingEnvironmentAsync(final String resourceGroupName, final String hostingEnvironmentName); + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Description for 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 for the request + */ + Observable listHistoryForWebAppAsync(final String resourceGroupName, final String siteName); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RedundancyMode.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RedundancyMode.java new file mode 100644 index 0000000000000..eb8b0d3dbbeaa --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RedundancyMode.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for RedundancyMode. + */ +public enum RedundancyMode { + /** Enum value None. */ + NONE("None"), + + /** Enum value Manual. */ + MANUAL("Manual"), + + /** Enum value Failover. */ + FAILOVER("Failover"), + + /** Enum value ActiveActive. */ + ACTIVE_ACTIVE("ActiveActive"), + + /** Enum value GeoRedundant. */ + GEO_REDUNDANT("GeoRedundant"); + + /** The actual serialized value for a RedundancyMode instance. */ + private String value; + + RedundancyMode(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a RedundancyMode instance. + * + * @param value the serialized value to parse. + * @return the parsed RedundancyMode object, or null if unable to parse. + */ + @JsonCreator + public static RedundancyMode fromString(String value) { + RedundancyMode[] items = RedundancyMode.values(); + for (RedundancyMode item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ReissueCertificateOrderRequest.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ReissueCertificateOrderRequest.java new file mode 100644 index 0000000000000..b41903cd68da4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ReissueCertificateOrderRequest.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Class representing certificate reissue request. + */ +@JsonFlatten +public class ReissueCertificateOrderRequest 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 certificate Key Size. + * + * @return the keySize value + */ + public Integer keySize() { + return this.keySize; + } + + /** + * Set certificate Key Size. + * + * @param keySize the keySize value to set + * @return the ReissueCertificateOrderRequest object itself. + */ + public ReissueCertificateOrderRequest withKeySize(Integer keySize) { + this.keySize = keySize; + return this; + } + + /** + * Get delay in hours to revoke existing certificate after the new certificate is issued. + * + * @return the delayExistingRevokeInHours value + */ + public Integer delayExistingRevokeInHours() { + return this.delayExistingRevokeInHours; + } + + /** + * Set delay in hours to revoke existing certificate after the new certificate is issued. + * + * @param delayExistingRevokeInHours the delayExistingRevokeInHours value to set + * @return the ReissueCertificateOrderRequest object itself. + */ + public ReissueCertificateOrderRequest withDelayExistingRevokeInHours(Integer delayExistingRevokeInHours) { + this.delayExistingRevokeInHours = delayExistingRevokeInHours; + return this; + } + + /** + * Get csr to be used for re-key operation. + * + * @return the csr value + */ + public String csr() { + return this.csr; + } + + /** + * Set csr to be used for re-key operation. + * + * @param csr the csr value to set + * @return the ReissueCertificateOrderRequest object itself. + */ + public ReissueCertificateOrderRequest withCsr(String csr) { + this.csr = csr; + return this; + } + + /** + * Get should we change the ASC type (from managed private key to external private key and vice versa). + * + * @return the isPrivateKeyExternal value + */ + public Boolean isPrivateKeyExternal() { + return this.isPrivateKeyExternal; + } + + /** + * Set should we change the ASC type (from managed private key to external private key and vice versa). + * + * @param isPrivateKeyExternal the isPrivateKeyExternal value to set + * @return the ReissueCertificateOrderRequest object itself. + */ + public ReissueCertificateOrderRequest withIsPrivateKeyExternal(Boolean isPrivateKeyExternal) { + this.isPrivateKeyExternal = isPrivateKeyExternal; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RelayServiceConnectionEntity.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RelayServiceConnectionEntity.java new file mode 100644 index 0000000000000..ab706032e652d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RelayServiceConnectionEntity.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.RelayServiceConnectionEntityInner; + +/** + * Type representing RelayServiceConnectionEntity. + */ +public interface RelayServiceConnectionEntity extends HasInner, HasManager { + /** + * @return the biztalkUri value. + */ + String biztalkUri(); + + /** + * @return the entityConnectionString value. + */ + String entityConnectionString(); + + /** + * @return the entityName value. + */ + String entityName(); + + /** + * @return the hostname value. + */ + String hostname(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the port value. + */ + Integer port(); + + /** + * @return the resourceConnectionString value. + */ + String resourceConnectionString(); + + /** + * @return the resourceType value. + */ + String resourceType(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Rendering.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Rendering.java new file mode 100644 index 0000000000000..7c4c1c0c2bf70 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Rendering.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Instructions for rendering the data. + */ +public class Rendering { + /** + * Rendering Type. Possible values include: 'NoGraph', 'Table', + * 'TimeSeries', 'TimeSeriesPerInstance'. + */ + @JsonProperty(value = "type") + private RenderingType type; + + /** + * Title of data. + */ + @JsonProperty(value = "title") + private String title; + + /** + * Description of the data that will help it be interpreted. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get rendering Type. Possible values include: 'NoGraph', 'Table', 'TimeSeries', 'TimeSeriesPerInstance'. + * + * @return the type value + */ + public RenderingType type() { + return this.type; + } + + /** + * Set rendering Type. Possible values include: 'NoGraph', 'Table', 'TimeSeries', 'TimeSeriesPerInstance'. + * + * @param type the type value to set + * @return the Rendering object itself. + */ + public Rendering withType(RenderingType type) { + this.type = type; + return this; + } + + /** + * Get title of data. + * + * @return the title value + */ + public String title() { + return this.title; + } + + /** + * Set title of data. + * + * @param title the title value to set + * @return the Rendering object itself. + */ + public Rendering withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get description of the data that will help it be interpreted. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of the data that will help it be interpreted. + * + * @param description the description value to set + * @return the Rendering object itself. + */ + public Rendering withDescription(String description) { + this.description = description; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RenderingType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RenderingType.java new file mode 100644 index 0000000000000..f36a166bdfeb8 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RenderingType.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for RenderingType. + */ +public enum RenderingType { + /** Enum value NoGraph. */ + NO_GRAPH("NoGraph"), + + /** Enum value Table. */ + TABLE("Table"), + + /** Enum value TimeSeries. */ + TIME_SERIES("TimeSeries"), + + /** Enum value TimeSeriesPerInstance. */ + TIME_SERIES_PER_INSTANCE("TimeSeriesPerInstance"); + + /** The actual serialized value for a RenderingType instance. */ + private String value; + + RenderingType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a RenderingType instance. + * + * @param value the serialized value to parse. + * @return the parsed RenderingType object, or null if unable to parse. + */ + @JsonCreator + public static RenderingType fromString(String value) { + RenderingType[] items = RenderingType.values(); + for (RenderingType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RenewCertificateOrderRequest.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RenewCertificateOrderRequest.java new file mode 100644 index 0000000000000..ba1eb9cf6543f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RenewCertificateOrderRequest.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Class representing certificate renew request. + */ +@JsonFlatten +public class RenewCertificateOrderRequest 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 certificate Key Size. + * + * @return the keySize value + */ + public Integer keySize() { + return this.keySize; + } + + /** + * Set certificate Key Size. + * + * @param keySize the keySize value to set + * @return the RenewCertificateOrderRequest object itself. + */ + public RenewCertificateOrderRequest withKeySize(Integer keySize) { + this.keySize = keySize; + return this; + } + + /** + * Get csr to be used for re-key operation. + * + * @return the csr value + */ + public String csr() { + return this.csr; + } + + /** + * Set csr to be used for re-key operation. + * + * @param csr the csr value to set + * @return the RenewCertificateOrderRequest object itself. + */ + public RenewCertificateOrderRequest withCsr(String csr) { + this.csr = csr; + return this; + } + + /** + * Get should we change the ASC type (from managed private key to external private key and vice versa). + * + * @return the isPrivateKeyExternal value + */ + public Boolean isPrivateKeyExternal() { + return this.isPrivateKeyExternal; + } + + /** + * Set should we change the ASC type (from managed private key to external private key and vice versa). + * + * @param isPrivateKeyExternal the isPrivateKeyExternal value to set + * @return the RenewCertificateOrderRequest object itself. + */ + public RenewCertificateOrderRequest withIsPrivateKeyExternal(Boolean isPrivateKeyExternal) { + this.isPrivateKeyExternal = isPrivateKeyExternal; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RequestsBasedTrigger.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RequestsBasedTrigger.java new file mode 100644 index 0000000000000..ad2388b9f8128 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 request Count. + * + * @return the count value + */ + public Integer count() { + return this.count; + } + + /** + * Set request Count. + * + * @param count the count value to set + * @return the RequestsBasedTrigger object itself. + */ + public RequestsBasedTrigger withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get time interval. + * + * @return the timeInterval value + */ + public String timeInterval() { + return this.timeInterval; + } + + /** + * Set time interval. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResolveStatus.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResolveStatus.java new file mode 100644 index 0000000000000..48f1152a79660 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResolveStatus.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ResolveStatus. + */ +public enum ResolveStatus { + /** Enum value Initialized. */ + INITIALIZED("Initialized"), + + /** Enum value Resolved. */ + RESOLVED("Resolved"), + + /** Enum value InvalidSyntax. */ + INVALID_SYNTAX("InvalidSyntax"), + + /** Enum value MSINotEnabled. */ + MSINOT_ENABLED("MSINotEnabled"), + + /** Enum value VaultNotFound. */ + VAULT_NOT_FOUND("VaultNotFound"), + + /** Enum value SecretNotFound. */ + SECRET_NOT_FOUND("SecretNotFound"), + + /** Enum value SecretVersionNotFound. */ + SECRET_VERSION_NOT_FOUND("SecretVersionNotFound"), + + /** Enum value AccessToKeyVaultDenied. */ + ACCESS_TO_KEY_VAULT_DENIED("AccessToKeyVaultDenied"), + + /** Enum value OtherReasons. */ + OTHER_REASONS("OtherReasons"); + + /** The actual serialized value for a ResolveStatus instance. */ + private String value; + + ResolveStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ResolveStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed ResolveStatus object, or null if unable to parse. + */ + @JsonCreator + public static ResolveStatus fromString(String value) { + ResolveStatus[] items = ResolveStatus.values(); + for (ResolveStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResourceHealthMetadata.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResourceHealthMetadata.java new file mode 100644 index 0000000000000..9168c8a0c765b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResourceHealthMetadata.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.ResourceHealthMetadataInner; + +/** + * Type representing ResourceHealthMetadata. + */ +public interface ResourceHealthMetadata extends HasInner, HasManager { + /** + * @return the category value. + */ + String category(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the signalAvailability value. + */ + Boolean signalAvailability(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResourceHealthMetadatas.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResourceHealthMetadatas.java new file mode 100644 index 0000000000000..344682db2dbc4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResourceHealthMetadatas.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.appservice.v2019_08_01; + +import rx.Observable; + +/** + * Type representing ResourceHealthMetadatas. + */ +public interface ResourceHealthMetadatas { + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @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 for the request + */ + Observable listBySiteAsync(final String resourceGroupName, final String name); + + /** + * Gets the category of ResourceHealthMetadata to use for the given site. + * Description for Gets the category of ResourceHealthMetadata to use 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 for the request + */ + Observable getBySiteAsync(String resourceGroupName, String name); + + /** + * List all ResourceHealthMetadata for all sites in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByResourceGroupAsync(final String resourceGroupName); + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @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 for the request + */ + Observable listBySiteSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Gets the category of ResourceHealthMetadata to use for the given site. + * Description for Gets the category of ResourceHealthMetadata to use 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 for the request + */ + Observable getBySiteSlotAsync(String resourceGroupName, String name, String slot); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResourceMetricAvailability.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResourceMetricAvailability.java new file mode 100644 index 0000000000000..144c8d77b6d62 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 time grain . + * + * @return the timeGrain value + */ + public String timeGrain() { + return this.timeGrain; + } + + /** + * Get retention period for the current time grain. + * + * @return the retention value + */ + public String retention() { + return this.retention; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResourceMetricDefinition.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResourceMetricDefinition.java new file mode 100644 index 0000000000000..379a5a148517d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResourceMetricDefinition.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.ResourceMetricDefinitionInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; +import java.util.Map; + +/** + * Type representing ResourceMetricDefinition. + */ +public interface ResourceMetricDefinition extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the metricAvailabilities value. + */ + List metricAvailabilities(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the primaryAggregationType value. + */ + String primaryAggregationType(); + + /** + * @return the properties value. + */ + Map properties(); + + /** + * @return the resourceUri value. + */ + String resourceUri(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the unit value. + */ + String unit(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResourceNameAvailabilityRequest.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResourceNameAvailabilityRequest.java new file mode 100644 index 0000000000000..74bafa31d8ebf --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 resource name to verify. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set resource name to verify. + * + * @param name the name value to set + * @return the ResourceNameAvailabilityRequest object itself. + */ + public ResourceNameAvailabilityRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get 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'. + * + * @return the type value + */ + public CheckNameResourceTypes type() { + return this.type; + } + + /** + * Set 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 type the type value to set + * @return the ResourceNameAvailabilityRequest object itself. + */ + public ResourceNameAvailabilityRequest withType(CheckNameResourceTypes type) { + this.type = type; + return this; + } + + /** + * Get is fully qualified domain name. + * + * @return the isFqdn value + */ + public Boolean isFqdn() { + return this.isFqdn; + } + + /** + * Set is fully qualified domain name. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResourceScopeType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResourceScopeType.java new file mode 100644 index 0000000000000..756e2393d166a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResponseMetaData.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ResponseMetaData.java new file mode 100644 index 0000000000000..8f7799175d714 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ResponseMetaData model. + */ +public class ResponseMetaData { + /** + * Source of the Data. + */ + @JsonProperty(value = "dataSource") + private DataSource dataSource; + + /** + * Get source of the Data. + * + * @return the dataSource value + */ + public DataSource dataSource() { + return this.dataSource; + } + + /** + * Set source of the Data. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RestoreRequest.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RestoreRequest.java new file mode 100644 index 0000000000000..8c198be0b3762 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RestoreRequest.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.RestoreRequestInner; +import java.util.List; + +/** + * Type representing RestoreRequest. + */ +public interface RestoreRequest extends HasInner, HasManager { + /** + * @return the adjustConnectionStrings value. + */ + Boolean adjustConnectionStrings(); + + /** + * @return the appServicePlan value. + */ + String appServicePlan(); + + /** + * @return the blobName value. + */ + String blobName(); + + /** + * @return the databases value. + */ + List databases(); + + /** + * @return the hostingEnvironment value. + */ + String hostingEnvironment(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the ignoreConflictingHostNames value. + */ + Boolean ignoreConflictingHostNames(); + + /** + * @return the ignoreDatabases value. + */ + Boolean ignoreDatabases(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the operationType value. + */ + BackupRestoreOperationType operationType(); + + /** + * @return the overwrite value. + */ + boolean overwrite(); + + /** + * @return the siteName value. + */ + String siteName(); + + /** + * @return the storageAccountUrl value. + */ + String storageAccountUrl(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RouteType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/RouteType.java new file mode 100644 index 0000000000000..4b23cdb43ae1c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ScmType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ScmType.java new file mode 100644 index 0000000000000..41c0b1ee0ff25 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ScmType.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.appservice.v2019_08_01; + +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"); + + /** Static value VSTSRM for ScmType. */ + public static final ScmType VSTSRM = fromString("VSTSRM"); + + /** + * 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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServerfarmCsmUsageQuota.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServerfarmCsmUsageQuota.java new file mode 100644 index 0000000000000..37132e1070874 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServerfarmCsmUsageQuota.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CsmUsageQuotaInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import org.joda.time.DateTime; + +/** + * Type representing ServerfarmCsmUsageQuota. + */ +public interface ServerfarmCsmUsageQuota extends HasInner, HasManager { + /** + * @return the currentValue value. + */ + Long currentValue(); + + /** + * @return the limit value. + */ + Long limit(); + + /** + * @return the name value. + */ + LocalizableString name(); + + /** + * @return the nextResetTime value. + */ + DateTime nextResetTime(); + + /** + * @return the unit value. + */ + String unit(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServerfarmHybridConnection.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServerfarmHybridConnection.java new file mode 100644 index 0000000000000..7929752857824 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServerfarmHybridConnection.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.HybridConnectionInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing ServerfarmHybridConnection. + */ +public interface ServerfarmHybridConnection extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the hostname value. + */ + String hostname(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the port value. + */ + Integer port(); + + /** + * @return the relayArmUri value. + */ + String relayArmUri(); + + /** + * @return the relayName value. + */ + String relayName(); + + /** + * @return the sendKeyName value. + */ + String sendKeyName(); + + /** + * @return the sendKeyValue value. + */ + String sendKeyValue(); + + /** + * @return the serviceBusNamespace value. + */ + String serviceBusNamespace(); + + /** + * @return the serviceBusSuffix value. + */ + String serviceBusSuffix(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServerfarmSite.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServerfarmSite.java new file mode 100644 index 0000000000000..c77ba923444d0 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServerfarmSite.java @@ -0,0 +1,239 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; +import java.util.UUID; +import org.joda.time.DateTime; +import java.util.Map; + +/** + * Type representing ServerfarmSite. + */ +public interface ServerfarmSite extends HasInner, HasManager { + /** + * @return the availabilityState value. + */ + SiteAvailabilityState availabilityState(); + + /** + * @return the clientAffinityEnabled value. + */ + Boolean clientAffinityEnabled(); + + /** + * @return the clientCertEnabled value. + */ + Boolean clientCertEnabled(); + + /** + * @return the clientCertExclusionPaths value. + */ + String clientCertExclusionPaths(); + + /** + * @return the cloningInfo value. + */ + CloningInfo cloningInfo(); + + /** + * @return the containerSize value. + */ + Integer containerSize(); + + /** + * @return the dailyMemoryTimeQuota value. + */ + Integer dailyMemoryTimeQuota(); + + /** + * @return the defaultHostName value. + */ + String defaultHostName(); + + /** + * @return the enabled value. + */ + Boolean enabled(); + + /** + * @return the enabledHostNames value. + */ + List enabledHostNames(); + + /** + * @return the hostingEnvironmentProfile value. + */ + HostingEnvironmentProfile hostingEnvironmentProfile(); + + /** + * @return the hostNames value. + */ + List hostNames(); + + /** + * @return the hostNamesDisabled value. + */ + Boolean hostNamesDisabled(); + + /** + * @return the hostNameSslStates value. + */ + List hostNameSslStates(); + + /** + * @return the httpsOnly value. + */ + Boolean httpsOnly(); + + /** + * @return the hyperV value. + */ + Boolean hyperV(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * @return the inProgressOperationId value. + */ + UUID inProgressOperationId(); + + /** + * @return the isDefaultContainer value. + */ + Boolean isDefaultContainer(); + + /** + * @return the isXenon value. + */ + Boolean isXenon(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the lastModifiedTimeUtc value. + */ + DateTime lastModifiedTimeUtc(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the maxNumberOfWorkers value. + */ + Integer maxNumberOfWorkers(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the outboundIpAddresses value. + */ + String outboundIpAddresses(); + + /** + * @return the possibleOutboundIpAddresses value. + */ + String possibleOutboundIpAddresses(); + + /** + * @return the redundancyMode value. + */ + RedundancyMode redundancyMode(); + + /** + * @return the repositorySiteName value. + */ + String repositorySiteName(); + + /** + * @return the reserved value. + */ + Boolean reserved(); + + /** + * @return the resourceGroup value. + */ + String resourceGroup(); + + /** + * @return the scmSiteAlsoStopped value. + */ + Boolean scmSiteAlsoStopped(); + + /** + * @return the serverFarmId value. + */ + String serverFarmId(); + + /** + * @return the siteConfig value. + */ + SiteConfig siteConfig(); + + /** + * @return the slotSwapStatus value. + */ + SlotSwapStatus slotSwapStatus(); + + /** + * @return the state value. + */ + String state(); + + /** + * @return the suspendedTill value. + */ + DateTime suspendedTill(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the targetSwapSlot value. + */ + String targetSwapSlot(); + + /** + * @return the trafficManagerHostNames value. + */ + List trafficManagerHostNames(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the usageState value. + */ + UsageState usageState(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServerfarmVnetGateway.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServerfarmVnetGateway.java new file mode 100644 index 0000000000000..adf5a970d6976 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServerfarmVnetGateway.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.VnetGatewayInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing ServerfarmVnetGateway. + */ +public interface ServerfarmVnetGateway extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the vnetName value. + */ + String vnetName(); + + /** + * @return the vpnPackageUri value. + */ + String vpnPackageUri(); + + /** + * The template for a ServerfarmVnetGateway update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithKind, UpdateStages.WithVnetName { + } + + /** + * Grouping of ServerfarmVnetGateway update stages. + */ + interface UpdateStages { + /** + * The stage of the serverfarmvnetgateway update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the serverfarmvnetgateway update allowing to specify VnetName. + */ + interface WithVnetName { + /** + * Specifies vnetName. + * @param vnetName The Virtual Network name + * @return the next update stage + */ + Update withVnetName(String vnetName); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServerfarmVnetInfo.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServerfarmVnetInfo.java new file mode 100644 index 0000000000000..296aa2556de94 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServerfarmVnetInfo.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.VnetInfoInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; + +/** + * Type representing ServerfarmVnetInfo. + */ +public interface ServerfarmVnetInfo extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the certBlob value. + */ + String certBlob(); + + /** + * @return the certThumbprint value. + */ + String certThumbprint(); + + /** + * @return the dnsServers value. + */ + String dnsServers(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the isSwift value. + */ + Boolean isSwift(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the resyncRequired value. + */ + Boolean resyncRequired(); + + /** + * @return the routes value. + */ + List routes(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the vnetResourceId value. + */ + String vnetResourceId(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServiceSpecification.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServiceSpecification.java new file mode 100644 index 0000000000000..fd15cc302c19e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ServiceSpecification.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.appservice.v2019_08_01; + +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; + + /** + * The logSpecifications property. + */ + @JsonProperty(value = "logSpecifications") + private List logSpecifications; + + /** + * 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; + } + + /** + * Get the logSpecifications value. + * + * @return the logSpecifications value + */ + public List logSpecifications() { + return this.logSpecifications; + } + + /** + * Set the logSpecifications value. + * + * @param logSpecifications the logSpecifications value to set + * @return the ServiceSpecification object itself. + */ + public ServiceSpecification withLogSpecifications(List logSpecifications) { + this.logSpecifications = logSpecifications; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteAuthSettings.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteAuthSettings.java new file mode 100644 index 0000000000000..d7bad42d2b0ca --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteAuthSettings.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteAuthSettingsInner; +import java.util.List; + +/** + * Type representing SiteAuthSettings. + */ +public interface SiteAuthSettings extends HasInner, HasManager { + /** + * @return the additionalLoginParams value. + */ + List additionalLoginParams(); + + /** + * @return the allowedAudiences value. + */ + List allowedAudiences(); + + /** + * @return the allowedExternalRedirectUrls value. + */ + List allowedExternalRedirectUrls(); + + /** + * @return the clientId value. + */ + String clientId(); + + /** + * @return the clientSecret value. + */ + String clientSecret(); + + /** + * @return the clientSecretCertificateThumbprint value. + */ + String clientSecretCertificateThumbprint(); + + /** + * @return the defaultProvider value. + */ + BuiltInAuthenticationProvider defaultProvider(); + + /** + * @return the enabled value. + */ + Boolean enabled(); + + /** + * @return the facebookAppId value. + */ + String facebookAppId(); + + /** + * @return the facebookAppSecret value. + */ + String facebookAppSecret(); + + /** + * @return the facebookOAuthScopes value. + */ + List facebookOAuthScopes(); + + /** + * @return the googleClientId value. + */ + String googleClientId(); + + /** + * @return the googleClientSecret value. + */ + String googleClientSecret(); + + /** + * @return the googleOAuthScopes value. + */ + List googleOAuthScopes(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the issuer value. + */ + String issuer(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the microsoftAccountClientId value. + */ + String microsoftAccountClientId(); + + /** + * @return the microsoftAccountClientSecret value. + */ + String microsoftAccountClientSecret(); + + /** + * @return the microsoftAccountOAuthScopes value. + */ + List microsoftAccountOAuthScopes(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the runtimeVersion value. + */ + String runtimeVersion(); + + /** + * @return the tokenRefreshExtensionHours value. + */ + Double tokenRefreshExtensionHours(); + + /** + * @return the tokenStoreEnabled value. + */ + Boolean tokenStoreEnabled(); + + /** + * @return the twitterConsumerKey value. + */ + String twitterConsumerKey(); + + /** + * @return the twitterConsumerSecret value. + */ + String twitterConsumerSecret(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the unauthenticatedClientAction value. + */ + UnauthenticatedClientAction unauthenticatedClientAction(); + + /** + * @return the validateIssuer value. + */ + Boolean validateIssuer(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteAvailabilityState.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteAvailabilityState.java new file mode 100644 index 0000000000000..852fb87118925 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteCloneability.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteCloneability.java new file mode 100644 index 0000000000000..128ad6bedd500 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteCloneability.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteCloneabilityInner; +import java.util.List; + +/** + * Type representing SiteCloneability. + */ +public interface SiteCloneability extends HasInner, HasManager { + /** + * @return the blockingCharacteristics value. + */ + List blockingCharacteristics(); + + /** + * @return the blockingFeatures value. + */ + List blockingFeatures(); + + /** + * @return the result value. + */ + CloneAbilityResult result(); + + /** + * @return the unsupportedFeatures value. + */ + List unsupportedFeatures(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteCloneabilityCriterion.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteCloneabilityCriterion.java new file mode 100644 index 0000000000000..37c6b227d5cb9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 name of criterion. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of criterion. + * + * @param name the name value to set + * @return the SiteCloneabilityCriterion object itself. + */ + public SiteCloneabilityCriterion withName(String name) { + this.name = name; + return this; + } + + /** + * Get description of criterion. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of criterion. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteConfig.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteConfig.java new file mode 100644 index 0000000000000..f3e163d10ffec --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteConfig.java @@ -0,0 +1,1510 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.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; + + /** + * Version of PowerShell. + */ + @JsonProperty(value = "powerShellVersion") + private String powerShellVersion; + + /** + * Linux App Framework and version. + */ + @JsonProperty(value = "linuxFxVersion") + private String linuxFxVersion; + + /** + * Xenon App Framework and version. + */ + @JsonProperty(value = "windowsFxVersion") + private String windowsFxVersion; + + /** + * <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; + + /** + * Flag to use Managed Identity Creds for ACR pull. + */ + @JsonProperty(value = "acrUseManagedIdentityCreds") + private Boolean acrUseManagedIdentityCreds; + + /** + * If using user managed identity, the user managed identity ClientId. + */ + @JsonProperty(value = "acrUserManagedIdentityID") + private String acrUserManagedIdentityID; + + /** + * 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', 'VSTSRM'. + */ + @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 polymorphic 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; + + /** + * Azure API management settings linked to the app. + */ + @JsonProperty(value = "apiManagementConfig") + private ApiManagementConfig apiManagementConfig; + + /** + * 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; + + /** + * Managed Service Identity Id. + */ + @JsonProperty(value = "managedServiceIdentityId") + private Integer managedServiceIdentityId; + + /** + * Explicit Managed Service Identity Id. + */ + @JsonProperty(value = "xManagedServiceIdentityId") + private Integer xManagedServiceIdentityId; + + /** + * IP security restrictions for main. + */ + @JsonProperty(value = "ipSecurityRestrictions") + private List ipSecurityRestrictions; + + /** + * IP security restrictions for scm. + */ + @JsonProperty(value = "scmIpSecurityRestrictions") + private List scmIpSecurityRestrictions; + + /** + * IP security restrictions for scm to use main. + */ + @JsonProperty(value = "scmIpSecurityRestrictionsUseMain") + private Boolean scmIpSecurityRestrictionsUseMain; + + /** + * 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; + + /** + * State of FTP / FTPS service. Possible values include: 'AllAllowed', + * 'FtpsOnly', 'Disabled'. + */ + @JsonProperty(value = "ftpsState") + private FtpsState ftpsState; + + /** + * Number of preWarmed instances. + * This setting only applies to the Consumption and Elastic Plans. + */ + @JsonProperty(value = "preWarmedInstanceCount") + private Integer preWarmedInstanceCount; + + /** + * Health check path. + */ + @JsonProperty(value = "healthCheckPath") + private String healthCheckPath; + + /** + * Get number of workers. + * + * @return the numberOfWorkers value + */ + public Integer numberOfWorkers() { + return this.numberOfWorkers; + } + + /** + * Set number of workers. + * + * @param numberOfWorkers the numberOfWorkers value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withNumberOfWorkers(Integer numberOfWorkers) { + this.numberOfWorkers = numberOfWorkers; + return this; + } + + /** + * Get default documents. + * + * @return the defaultDocuments value + */ + public List defaultDocuments() { + return this.defaultDocuments; + } + + /** + * Set default documents. + * + * @param defaultDocuments the defaultDocuments value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withDefaultDocuments(List defaultDocuments) { + this.defaultDocuments = defaultDocuments; + return this; + } + + /** + * Get .NET Framework version. + * + * @return the netFrameworkVersion value + */ + public String netFrameworkVersion() { + return this.netFrameworkVersion; + } + + /** + * Set .NET Framework version. + * + * @param netFrameworkVersion the netFrameworkVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withNetFrameworkVersion(String netFrameworkVersion) { + this.netFrameworkVersion = netFrameworkVersion; + return this; + } + + /** + * Get version of PHP. + * + * @return the phpVersion value + */ + public String phpVersion() { + return this.phpVersion; + } + + /** + * Set version of PHP. + * + * @param phpVersion the phpVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withPhpVersion(String phpVersion) { + this.phpVersion = phpVersion; + return this; + } + + /** + * Get version of Python. + * + * @return the pythonVersion value + */ + public String pythonVersion() { + return this.pythonVersion; + } + + /** + * Set version of Python. + * + * @param pythonVersion the pythonVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withPythonVersion(String pythonVersion) { + this.pythonVersion = pythonVersion; + return this; + } + + /** + * Get version of Node.js. + * + * @return the nodeVersion value + */ + public String nodeVersion() { + return this.nodeVersion; + } + + /** + * Set version of Node.js. + * + * @param nodeVersion the nodeVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withNodeVersion(String nodeVersion) { + this.nodeVersion = nodeVersion; + return this; + } + + /** + * Get version of PowerShell. + * + * @return the powerShellVersion value + */ + public String powerShellVersion() { + return this.powerShellVersion; + } + + /** + * Set version of PowerShell. + * + * @param powerShellVersion the powerShellVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withPowerShellVersion(String powerShellVersion) { + this.powerShellVersion = powerShellVersion; + return this; + } + + /** + * Get linux App Framework and version. + * + * @return the linuxFxVersion value + */ + public String linuxFxVersion() { + return this.linuxFxVersion; + } + + /** + * Set linux App Framework and version. + * + * @param linuxFxVersion the linuxFxVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withLinuxFxVersion(String linuxFxVersion) { + this.linuxFxVersion = linuxFxVersion; + return this; + } + + /** + * Get xenon App Framework and version. + * + * @return the windowsFxVersion value + */ + public String windowsFxVersion() { + return this.windowsFxVersion; + } + + /** + * Set xenon App Framework and version. + * + * @param windowsFxVersion the windowsFxVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withWindowsFxVersion(String windowsFxVersion) { + this.windowsFxVersion = windowsFxVersion; + return this; + } + + /** + * Get <code>true</code> if request tracing is enabled; otherwise, <code>false</code>. + * + * @return the requestTracingEnabled value + */ + public Boolean requestTracingEnabled() { + return this.requestTracingEnabled; + } + + /** + * Set <code>true</code> if request tracing is enabled; otherwise, <code>false</code>. + * + * @param requestTracingEnabled the requestTracingEnabled value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withRequestTracingEnabled(Boolean requestTracingEnabled) { + this.requestTracingEnabled = requestTracingEnabled; + return this; + } + + /** + * Get request tracing expiration time. + * + * @return the requestTracingExpirationTime value + */ + public DateTime requestTracingExpirationTime() { + return this.requestTracingExpirationTime; + } + + /** + * Set request tracing expiration time. + * + * @param requestTracingExpirationTime the requestTracingExpirationTime value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withRequestTracingExpirationTime(DateTime requestTracingExpirationTime) { + this.requestTracingExpirationTime = requestTracingExpirationTime; + return this; + } + + /** + * Get <code>true</code> if remote debugging is enabled; otherwise, <code>false</code>. + * + * @return the remoteDebuggingEnabled value + */ + public Boolean remoteDebuggingEnabled() { + return this.remoteDebuggingEnabled; + } + + /** + * Set <code>true</code> if remote debugging is enabled; otherwise, <code>false</code>. + * + * @param remoteDebuggingEnabled the remoteDebuggingEnabled value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withRemoteDebuggingEnabled(Boolean remoteDebuggingEnabled) { + this.remoteDebuggingEnabled = remoteDebuggingEnabled; + return this; + } + + /** + * Get remote debugging version. + * + * @return the remoteDebuggingVersion value + */ + public String remoteDebuggingVersion() { + return this.remoteDebuggingVersion; + } + + /** + * Set remote debugging version. + * + * @param remoteDebuggingVersion the remoteDebuggingVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withRemoteDebuggingVersion(String remoteDebuggingVersion) { + this.remoteDebuggingVersion = remoteDebuggingVersion; + return this; + } + + /** + * Get <code>true</code> if HTTP logging is enabled; otherwise, <code>false</code>. + * + * @return the httpLoggingEnabled value + */ + public Boolean httpLoggingEnabled() { + return this.httpLoggingEnabled; + } + + /** + * Set <code>true</code> if HTTP logging is enabled; otherwise, <code>false</code>. + * + * @param httpLoggingEnabled the httpLoggingEnabled value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withHttpLoggingEnabled(Boolean httpLoggingEnabled) { + this.httpLoggingEnabled = httpLoggingEnabled; + return this; + } + + /** + * Get flag to use Managed Identity Creds for ACR pull. + * + * @return the acrUseManagedIdentityCreds value + */ + public Boolean acrUseManagedIdentityCreds() { + return this.acrUseManagedIdentityCreds; + } + + /** + * Set flag to use Managed Identity Creds for ACR pull. + * + * @param acrUseManagedIdentityCreds the acrUseManagedIdentityCreds value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withAcrUseManagedIdentityCreds(Boolean acrUseManagedIdentityCreds) { + this.acrUseManagedIdentityCreds = acrUseManagedIdentityCreds; + return this; + } + + /** + * Get if using user managed identity, the user managed identity ClientId. + * + * @return the acrUserManagedIdentityID value + */ + public String acrUserManagedIdentityID() { + return this.acrUserManagedIdentityID; + } + + /** + * Set if using user managed identity, the user managed identity ClientId. + * + * @param acrUserManagedIdentityID the acrUserManagedIdentityID value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withAcrUserManagedIdentityID(String acrUserManagedIdentityID) { + this.acrUserManagedIdentityID = acrUserManagedIdentityID; + return this; + } + + /** + * Get hTTP logs directory size limit. + * + * @return the logsDirectorySizeLimit value + */ + public Integer logsDirectorySizeLimit() { + return this.logsDirectorySizeLimit; + } + + /** + * Set hTTP logs directory size limit. + * + * @param logsDirectorySizeLimit the logsDirectorySizeLimit value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withLogsDirectorySizeLimit(Integer logsDirectorySizeLimit) { + this.logsDirectorySizeLimit = logsDirectorySizeLimit; + return this; + } + + /** + * Get <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. + * + * @return the detailedErrorLoggingEnabled value + */ + public Boolean detailedErrorLoggingEnabled() { + return this.detailedErrorLoggingEnabled; + } + + /** + * Set <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. + * + * @param detailedErrorLoggingEnabled the detailedErrorLoggingEnabled value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withDetailedErrorLoggingEnabled(Boolean detailedErrorLoggingEnabled) { + this.detailedErrorLoggingEnabled = detailedErrorLoggingEnabled; + return this; + } + + /** + * Get publishing user name. + * + * @return the publishingUsername value + */ + public String publishingUsername() { + return this.publishingUsername; + } + + /** + * Set publishing user name. + * + * @param publishingUsername the publishingUsername value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withPublishingUsername(String publishingUsername) { + this.publishingUsername = publishingUsername; + return this; + } + + /** + * Get application settings. + * + * @return the appSettings value + */ + public List appSettings() { + return this.appSettings; + } + + /** + * Set application settings. + * + * @param appSettings the appSettings value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withAppSettings(List appSettings) { + this.appSettings = appSettings; + return this; + } + + /** + * Get connection strings. + * + * @return the connectionStrings value + */ + public List connectionStrings() { + return this.connectionStrings; + } + + /** + * Set connection strings. + * + * @param connectionStrings the connectionStrings value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withConnectionStrings(List connectionStrings) { + this.connectionStrings = connectionStrings; + return this; + } + + /** + * Get site MachineKey. + * + * @return the machineKey value + */ + public SiteMachineKey machineKey() { + return this.machineKey; + } + + /** + * Get handler mappings. + * + * @return the handlerMappings value + */ + public List handlerMappings() { + return this.handlerMappings; + } + + /** + * Set handler mappings. + * + * @param handlerMappings the handlerMappings value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withHandlerMappings(List handlerMappings) { + this.handlerMappings = handlerMappings; + return this; + } + + /** + * Get document root. + * + * @return the documentRoot value + */ + public String documentRoot() { + return this.documentRoot; + } + + /** + * Set document root. + * + * @param documentRoot the documentRoot value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withDocumentRoot(String documentRoot) { + this.documentRoot = documentRoot; + return this; + } + + /** + * Get sCM type. Possible values include: 'None', 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', 'CodePlexHg', 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg', 'OneDrive', 'VSO', 'VSTSRM'. + * + * @return the scmType value + */ + public ScmType scmType() { + return this.scmType; + } + + /** + * Set sCM type. Possible values include: 'None', 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', 'CodePlexHg', 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg', 'OneDrive', 'VSO', 'VSTSRM'. + * + * @param scmType the scmType value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withScmType(ScmType scmType) { + this.scmType = scmType; + return this; + } + + /** + * Get <code>true</code> to use 32-bit worker process; otherwise, <code>false</code>. + * + * @return the use32BitWorkerProcess value + */ + public Boolean use32BitWorkerProcess() { + return this.use32BitWorkerProcess; + } + + /** + * Set <code>true</code> to use 32-bit worker process; otherwise, <code>false</code>. + * + * @param use32BitWorkerProcess the use32BitWorkerProcess value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withUse32BitWorkerProcess(Boolean use32BitWorkerProcess) { + this.use32BitWorkerProcess = use32BitWorkerProcess; + return this; + } + + /** + * Get <code>true</code> if WebSocket is enabled; otherwise, <code>false</code>. + * + * @return the webSocketsEnabled value + */ + public Boolean webSocketsEnabled() { + return this.webSocketsEnabled; + } + + /** + * Set <code>true</code> if WebSocket is enabled; otherwise, <code>false</code>. + * + * @param webSocketsEnabled the webSocketsEnabled value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withWebSocketsEnabled(Boolean webSocketsEnabled) { + this.webSocketsEnabled = webSocketsEnabled; + return this; + } + + /** + * Get <code>true</code> if Always On is enabled; otherwise, <code>false</code>. + * + * @return the alwaysOn value + */ + public Boolean alwaysOn() { + return this.alwaysOn; + } + + /** + * Set <code>true</code> if Always On is enabled; otherwise, <code>false</code>. + * + * @param alwaysOn the alwaysOn value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withAlwaysOn(Boolean alwaysOn) { + this.alwaysOn = alwaysOn; + return this; + } + + /** + * Get java version. + * + * @return the javaVersion value + */ + public String javaVersion() { + return this.javaVersion; + } + + /** + * Set java version. + * + * @param javaVersion the javaVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withJavaVersion(String javaVersion) { + this.javaVersion = javaVersion; + return this; + } + + /** + * Get java container. + * + * @return the javaContainer value + */ + public String javaContainer() { + return this.javaContainer; + } + + /** + * Set java container. + * + * @param javaContainer the javaContainer value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withJavaContainer(String javaContainer) { + this.javaContainer = javaContainer; + return this; + } + + /** + * Get java container version. + * + * @return the javaContainerVersion value + */ + public String javaContainerVersion() { + return this.javaContainerVersion; + } + + /** + * Set java container version. + * + * @param javaContainerVersion the javaContainerVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withJavaContainerVersion(String javaContainerVersion) { + this.javaContainerVersion = javaContainerVersion; + return this; + } + + /** + * Get app command line to launch. + * + * @return the appCommandLine value + */ + public String appCommandLine() { + return this.appCommandLine; + } + + /** + * Set app command line to launch. + * + * @param appCommandLine the appCommandLine value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withAppCommandLine(String appCommandLine) { + this.appCommandLine = appCommandLine; + return this; + } + + /** + * Get managed pipeline mode. Possible values include: 'Integrated', 'Classic'. + * + * @return the managedPipelineMode value + */ + public ManagedPipelineMode managedPipelineMode() { + return this.managedPipelineMode; + } + + /** + * Set managed pipeline mode. Possible values include: 'Integrated', 'Classic'. + * + * @param managedPipelineMode the managedPipelineMode value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withManagedPipelineMode(ManagedPipelineMode managedPipelineMode) { + this.managedPipelineMode = managedPipelineMode; + return this; + } + + /** + * Get virtual applications. + * + * @return the virtualApplications value + */ + public List virtualApplications() { + return this.virtualApplications; + } + + /** + * Set virtual applications. + * + * @param virtualApplications the virtualApplications value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withVirtualApplications(List virtualApplications) { + this.virtualApplications = virtualApplications; + return this; + } + + /** + * Get site load balancing. Possible values include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash'. + * + * @return the loadBalancing value + */ + public SiteLoadBalancing loadBalancing() { + return this.loadBalancing; + } + + /** + * Set site load balancing. Possible values include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash'. + * + * @param loadBalancing the loadBalancing value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withLoadBalancing(SiteLoadBalancing loadBalancing) { + this.loadBalancing = loadBalancing; + return this; + } + + /** + * Get this is work around for polymorphic types. + * + * @return the experiments value + */ + public Experiments experiments() { + return this.experiments; + } + + /** + * Set this is work around for polymorphic types. + * + * @param experiments the experiments value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withExperiments(Experiments experiments) { + this.experiments = experiments; + return this; + } + + /** + * Get site limits. + * + * @return the limits value + */ + public SiteLimits limits() { + return this.limits; + } + + /** + * Set site limits. + * + * @param limits the limits value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withLimits(SiteLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get <code>true</code> if Auto Heal is enabled; otherwise, <code>false</code>. + * + * @return the autoHealEnabled value + */ + public Boolean autoHealEnabled() { + return this.autoHealEnabled; + } + + /** + * Set <code>true</code> if Auto Heal is enabled; otherwise, <code>false</code>. + * + * @param autoHealEnabled the autoHealEnabled value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withAutoHealEnabled(Boolean autoHealEnabled) { + this.autoHealEnabled = autoHealEnabled; + return this; + } + + /** + * Get auto Heal rules. + * + * @return the autoHealRules value + */ + public AutoHealRules autoHealRules() { + return this.autoHealRules; + } + + /** + * Set auto Heal rules. + * + * @param autoHealRules the autoHealRules value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withAutoHealRules(AutoHealRules autoHealRules) { + this.autoHealRules = autoHealRules; + return this; + } + + /** + * Get tracing options. + * + * @return the tracingOptions value + */ + public String tracingOptions() { + return this.tracingOptions; + } + + /** + * Set tracing options. + * + * @param tracingOptions the tracingOptions value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withTracingOptions(String tracingOptions) { + this.tracingOptions = tracingOptions; + return this; + } + + /** + * Get virtual Network name. + * + * @return the vnetName value + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set virtual Network name. + * + * @param vnetName the vnetName value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get cross-Origin Resource Sharing (CORS) settings. + * + * @return the cors value + */ + public CorsSettings cors() { + return this.cors; + } + + /** + * Set cross-Origin Resource Sharing (CORS) settings. + * + * @param cors the cors value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withCors(CorsSettings cors) { + this.cors = cors; + return this; + } + + /** + * Get push endpoint settings. + * + * @return the push value + */ + public PushSettingsInner push() { + return this.push; + } + + /** + * Set push endpoint settings. + * + * @param push the push value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withPush(PushSettingsInner push) { + this.push = push; + return this; + } + + /** + * Get information about the formal API definition for the app. + * + * @return the apiDefinition value + */ + public ApiDefinitionInfo apiDefinition() { + return this.apiDefinition; + } + + /** + * Set information about the formal API definition for the app. + * + * @param apiDefinition the apiDefinition value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withApiDefinition(ApiDefinitionInfo apiDefinition) { + this.apiDefinition = apiDefinition; + return this; + } + + /** + * Get azure API management settings linked to the app. + * + * @return the apiManagementConfig value + */ + public ApiManagementConfig apiManagementConfig() { + return this.apiManagementConfig; + } + + /** + * Set azure API management settings linked to the app. + * + * @param apiManagementConfig the apiManagementConfig value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withApiManagementConfig(ApiManagementConfig apiManagementConfig) { + this.apiManagementConfig = apiManagementConfig; + return this; + } + + /** + * Get auto-swap slot name. + * + * @return the autoSwapSlotName value + */ + public String autoSwapSlotName() { + return this.autoSwapSlotName; + } + + /** + * Set auto-swap slot name. + * + * @param autoSwapSlotName the autoSwapSlotName value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withAutoSwapSlotName(String autoSwapSlotName) { + this.autoSwapSlotName = autoSwapSlotName; + return this; + } + + /** + * Get <code>true</code> to enable local MySQL; otherwise, <code>false</code>. + * + * @return the localMySqlEnabled value + */ + public Boolean localMySqlEnabled() { + return this.localMySqlEnabled; + } + + /** + * Set <code>true</code> to enable local MySQL; otherwise, <code>false</code>. + * + * @param localMySqlEnabled the localMySqlEnabled value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withLocalMySqlEnabled(Boolean localMySqlEnabled) { + this.localMySqlEnabled = localMySqlEnabled; + return this; + } + + /** + * Get managed Service Identity Id. + * + * @return the managedServiceIdentityId value + */ + public Integer managedServiceIdentityId() { + return this.managedServiceIdentityId; + } + + /** + * Set managed Service Identity Id. + * + * @param managedServiceIdentityId the managedServiceIdentityId value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withManagedServiceIdentityId(Integer managedServiceIdentityId) { + this.managedServiceIdentityId = managedServiceIdentityId; + return this; + } + + /** + * Get explicit Managed Service Identity Id. + * + * @return the xManagedServiceIdentityId value + */ + public Integer xManagedServiceIdentityId() { + return this.xManagedServiceIdentityId; + } + + /** + * Set explicit Managed Service Identity Id. + * + * @param xManagedServiceIdentityId the xManagedServiceIdentityId value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withXManagedServiceIdentityId(Integer xManagedServiceIdentityId) { + this.xManagedServiceIdentityId = xManagedServiceIdentityId; + return this; + } + + /** + * Get iP security restrictions for main. + * + * @return the ipSecurityRestrictions value + */ + public List ipSecurityRestrictions() { + return this.ipSecurityRestrictions; + } + + /** + * Set iP security restrictions for main. + * + * @param ipSecurityRestrictions the ipSecurityRestrictions value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withIpSecurityRestrictions(List ipSecurityRestrictions) { + this.ipSecurityRestrictions = ipSecurityRestrictions; + return this; + } + + /** + * Get iP security restrictions for scm. + * + * @return the scmIpSecurityRestrictions value + */ + public List scmIpSecurityRestrictions() { + return this.scmIpSecurityRestrictions; + } + + /** + * Set iP security restrictions for scm. + * + * @param scmIpSecurityRestrictions the scmIpSecurityRestrictions value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withScmIpSecurityRestrictions(List scmIpSecurityRestrictions) { + this.scmIpSecurityRestrictions = scmIpSecurityRestrictions; + return this; + } + + /** + * Get iP security restrictions for scm to use main. + * + * @return the scmIpSecurityRestrictionsUseMain value + */ + public Boolean scmIpSecurityRestrictionsUseMain() { + return this.scmIpSecurityRestrictionsUseMain; + } + + /** + * Set iP security restrictions for scm to use main. + * + * @param scmIpSecurityRestrictionsUseMain the scmIpSecurityRestrictionsUseMain value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withScmIpSecurityRestrictionsUseMain(Boolean scmIpSecurityRestrictionsUseMain) { + this.scmIpSecurityRestrictionsUseMain = scmIpSecurityRestrictionsUseMain; + return this; + } + + /** + * Get http20Enabled: configures a web site to allow clients to connect over http2.0. + * + * @return the http20Enabled value + */ + public Boolean http20Enabled() { + return this.http20Enabled; + } + + /** + * Set http20Enabled: configures a web site to allow clients to connect over http2.0. + * + * @param http20Enabled the http20Enabled value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withHttp20Enabled(Boolean http20Enabled) { + this.http20Enabled = http20Enabled; + return this; + } + + /** + * Get minTlsVersion: configures the minimum version of TLS required for SSL requests. Possible values include: '1.0', '1.1', '1.2'. + * + * @return the minTlsVersion value + */ + public SupportedTlsVersions minTlsVersion() { + return this.minTlsVersion; + } + + /** + * Set minTlsVersion: configures the minimum version of TLS required for SSL requests. Possible values include: '1.0', '1.1', '1.2'. + * + * @param minTlsVersion the minTlsVersion value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withMinTlsVersion(SupportedTlsVersions minTlsVersion) { + this.minTlsVersion = minTlsVersion; + return this; + } + + /** + * Get state of FTP / FTPS service. Possible values include: 'AllAllowed', 'FtpsOnly', 'Disabled'. + * + * @return the ftpsState value + */ + public FtpsState ftpsState() { + return this.ftpsState; + } + + /** + * Set state of FTP / FTPS service. Possible values include: 'AllAllowed', 'FtpsOnly', 'Disabled'. + * + * @param ftpsState the ftpsState value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withFtpsState(FtpsState ftpsState) { + this.ftpsState = ftpsState; + return this; + } + + /** + * Get number of preWarmed instances. + This setting only applies to the Consumption and Elastic Plans. + * + * @return the preWarmedInstanceCount value + */ + public Integer preWarmedInstanceCount() { + return this.preWarmedInstanceCount; + } + + /** + * Set number of preWarmed instances. + This setting only applies to the Consumption and Elastic Plans. + * + * @param preWarmedInstanceCount the preWarmedInstanceCount value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withPreWarmedInstanceCount(Integer preWarmedInstanceCount) { + this.preWarmedInstanceCount = preWarmedInstanceCount; + return this; + } + + /** + * Get health check path. + * + * @return the healthCheckPath value + */ + public String healthCheckPath() { + return this.healthCheckPath; + } + + /** + * Set health check path. + * + * @param healthCheckPath the healthCheckPath value to set + * @return the SiteConfig object itself. + */ + public SiteConfig withHealthCheckPath(String healthCheckPath) { + this.healthCheckPath = healthCheckPath; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteConfigResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteConfigResource.java new file mode 100644 index 0000000000000..7acb1924b9460 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteConfigResource.java @@ -0,0 +1,328 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteConfigResourceInner; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.PushSettingsInner; +import org.joda.time.DateTime; + +/** + * Type representing SiteConfigResource. + */ +public interface SiteConfigResource extends HasInner, HasManager { + /** + * @return the acrUseManagedIdentityCreds value. + */ + Boolean acrUseManagedIdentityCreds(); + + /** + * @return the acrUserManagedIdentityID value. + */ + String acrUserManagedIdentityID(); + + /** + * @return the alwaysOn value. + */ + Boolean alwaysOn(); + + /** + * @return the apiDefinition value. + */ + ApiDefinitionInfo apiDefinition(); + + /** + * @return the apiManagementConfig value. + */ + ApiManagementConfig apiManagementConfig(); + + /** + * @return the appCommandLine value. + */ + String appCommandLine(); + + /** + * @return the appSettings value. + */ + List appSettings(); + + /** + * @return the autoHealEnabled value. + */ + Boolean autoHealEnabled(); + + /** + * @return the autoHealRules value. + */ + AutoHealRules autoHealRules(); + + /** + * @return the autoSwapSlotName value. + */ + String autoSwapSlotName(); + + /** + * @return the connectionStrings value. + */ + List connectionStrings(); + + /** + * @return the cors value. + */ + CorsSettings cors(); + + /** + * @return the defaultDocuments value. + */ + List defaultDocuments(); + + /** + * @return the detailedErrorLoggingEnabled value. + */ + Boolean detailedErrorLoggingEnabled(); + + /** + * @return the documentRoot value. + */ + String documentRoot(); + + /** + * @return the experiments value. + */ + Experiments experiments(); + + /** + * @return the ftpsState value. + */ + FtpsState ftpsState(); + + /** + * @return the handlerMappings value. + */ + List handlerMappings(); + + /** + * @return the healthCheckPath value. + */ + String healthCheckPath(); + + /** + * @return the http20Enabled value. + */ + Boolean http20Enabled(); + + /** + * @return the httpLoggingEnabled value. + */ + Boolean httpLoggingEnabled(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the ipSecurityRestrictions value. + */ + List ipSecurityRestrictions(); + + /** + * @return the javaContainer value. + */ + String javaContainer(); + + /** + * @return the javaContainerVersion value. + */ + String javaContainerVersion(); + + /** + * @return the javaVersion value. + */ + String javaVersion(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the limits value. + */ + SiteLimits limits(); + + /** + * @return the linuxFxVersion value. + */ + String linuxFxVersion(); + + /** + * @return the loadBalancing value. + */ + SiteLoadBalancing loadBalancing(); + + /** + * @return the localMySqlEnabled value. + */ + Boolean localMySqlEnabled(); + + /** + * @return the logsDirectorySizeLimit value. + */ + Integer logsDirectorySizeLimit(); + + /** + * @return the machineKey value. + */ + SiteMachineKey machineKey(); + + /** + * @return the managedPipelineMode value. + */ + ManagedPipelineMode managedPipelineMode(); + + /** + * @return the managedServiceIdentityId value. + */ + Integer managedServiceIdentityId(); + + /** + * @return the minTlsVersion value. + */ + SupportedTlsVersions minTlsVersion(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the netFrameworkVersion value. + */ + String netFrameworkVersion(); + + /** + * @return the nodeVersion value. + */ + String nodeVersion(); + + /** + * @return the numberOfWorkers value. + */ + Integer numberOfWorkers(); + + /** + * @return the phpVersion value. + */ + String phpVersion(); + + /** + * @return the powerShellVersion value. + */ + String powerShellVersion(); + + /** + * @return the preWarmedInstanceCount value. + */ + Integer preWarmedInstanceCount(); + + /** + * @return the publishingUsername value. + */ + String publishingUsername(); + + /** + * @return the push value. + */ + PushSettingsInner push(); + + /** + * @return the pythonVersion value. + */ + String pythonVersion(); + + /** + * @return the remoteDebuggingEnabled value. + */ + Boolean remoteDebuggingEnabled(); + + /** + * @return the remoteDebuggingVersion value. + */ + String remoteDebuggingVersion(); + + /** + * @return the requestTracingEnabled value. + */ + Boolean requestTracingEnabled(); + + /** + * @return the requestTracingExpirationTime value. + */ + DateTime requestTracingExpirationTime(); + + /** + * @return the scmIpSecurityRestrictions value. + */ + List scmIpSecurityRestrictions(); + + /** + * @return the scmIpSecurityRestrictionsUseMain value. + */ + Boolean scmIpSecurityRestrictionsUseMain(); + + /** + * @return the scmType value. + */ + ScmType scmType(); + + /** + * @return the tracingOptions value. + */ + String tracingOptions(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the use32BitWorkerProcess value. + */ + Boolean use32BitWorkerProcess(); + + /** + * @return the virtualApplications value. + */ + List virtualApplications(); + + /** + * @return the vnetName value. + */ + String vnetName(); + + /** + * @return the webSocketsEnabled value. + */ + Boolean webSocketsEnabled(); + + /** + * @return the windowsFxVersion value. + */ + String windowsFxVersion(); + + /** + * @return the xManagedServiceIdentityId value. + */ + Integer xManagedServiceIdentityId(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteConfigurationSnapshotInfo.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteConfigurationSnapshotInfo.java new file mode 100644 index 0000000000000..0100fded00a10 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteConfigurationSnapshotInfo.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteConfigurationSnapshotInfoInner; +import org.joda.time.DateTime; + +/** + * Type representing SiteConfigurationSnapshotInfo. + */ +public interface SiteConfigurationSnapshotInfo extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the snapshotId value. + */ + Integer snapshotId(); + + /** + * @return the time value. + */ + DateTime time(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteCsmUsageQuota.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteCsmUsageQuota.java new file mode 100644 index 0000000000000..8d4d3be020aa4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteCsmUsageQuota.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CsmUsageQuotaInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import org.joda.time.DateTime; + +/** + * Type representing SiteCsmUsageQuota. + */ +public interface SiteCsmUsageQuota extends HasInner, HasManager { + /** + * @return the currentValue value. + */ + Long currentValue(); + + /** + * @return the limit value. + */ + Long limit(); + + /** + * @return the name value. + */ + LocalizableString name(); + + /** + * @return the nextResetTime value. + */ + DateTime nextResetTime(); + + /** + * @return the unit value. + */ + String unit(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteExtensionInfo.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteExtensionInfo.java new file mode 100644 index 0000000000000..a43ecb12a21f9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteExtensionInfo.java @@ -0,0 +1,195 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteExtensionInfoInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; +import org.joda.time.DateTime; + +/** + * Type representing SiteExtensionInfo. + */ +public interface SiteExtensionInfo extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the authors value. + */ + List authors(); + + /** + * @return the comment value. + */ + String comment(); + + /** + * @return the description value. + */ + String description(); + + /** + * @return the downloadCount value. + */ + Integer downloadCount(); + + /** + * @return the extensionId value. + */ + String extensionId(); + + /** + * @return the extensionType value. + */ + SiteExtensionType extensionType(); + + /** + * @return the extensionUrl value. + */ + String extensionUrl(); + + /** + * @return the feedUrl value. + */ + String feedUrl(); + + /** + * @return the iconUrl value. + */ + String iconUrl(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the installedDateTime value. + */ + DateTime installedDateTime(); + + /** + * @return the installerCommandLineParams value. + */ + String installerCommandLineParams(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the licenseUrl value. + */ + String licenseUrl(); + + /** + * @return the localIsLatestVersion value. + */ + Boolean localIsLatestVersion(); + + /** + * @return the localPath value. + */ + String localPath(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the projectUrl value. + */ + String projectUrl(); + + /** + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * @return the publishedDateTime value. + */ + DateTime publishedDateTime(); + + /** + * @return the summary value. + */ + String summary(); + + /** + * @return the title value. + */ + String title(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the version value. + */ + String version(); + + /** + * The entirety of the SiteExtensionInfo definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithSite, DefinitionStages.WithCreate { + } + + /** + * Grouping of SiteExtensionInfo definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a SiteExtensionInfo definition. + */ + interface Blank extends WithSite { + } + + /** + * The stage of the siteextensioninfo definition allowing to specify Site. + */ + interface WithSite { + /** + * Specifies resourceGroupName, name. + * @param resourceGroupName Name of the resource group to which the resource belongs + * @param name Site name + * @return the next definition stage + */ + WithCreate withExistingSite(String resourceGroupName, String name); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a SiteExtensionInfo update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable { + } + + /** + * Grouping of SiteExtensionInfo update stages. + */ + interface UpdateStages { + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteExtensionType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteExtensionType.java new file mode 100644 index 0000000000000..2f4dd4066e057 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteHybridConnection.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteHybridConnection.java new file mode 100644 index 0000000000000..aeb3117e4d6b3 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteHybridConnection.java @@ -0,0 +1,352 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.HybridConnectionInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing SiteHybridConnection. + */ +public interface SiteHybridConnection extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the hostname value. + */ + String hostname(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the port value. + */ + Integer port(); + + /** + * @return the relayArmUri value. + */ + String relayArmUri(); + + /** + * @return the relayName value. + */ + String relayName(); + + /** + * @return the sendKeyName value. + */ + String sendKeyName(); + + /** + * @return the sendKeyValue value. + */ + String sendKeyValue(); + + /** + * @return the serviceBusNamespace value. + */ + String serviceBusNamespace(); + + /** + * @return the serviceBusSuffix value. + */ + String serviceBusSuffix(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the SiteHybridConnection definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithHybridConnectionNamespace, DefinitionStages.WithCreate { + } + + /** + * Grouping of SiteHybridConnection definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a SiteHybridConnection definition. + */ + interface Blank extends WithHybridConnectionNamespace { + } + + /** + * The stage of the sitehybridconnection definition allowing to specify HybridConnectionNamespace. + */ + interface WithHybridConnectionNamespace { + /** + * Specifies resourceGroupName, name, namespaceName. + * @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 + * @return the next definition stage + */ + WithCreate withExistingHybridConnectionNamespace(String resourceGroupName, String name, String namespaceName); + } + + /** + * The stage of the sitehybridconnection definition allowing to specify Hostname. + */ + interface WithHostname { + /** + * Specifies hostname. + * @param hostname The hostname of the endpoint + * @return the next definition stage + */ + WithCreate withHostname(String hostname); + } + + /** + * The stage of the sitehybridconnection definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the sitehybridconnection definition allowing to specify Port. + */ + interface WithPort { + /** + * Specifies port. + * @param port The port of the endpoint + * @return the next definition stage + */ + WithCreate withPort(Integer port); + } + + /** + * The stage of the sitehybridconnection definition allowing to specify RelayArmUri. + */ + interface WithRelayArmUri { + /** + * Specifies relayArmUri. + * @param relayArmUri The ARM URI to the Service Bus relay + * @return the next definition stage + */ + WithCreate withRelayArmUri(String relayArmUri); + } + + /** + * The stage of the sitehybridconnection definition allowing to specify RelayName. + */ + interface WithRelayName { + /** + * Specifies relayName. + * @param relayName The name of the Service Bus relay + * @return the next definition stage + */ + WithCreate withRelayName(String relayName); + } + + /** + * The stage of the sitehybridconnection definition allowing to specify SendKeyName. + */ + interface WithSendKeyName { + /** + * Specifies sendKeyName. + * @param sendKeyName The name of the Service Bus key which has Send permissions. This is used to authenticate to Service Bus + * @return the next definition stage + */ + WithCreate withSendKeyName(String sendKeyName); + } + + /** + * The stage of the sitehybridconnection definition allowing to specify SendKeyValue. + */ + interface WithSendKeyValue { + /** + * Specifies sendKeyValue. + * @param sendKeyValue 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 + * @return the next definition stage + */ + WithCreate withSendKeyValue(String sendKeyValue); + } + + /** + * The stage of the sitehybridconnection definition allowing to specify ServiceBusNamespace. + */ + interface WithServiceBusNamespace { + /** + * Specifies serviceBusNamespace. + * @param serviceBusNamespace The name of the Service Bus namespace + * @return the next definition stage + */ + WithCreate withServiceBusNamespace(String serviceBusNamespace); + } + + /** + * The stage of the sitehybridconnection definition allowing to specify ServiceBusSuffix. + */ + interface WithServiceBusSuffix { + /** + * Specifies serviceBusSuffix. + * @param serviceBusSuffix The suffix for the service bus endpoint. By default this is .servicebus.windows.net + * @return the next definition stage + */ + WithCreate withServiceBusSuffix(String serviceBusSuffix); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithHostname, DefinitionStages.WithKind, DefinitionStages.WithPort, DefinitionStages.WithRelayArmUri, DefinitionStages.WithRelayName, DefinitionStages.WithSendKeyName, DefinitionStages.WithSendKeyValue, DefinitionStages.WithServiceBusNamespace, DefinitionStages.WithServiceBusSuffix { + } + } + /** + * The template for a SiteHybridConnection update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithHostname, UpdateStages.WithKind, UpdateStages.WithPort, UpdateStages.WithRelayArmUri, UpdateStages.WithRelayName, UpdateStages.WithSendKeyName, UpdateStages.WithSendKeyValue, UpdateStages.WithServiceBusNamespace, UpdateStages.WithServiceBusSuffix { + } + + /** + * Grouping of SiteHybridConnection update stages. + */ + interface UpdateStages { + /** + * The stage of the sitehybridconnection update allowing to specify Hostname. + */ + interface WithHostname { + /** + * Specifies hostname. + * @param hostname The hostname of the endpoint + * @return the next update stage + */ + Update withHostname(String hostname); + } + + /** + * The stage of the sitehybridconnection update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the sitehybridconnection update allowing to specify Port. + */ + interface WithPort { + /** + * Specifies port. + * @param port The port of the endpoint + * @return the next update stage + */ + Update withPort(Integer port); + } + + /** + * The stage of the sitehybridconnection update allowing to specify RelayArmUri. + */ + interface WithRelayArmUri { + /** + * Specifies relayArmUri. + * @param relayArmUri The ARM URI to the Service Bus relay + * @return the next update stage + */ + Update withRelayArmUri(String relayArmUri); + } + + /** + * The stage of the sitehybridconnection update allowing to specify RelayName. + */ + interface WithRelayName { + /** + * Specifies relayName. + * @param relayName The name of the Service Bus relay + * @return the next update stage + */ + Update withRelayName(String relayName); + } + + /** + * The stage of the sitehybridconnection update allowing to specify SendKeyName. + */ + interface WithSendKeyName { + /** + * Specifies sendKeyName. + * @param sendKeyName The name of the Service Bus key which has Send permissions. This is used to authenticate to Service Bus + * @return the next update stage + */ + Update withSendKeyName(String sendKeyName); + } + + /** + * The stage of the sitehybridconnection update allowing to specify SendKeyValue. + */ + interface WithSendKeyValue { + /** + * Specifies sendKeyValue. + * @param sendKeyValue 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 + * @return the next update stage + */ + Update withSendKeyValue(String sendKeyValue); + } + + /** + * The stage of the sitehybridconnection update allowing to specify ServiceBusNamespace. + */ + interface WithServiceBusNamespace { + /** + * Specifies serviceBusNamespace. + * @param serviceBusNamespace The name of the Service Bus namespace + * @return the next update stage + */ + Update withServiceBusNamespace(String serviceBusNamespace); + } + + /** + * The stage of the sitehybridconnection update allowing to specify ServiceBusSuffix. + */ + interface WithServiceBusSuffix { + /** + * Specifies serviceBusSuffix. + * @param serviceBusSuffix The suffix for the service bus endpoint. By default this is .servicebus.windows.net + * @return the next update stage + */ + Update withServiceBusSuffix(String serviceBusSuffix); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteInstance.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteInstance.java new file mode 100644 index 0000000000000..0dab2968109be --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteInstance.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteInstanceInner; + +/** + * Type representing SiteInstance. + */ +public interface SiteInstance extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the siteInstanceName value. + */ + String siteInstanceName(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteLimits.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteLimits.java new file mode 100644 index 0000000000000..3329608837388 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 maximum allowed CPU usage percentage. + * + * @return the maxPercentageCpu value + */ + public Double maxPercentageCpu() { + return this.maxPercentageCpu; + } + + /** + * Set maximum allowed CPU usage percentage. + * + * @param maxPercentageCpu the maxPercentageCpu value to set + * @return the SiteLimits object itself. + */ + public SiteLimits withMaxPercentageCpu(Double maxPercentageCpu) { + this.maxPercentageCpu = maxPercentageCpu; + return this; + } + + /** + * Get maximum allowed memory usage in MB. + * + * @return the maxMemoryInMb value + */ + public Long maxMemoryInMb() { + return this.maxMemoryInMb; + } + + /** + * Set maximum allowed memory usage in MB. + * + * @param maxMemoryInMb the maxMemoryInMb value to set + * @return the SiteLimits object itself. + */ + public SiteLimits withMaxMemoryInMb(Long maxMemoryInMb) { + this.maxMemoryInMb = maxMemoryInMb; + return this; + } + + /** + * Get maximum allowed disk size usage in MB. + * + * @return the maxDiskSizeInMb value + */ + public Long maxDiskSizeInMb() { + return this.maxDiskSizeInMb; + } + + /** + * Set maximum allowed disk size usage in MB. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteLoadBalancing.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteLoadBalancing.java new file mode 100644 index 0000000000000..a4af45eb95ea9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteLogsConfig.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteLogsConfig.java new file mode 100644 index 0000000000000..a22187315cfdf --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteLogsConfig.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteLogsConfigInner; + +/** + * Type representing SiteLogsConfig. + */ +public interface SiteLogsConfig extends HasInner, HasManager { + /** + * @return the applicationLogs value. + */ + ApplicationLogsConfig applicationLogs(); + + /** + * @return the detailedErrorMessages value. + */ + EnabledConfig detailedErrorMessages(); + + /** + * @return the failedRequestsTracing value. + */ + EnabledConfig failedRequestsTracing(); + + /** + * @return the httpLogs value. + */ + HttpLogsConfig httpLogs(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteMachineKey.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteMachineKey.java new file mode 100644 index 0000000000000..d16324745778f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 machineKey validation. + * + * @return the validation value + */ + public String validation() { + return this.validation; + } + + /** + * Set machineKey validation. + * + * @param validation the validation value to set + * @return the SiteMachineKey object itself. + */ + public SiteMachineKey withValidation(String validation) { + this.validation = validation; + return this; + } + + /** + * Get validation key. + * + * @return the validationKey value + */ + public String validationKey() { + return this.validationKey; + } + + /** + * Set validation key. + * + * @param validationKey the validationKey value to set + * @return the SiteMachineKey object itself. + */ + public SiteMachineKey withValidationKey(String validationKey) { + this.validationKey = validationKey; + return this; + } + + /** + * Get algorithm used for decryption. + * + * @return the decryption value + */ + public String decryption() { + return this.decryption; + } + + /** + * Set algorithm used for decryption. + * + * @param decryption the decryption value to set + * @return the SiteMachineKey object itself. + */ + public SiteMachineKey withDecryption(String decryption) { + this.decryption = decryption; + return this; + } + + /** + * Get decryption key. + * + * @return the decryptionKey value + */ + public String decryptionKey() { + return this.decryptionKey; + } + + /** + * Set decryption key. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SitePatchResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SitePatchResource.java new file mode 100644 index 0000000000000..5c132a4f2bdab --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SitePatchResource.java @@ -0,0 +1,822 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import java.util.List; +import org.joda.time.DateTime; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * ARM resource for a site. + */ +@JsonFlatten +public class SitePatchResource 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; + + /** + * Obsolete: Hyper-V sandbox. + */ + @JsonProperty(value = "properties.isXenon") + private Boolean isXenon; + + /** + * Hyper-V sandbox. + */ + @JsonProperty(value = "properties.hyperV") + private Boolean hyperV; + + /** + * 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; + + /** + * client certificate authentication comma-separated exclusion paths. + */ + @JsonProperty(value = "properties.clientCertExclusionPaths") + private String clientCertExclusionPaths; + + /** + * <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 except dataComponent. + * 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; + + /** + * 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; + + /** + * Site redundancy mode. Possible values include: 'None', 'Manual', + * 'Failover', 'ActiveActive', 'GeoRedundant'. + */ + @JsonProperty(value = "properties.redundancyMode") + private RedundancyMode redundancyMode; + + /** + * Specifies an operation id if this site has a pending operation. + */ + @JsonProperty(value = "properties.inProgressOperationId", access = JsonProperty.Access.WRITE_ONLY) + private UUID inProgressOperationId; + + /** + * The identity property. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /** + * Get current state of the app. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Get hostnames associated with the app. + * + * @return the hostNames value + */ + public List hostNames() { + return this.hostNames; + } + + /** + * Get name of the repository site. + * + * @return the repositorySiteName value + */ + public String repositorySiteName() { + return this.repositorySiteName; + } + + /** + * Get state indicating whether the app has exceeded its quota usage. Read-only. Possible values include: 'Normal', 'Exceeded'. + * + * @return the usageState value + */ + public UsageState usageState() { + return this.usageState; + } + + /** + * Get <code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline). + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set <code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline). + * + * @param enabled the enabled value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get enabled hostnames for the app.Hostnames need to be assigned (see HostNames) AND enabled. Otherwise, + the app is not served on those hostnames. + * + * @return the enabledHostNames value + */ + public List enabledHostNames() { + return this.enabledHostNames; + } + + /** + * Get management information availability state for the app. Possible values include: 'Normal', 'Limited', 'DisasterRecoveryMode'. + * + * @return the availabilityState value + */ + public SiteAvailabilityState availabilityState() { + return this.availabilityState; + } + + /** + * Get hostname SSL states are used to manage the SSL bindings for app's hostnames. + * + * @return the hostNameSslStates value + */ + public List hostNameSslStates() { + return this.hostNameSslStates; + } + + /** + * Set hostname SSL states are used to manage the SSL bindings for app's hostnames. + * + * @param hostNameSslStates the hostNameSslStates value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withHostNameSslStates(List hostNameSslStates) { + this.hostNameSslStates = hostNameSslStates; + return this; + } + + /** + * Get resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + * + * @return the serverFarmId value + */ + public String serverFarmId() { + return this.serverFarmId; + } + + /** + * Set resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + * + * @param serverFarmId the serverFarmId value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withServerFarmId(String serverFarmId) { + this.serverFarmId = serverFarmId; + return this; + } + + /** + * Get <code>true</code> if reserved; otherwise, <code>false</code>. + * + * @return the reserved value + */ + public Boolean reserved() { + return this.reserved; + } + + /** + * Set <code>true</code> if reserved; otherwise, <code>false</code>. + * + * @param reserved the reserved value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withReserved(Boolean reserved) { + this.reserved = reserved; + return this; + } + + /** + * Get obsolete: Hyper-V sandbox. + * + * @return the isXenon value + */ + public Boolean isXenon() { + return this.isXenon; + } + + /** + * Set obsolete: Hyper-V sandbox. + * + * @param isXenon the isXenon value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withIsXenon(Boolean isXenon) { + this.isXenon = isXenon; + return this; + } + + /** + * Get hyper-V sandbox. + * + * @return the hyperV value + */ + public Boolean hyperV() { + return this.hyperV; + } + + /** + * Set hyper-V sandbox. + * + * @param hyperV the hyperV value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withHyperV(Boolean hyperV) { + this.hyperV = hyperV; + return this; + } + + /** + * Get last time the app was modified, in UTC. Read-only. + * + * @return the lastModifiedTimeUtc value + */ + public DateTime lastModifiedTimeUtc() { + return this.lastModifiedTimeUtc; + } + + /** + * Get configuration of the app. + * + * @return the siteConfig value + */ + public SiteConfig siteConfig() { + return this.siteConfig; + } + + /** + * Set configuration of the app. + * + * @param siteConfig the siteConfig value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withSiteConfig(SiteConfig siteConfig) { + this.siteConfig = siteConfig; + return this; + } + + /** + * Get azure Traffic Manager hostnames associated with the app. Read-only. + * + * @return the trafficManagerHostNames value + */ + public List trafficManagerHostNames() { + return this.trafficManagerHostNames; + } + + /** + * Get <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. + * + * @return the scmSiteAlsoStopped value + */ + public Boolean scmSiteAlsoStopped() { + return this.scmSiteAlsoStopped; + } + + /** + * Set <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. + * + * @param scmSiteAlsoStopped the scmSiteAlsoStopped value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped) { + this.scmSiteAlsoStopped = scmSiteAlsoStopped; + return this; + } + + /** + * Get specifies which deployment slot this app will swap into. Read-only. + * + * @return the targetSwapSlot value + */ + public String targetSwapSlot() { + return this.targetSwapSlot; + } + + /** + * Get app Service Environment to use for the app. + * + * @return the hostingEnvironmentProfile value + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Set app Service Environment to use for the app. + * + * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + this.hostingEnvironmentProfile = hostingEnvironmentProfile; + return this; + } + + /** + * Get <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>. + * + * @return the clientAffinityEnabled value + */ + public Boolean clientAffinityEnabled() { + return this.clientAffinityEnabled; + } + + /** + * Set <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>. + * + * @param clientAffinityEnabled the clientAffinityEnabled value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withClientAffinityEnabled(Boolean clientAffinityEnabled) { + this.clientAffinityEnabled = clientAffinityEnabled; + return this; + } + + /** + * Get <code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code>. + * + * @return the clientCertEnabled value + */ + public Boolean clientCertEnabled() { + return this.clientCertEnabled; + } + + /** + * Set <code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code>. + * + * @param clientCertEnabled the clientCertEnabled value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withClientCertEnabled(Boolean clientCertEnabled) { + this.clientCertEnabled = clientCertEnabled; + return this; + } + + /** + * Get client certificate authentication comma-separated exclusion paths. + * + * @return the clientCertExclusionPaths value + */ + public String clientCertExclusionPaths() { + return this.clientCertExclusionPaths; + } + + /** + * Set client certificate authentication comma-separated exclusion paths. + * + * @param clientCertExclusionPaths the clientCertExclusionPaths value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withClientCertExclusionPaths(String clientCertExclusionPaths) { + this.clientCertExclusionPaths = clientCertExclusionPaths; + return this; + } + + /** + * Get <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. + * + * @return the hostNamesDisabled value + */ + public Boolean hostNamesDisabled() { + return this.hostNamesDisabled; + } + + /** + * Set <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. + * + * @param hostNamesDisabled the hostNamesDisabled value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withHostNamesDisabled(Boolean hostNamesDisabled) { + this.hostNamesDisabled = hostNamesDisabled; + return this; + } + + /** + * Get 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. + * + * @return the outboundIpAddresses value + */ + public String outboundIpAddresses() { + return this.outboundIpAddresses; + } + + /** + * Get list of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. + * + * @return the possibleOutboundIpAddresses value + */ + public String possibleOutboundIpAddresses() { + return this.possibleOutboundIpAddresses; + } + + /** + * Get size of the function container. + * + * @return the containerSize value + */ + public Integer containerSize() { + return this.containerSize; + } + + /** + * Set size of the function container. + * + * @param containerSize the containerSize value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withContainerSize(Integer containerSize) { + this.containerSize = containerSize; + return this; + } + + /** + * Get maximum allowed daily memory-time quota (applicable on dynamic apps only). + * + * @return the dailyMemoryTimeQuota value + */ + public Integer dailyMemoryTimeQuota() { + return this.dailyMemoryTimeQuota; + } + + /** + * Set maximum allowed daily memory-time quota (applicable on dynamic apps only). + * + * @param dailyMemoryTimeQuota the dailyMemoryTimeQuota value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota) { + this.dailyMemoryTimeQuota = dailyMemoryTimeQuota; + return this; + } + + /** + * Get app suspended till in case memory-time quota is exceeded. + * + * @return the suspendedTill value + */ + public DateTime suspendedTill() { + return this.suspendedTill; + } + + /** + * Get maximum number of workers. + This only applies to Functions container. + * + * @return the maxNumberOfWorkers value + */ + public Integer maxNumberOfWorkers() { + return this.maxNumberOfWorkers; + } + + /** + * Get if specified during app creation, the app is cloned from a source app. + * + * @return the cloningInfo value + */ + public CloningInfo cloningInfo() { + return this.cloningInfo; + } + + /** + * Set if specified during app creation, the app is cloned from a source app. + * + * @param cloningInfo the cloningInfo value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withCloningInfo(CloningInfo cloningInfo) { + this.cloningInfo = cloningInfo; + return this; + } + + /** + * Get name of the resource group the app belongs to. Read-only. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get <code>true</code> if the app is a default container; otherwise, <code>false</code>. + * + * @return the isDefaultContainer value + */ + public Boolean isDefaultContainer() { + return this.isDefaultContainer; + } + + /** + * Get default hostname of the app. Read-only. + * + * @return the defaultHostName value + */ + public String defaultHostName() { + return this.defaultHostName; + } + + /** + * Get status of the last deployment slot swap operation. + * + * @return the slotSwapStatus value + */ + public SlotSwapStatus slotSwapStatus() { + return this.slotSwapStatus; + } + + /** + * Get httpsOnly: configures a web site to accept only https requests. Issues redirect for + http requests. + * + * @return the httpsOnly value + */ + public Boolean httpsOnly() { + return this.httpsOnly; + } + + /** + * Set httpsOnly: configures a web site to accept only https requests. Issues redirect for + http requests. + * + * @param httpsOnly the httpsOnly value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withHttpsOnly(Boolean httpsOnly) { + this.httpsOnly = httpsOnly; + return this; + } + + /** + * Get site redundancy mode. Possible values include: 'None', 'Manual', 'Failover', 'ActiveActive', 'GeoRedundant'. + * + * @return the redundancyMode value + */ + public RedundancyMode redundancyMode() { + return this.redundancyMode; + } + + /** + * Set site redundancy mode. Possible values include: 'None', 'Manual', 'Failover', 'ActiveActive', 'GeoRedundant'. + * + * @param redundancyMode the redundancyMode value to set + * @return the SitePatchResource object itself. + */ + public SitePatchResource withRedundancyMode(RedundancyMode redundancyMode) { + this.redundancyMode = redundancyMode; + return this; + } + + /** + * Get specifies an operation id if this site has a pending operation. + * + * @return the inProgressOperationId value + */ + public UUID inProgressOperationId() { + return this.inProgressOperationId; + } + + /** + * 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 SitePatchResource object itself. + */ + public SitePatchResource withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SitePhpErrorLogFlag.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SitePhpErrorLogFlag.java new file mode 100644 index 0000000000000..2659af6a05d9f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SitePhpErrorLogFlag.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SitePhpErrorLogFlagInner; + +/** + * Type representing SitePhpErrorLogFlag. + */ +public interface SitePhpErrorLogFlag extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the localLogErrors value. + */ + String localLogErrors(); + + /** + * @return the localLogErrorsMaxLength value. + */ + String localLogErrorsMaxLength(); + + /** + * @return the masterLogErrors value. + */ + String masterLogErrors(); + + /** + * @return the masterLogErrorsMaxLength value. + */ + String masterLogErrorsMaxLength(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteRuntimeState.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteRuntimeState.java new file mode 100644 index 0000000000000..4d48b4abb281c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteRuntimeState.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for SiteRuntimeState. + */ +public enum SiteRuntimeState { + /** Enum value READY. */ + READY("READY"), + + /** Enum value STOPPED. */ + STOPPED("STOPPED"), + + /** Enum value UNKNOWN. */ + UNKNOWN("UNKNOWN"); + + /** The actual serialized value for a SiteRuntimeState instance. */ + private String value; + + SiteRuntimeState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SiteRuntimeState instance. + * + * @param value the serialized value to parse. + * @return the parsed SiteRuntimeState object, or null if unable to parse. + */ + @JsonCreator + public static SiteRuntimeState fromString(String value) { + SiteRuntimeState[] items = SiteRuntimeState.values(); + for (SiteRuntimeState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteSeal.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteSeal.java new file mode 100644 index 0000000000000..ae7dce5133453 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteSeal.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteSealInner; + +/** + * Type representing SiteSeal. + */ +public interface SiteSeal extends HasInner, HasManager { + /** + * @return the html value. + */ + String html(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteSealRequest.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteSealRequest.java new file mode 100644 index 0000000000000..0db7379c541ed --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteSealRequest.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Site seal request. + */ +public class SiteSealRequest { + /** + * 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 if <code>true</code> use the light color theme for site seal; otherwise, use the default color theme. + * + * @return the lightTheme value + */ + public Boolean lightTheme() { + return this.lightTheme; + } + + /** + * Set if <code>true</code> use the light color theme for site seal; otherwise, use the default color theme. + * + * @param lightTheme the lightTheme value to set + * @return the SiteSealRequest object itself. + */ + public SiteSealRequest withLightTheme(Boolean lightTheme) { + this.lightTheme = lightTheme; + return this; + } + + /** + * Get locale of site seal. + * + * @return the locale value + */ + public String locale() { + return this.locale; + } + + /** + * Set locale of site seal. + * + * @param locale the locale value to set + * @return the SiteSealRequest object itself. + */ + public SiteSealRequest withLocale(String locale) { + this.locale = locale; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteSourceControl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteSourceControl.java new file mode 100644 index 0000000000000..740f620882e41 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteSourceControl.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteSourceControlInner; + +/** + * Type representing SiteSourceControl. + */ +public interface SiteSourceControl extends HasInner, HasManager { + /** + * @return the branch value. + */ + String branch(); + + /** + * @return the deploymentRollbackEnabled value. + */ + Boolean deploymentRollbackEnabled(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the isManualIntegration value. + */ + Boolean isManualIntegration(); + + /** + * @return the isMercurial value. + */ + Boolean isMercurial(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the repoUrl value. + */ + String repoUrl(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteVnetGateway.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteVnetGateway.java new file mode 100644 index 0000000000000..40da0c51ef4f0 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteVnetGateway.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.VnetGatewayInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing SiteVnetGateway. + */ +public interface SiteVnetGateway extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the vnetName value. + */ + String vnetName(); + + /** + * @return the vpnPackageUri value. + */ + String vpnPackageUri(); + + /** + * The entirety of the SiteVnetGateway definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithVirtualNetworkConnection, DefinitionStages.WithVpnPackageUri, DefinitionStages.WithCreate { + } + + /** + * Grouping of SiteVnetGateway definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a SiteVnetGateway definition. + */ + interface Blank extends WithVirtualNetworkConnection { + } + + /** + * The stage of the sitevnetgateway definition allowing to specify VirtualNetworkConnection. + */ + interface WithVirtualNetworkConnection { + /** + * Specifies resourceGroupName, name, vnetName, slot. + * @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 add or update a gateway for the production slot's Virtual Network + * @return the next definition stage + */ + WithVpnPackageUri withExistingVirtualNetworkConnection(String resourceGroupName, String name, String vnetName, String slot); + } + + /** + * The stage of the sitevnetgateway definition allowing to specify VpnPackageUri. + */ + interface WithVpnPackageUri { + /** + * Specifies vpnPackageUri. + * @param vpnPackageUri The URI where the VPN package can be downloaded + * @return the next definition stage + */ + WithCreate withVpnPackageUri(String vpnPackageUri); + } + + /** + * The stage of the sitevnetgateway definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the sitevnetgateway definition allowing to specify VnetName. + */ + interface WithVnetName { + /** + * Specifies vnetName. + * @param vnetName The Virtual Network name + * @return the next definition stage + */ + WithCreate withVnetName(String vnetName); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithKind, DefinitionStages.WithVnetName { + } + } + /** + * The template for a SiteVnetGateway update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithKind, UpdateStages.WithVnetName { + } + + /** + * Grouping of SiteVnetGateway update stages. + */ + interface UpdateStages { + /** + * The stage of the sitevnetgateway update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the sitevnetgateway update allowing to specify VnetName. + */ + interface WithVnetName { + /** + * Specifies vnetName. + * @param vnetName The Virtual Network name + * @return the next update stage + */ + Update withVnetName(String vnetName); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteVnetInfo.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteVnetInfo.java new file mode 100644 index 0000000000000..24823c917abf3 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SiteVnetInfo.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.VnetInfoInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; + +/** + * Type representing SiteVnetInfo. + */ +public interface SiteVnetInfo extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the certBlob value. + */ + String certBlob(); + + /** + * @return the certThumbprint value. + */ + String certThumbprint(); + + /** + * @return the dnsServers value. + */ + String dnsServers(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the isSwift value. + */ + Boolean isSwift(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the resyncRequired value. + */ + Boolean resyncRequired(); + + /** + * @return the routes value. + */ + List routes(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the vnetResourceId value. + */ + String vnetResourceId(); + + /** + * The entirety of the SiteVnetInfo definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithSlot, DefinitionStages.WithCreate { + } + + /** + * Grouping of SiteVnetInfo definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a SiteVnetInfo definition. + */ + interface Blank extends WithSlot { + } + + /** + * The stage of the sitevnetinfo definition allowing to specify Slot. + */ + interface WithSlot { + /** + * Specifies resourceGroupName, name, 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 will add or update connections for the production slot + * @return the next definition stage + */ + WithCreate withExistingSlot(String resourceGroupName, String name, String slot); + } + + /** + * The stage of the sitevnetinfo definition allowing to specify CertBlob. + */ + interface WithCertBlob { + /** + * Specifies certBlob. + * @param certBlob A certificate file (.cer) blob containing the public key of the private key used to authenticate a + Point-To-Site VPN connection + * @return the next definition stage + */ + WithCreate withCertBlob(String certBlob); + } + + /** + * The stage of the sitevnetinfo definition allowing to specify DnsServers. + */ + interface WithDnsServers { + /** + * Specifies dnsServers. + * @param dnsServers DNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses + * @return the next definition stage + */ + WithCreate withDnsServers(String dnsServers); + } + + /** + * The stage of the sitevnetinfo definition allowing to specify IsSwift. + */ + interface WithIsSwift { + /** + * Specifies isSwift. + * @param isSwift Flag that is used to denote if this is VNET injection + * @return the next definition stage + */ + WithCreate withIsSwift(Boolean isSwift); + } + + /** + * The stage of the sitevnetinfo definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the sitevnetinfo definition allowing to specify VnetResourceId. + */ + interface WithVnetResourceId { + /** + * Specifies vnetResourceId. + * @param vnetResourceId The Virtual Network's resource ID + * @return the next definition stage + */ + WithCreate withVnetResourceId(String vnetResourceId); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithCertBlob, DefinitionStages.WithDnsServers, DefinitionStages.WithIsSwift, DefinitionStages.WithKind, DefinitionStages.WithVnetResourceId { + } + } + /** + * The template for a SiteVnetInfo update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithCertBlob, UpdateStages.WithDnsServers, UpdateStages.WithIsSwift, UpdateStages.WithKind, UpdateStages.WithVnetResourceId { + } + + /** + * Grouping of SiteVnetInfo update stages. + */ + interface UpdateStages { + /** + * The stage of the sitevnetinfo update allowing to specify CertBlob. + */ + interface WithCertBlob { + /** + * Specifies certBlob. + * @param certBlob A certificate file (.cer) blob containing the public key of the private key used to authenticate a + Point-To-Site VPN connection + * @return the next update stage + */ + Update withCertBlob(String certBlob); + } + + /** + * The stage of the sitevnetinfo update allowing to specify DnsServers. + */ + interface WithDnsServers { + /** + * Specifies dnsServers. + * @param dnsServers DNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses + * @return the next update stage + */ + Update withDnsServers(String dnsServers); + } + + /** + * The stage of the sitevnetinfo update allowing to specify IsSwift. + */ + interface WithIsSwift { + /** + * Specifies isSwift. + * @param isSwift Flag that is used to denote if this is VNET injection + * @return the next update stage + */ + Update withIsSwift(Boolean isSwift); + } + + /** + * The stage of the sitevnetinfo update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the sitevnetinfo update allowing to specify VnetResourceId. + */ + interface WithVnetResourceId { + /** + * Specifies vnetResourceId. + * @param vnetResourceId The Virtual Network's resource ID + * @return the next update stage + */ + Update withVnetResourceId(String vnetResourceId); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Sites.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Sites.java new file mode 100644 index 0000000000000..db61d23ce7a49 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Sites.java @@ -0,0 +1,745 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; +import org.joda.time.DateTime; +import java.util.UUID; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteInner; + +/** + * Type representing Sites. + */ +public interface Sites extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the availabilityState value. + */ + SiteAvailabilityState availabilityState(); + + /** + * @return the clientAffinityEnabled value. + */ + Boolean clientAffinityEnabled(); + + /** + * @return the clientCertEnabled value. + */ + Boolean clientCertEnabled(); + + /** + * @return the clientCertExclusionPaths value. + */ + String clientCertExclusionPaths(); + + /** + * @return the cloningInfo value. + */ + CloningInfo cloningInfo(); + + /** + * @return the containerSize value. + */ + Integer containerSize(); + + /** + * @return the dailyMemoryTimeQuota value. + */ + Integer dailyMemoryTimeQuota(); + + /** + * @return the defaultHostName value. + */ + String defaultHostName(); + + /** + * @return the enabled value. + */ + Boolean enabled(); + + /** + * @return the enabledHostNames value. + */ + List enabledHostNames(); + + /** + * @return the hostingEnvironmentProfile value. + */ + HostingEnvironmentProfile hostingEnvironmentProfile(); + + /** + * @return the hostNames value. + */ + List hostNames(); + + /** + * @return the hostNamesDisabled value. + */ + Boolean hostNamesDisabled(); + + /** + * @return the hostNameSslStates value. + */ + List hostNameSslStates(); + + /** + * @return the httpsOnly value. + */ + Boolean httpsOnly(); + + /** + * @return the hyperV value. + */ + Boolean hyperV(); + + /** + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * @return the inProgressOperationId value. + */ + UUID inProgressOperationId(); + + /** + * @return the isDefaultContainer value. + */ + Boolean isDefaultContainer(); + + /** + * @return the isXenon value. + */ + Boolean isXenon(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the lastModifiedTimeUtc value. + */ + DateTime lastModifiedTimeUtc(); + + /** + * @return the maxNumberOfWorkers value. + */ + Integer maxNumberOfWorkers(); + + /** + * @return the outboundIpAddresses value. + */ + String outboundIpAddresses(); + + /** + * @return the possibleOutboundIpAddresses value. + */ + String possibleOutboundIpAddresses(); + + /** + * @return the redundancyMode value. + */ + RedundancyMode redundancyMode(); + + /** + * @return the repositorySiteName value. + */ + String repositorySiteName(); + + /** + * @return the reserved value. + */ + Boolean reserved(); + + /** + * @return the resourceGroup value. + */ + String resourceGroup(); + + /** + * @return the scmSiteAlsoStopped value. + */ + Boolean scmSiteAlsoStopped(); + + /** + * @return the serverFarmId value. + */ + String serverFarmId(); + + /** + * @return the siteConfig value. + */ + SiteConfig siteConfig(); + + /** + * @return the slotSwapStatus value. + */ + SlotSwapStatus slotSwapStatus(); + + /** + * @return the state value. + */ + String state(); + + /** + * @return the suspendedTill value. + */ + DateTime suspendedTill(); + + /** + * @return the targetSwapSlot value. + */ + String targetSwapSlot(); + + /** + * @return the trafficManagerHostNames value. + */ + List trafficManagerHostNames(); + + /** + * @return the usageState value. + */ + UsageState usageState(); + + /** + * The entirety of the Sites definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of Sites definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Sites definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the Sites definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the sites definition allowing to specify ClientAffinityEnabled. + */ + interface WithClientAffinityEnabled { + /** + * Specifies clientAffinityEnabled. + * @param clientAffinityEnabled <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> + * @return the next definition stage + */ + WithCreate withClientAffinityEnabled(Boolean clientAffinityEnabled); + } + + /** + * The stage of the sites definition allowing to specify ClientCertEnabled. + */ + interface WithClientCertEnabled { + /** + * Specifies clientCertEnabled. + * @param clientCertEnabled <code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code> + * @return the next definition stage + */ + WithCreate withClientCertEnabled(Boolean clientCertEnabled); + } + + /** + * The stage of the sites definition allowing to specify ClientCertExclusionPaths. + */ + interface WithClientCertExclusionPaths { + /** + * Specifies clientCertExclusionPaths. + * @param clientCertExclusionPaths client certificate authentication comma-separated exclusion paths + * @return the next definition stage + */ + WithCreate withClientCertExclusionPaths(String clientCertExclusionPaths); + } + + /** + * The stage of the sites definition allowing to specify CloningInfo. + */ + interface WithCloningInfo { + /** + * Specifies cloningInfo. + * @param cloningInfo If specified during app creation, the app is cloned from a source app + * @return the next definition stage + */ + WithCreate withCloningInfo(CloningInfo cloningInfo); + } + + /** + * The stage of the sites definition allowing to specify ContainerSize. + */ + interface WithContainerSize { + /** + * Specifies containerSize. + * @param containerSize Size of the function container + * @return the next definition stage + */ + WithCreate withContainerSize(Integer containerSize); + } + + /** + * The stage of the sites definition allowing to specify DailyMemoryTimeQuota. + */ + interface WithDailyMemoryTimeQuota { + /** + * Specifies dailyMemoryTimeQuota. + * @param dailyMemoryTimeQuota Maximum allowed daily memory-time quota (applicable on dynamic apps only) + * @return the next definition stage + */ + WithCreate withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota); + } + + /** + * The stage of the sites definition allowing to specify Enabled. + */ + interface WithEnabled { + /** + * Specifies enabled. + * @param enabled <code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline) + * @return the next definition stage + */ + WithCreate withEnabled(Boolean enabled); + } + + /** + * The stage of the sites definition allowing to specify HostingEnvironmentProfile. + */ + interface WithHostingEnvironmentProfile { + /** + * Specifies hostingEnvironmentProfile. + * @param hostingEnvironmentProfile App Service Environment to use for the app + * @return the next definition stage + */ + WithCreate withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile); + } + + /** + * The stage of the sites definition allowing to specify HostNamesDisabled. + */ + interface WithHostNamesDisabled { + /** + * Specifies hostNamesDisabled. + * @param hostNamesDisabled <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 + * @return the next definition stage + */ + WithCreate withHostNamesDisabled(Boolean hostNamesDisabled); + } + + /** + * The stage of the sites definition allowing to specify HostNameSslStates. + */ + interface WithHostNameSslStates { + /** + * Specifies hostNameSslStates. + * @param hostNameSslStates Hostname SSL states are used to manage the SSL bindings for app's hostnames + * @return the next definition stage + */ + WithCreate withHostNameSslStates(List hostNameSslStates); + } + + /** + * The stage of the sites definition allowing to specify HttpsOnly. + */ + interface WithHttpsOnly { + /** + * Specifies httpsOnly. + * @param httpsOnly HttpsOnly: configures a web site to accept only https requests. Issues redirect for + http requests + * @return the next definition stage + */ + WithCreate withHttpsOnly(Boolean httpsOnly); + } + + /** + * The stage of the sites definition allowing to specify HyperV. + */ + interface WithHyperV { + /** + * Specifies hyperV. + * @param hyperV Hyper-V sandbox + * @return the next definition stage + */ + WithCreate withHyperV(Boolean hyperV); + } + + /** + * The stage of the sites definition allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity the identity parameter value + * @return the next definition stage + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the sites definition allowing to specify IsXenon. + */ + interface WithIsXenon { + /** + * Specifies isXenon. + * @param isXenon Obsolete: Hyper-V sandbox + * @return the next definition stage + */ + WithCreate withIsXenon(Boolean isXenon); + } + + /** + * The stage of the sites definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the sites definition allowing to specify RedundancyMode. + */ + interface WithRedundancyMode { + /** + * Specifies redundancyMode. + * @param redundancyMode Site redundancy mode. Possible values include: 'None', 'Manual', 'Failover', 'ActiveActive', 'GeoRedundant' + * @return the next definition stage + */ + WithCreate withRedundancyMode(RedundancyMode redundancyMode); + } + + /** + * The stage of the sites definition allowing to specify Reserved. + */ + interface WithReserved { + /** + * Specifies reserved. + * @param reserved <code>true</code> if reserved; otherwise, <code>false</code> + * @return the next definition stage + */ + WithCreate withReserved(Boolean reserved); + } + + /** + * The stage of the sites definition allowing to specify ScmSiteAlsoStopped. + */ + interface WithScmSiteAlsoStopped { + /** + * Specifies scmSiteAlsoStopped. + * @param scmSiteAlsoStopped <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code> + * @return the next definition stage + */ + WithCreate withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped); + } + + /** + * The stage of the sites definition allowing to specify ServerFarmId. + */ + interface WithServerFarmId { + /** + * Specifies serverFarmId. + * @param serverFarmId Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}" + * @return the next definition stage + */ + WithCreate withServerFarmId(String serverFarmId); + } + + /** + * The stage of the sites definition allowing to specify SiteConfig. + */ + interface WithSiteConfig { + /** + * Specifies siteConfig. + * @param siteConfig Configuration of the app + * @return the next definition stage + */ + WithCreate withSiteConfig(SiteConfig siteConfig); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithClientAffinityEnabled, DefinitionStages.WithClientCertEnabled, DefinitionStages.WithClientCertExclusionPaths, DefinitionStages.WithCloningInfo, DefinitionStages.WithContainerSize, DefinitionStages.WithDailyMemoryTimeQuota, DefinitionStages.WithEnabled, DefinitionStages.WithHostingEnvironmentProfile, DefinitionStages.WithHostNamesDisabled, DefinitionStages.WithHostNameSslStates, DefinitionStages.WithHttpsOnly, DefinitionStages.WithHyperV, DefinitionStages.WithIdentity, DefinitionStages.WithIsXenon, DefinitionStages.WithKind, DefinitionStages.WithRedundancyMode, DefinitionStages.WithReserved, DefinitionStages.WithScmSiteAlsoStopped, DefinitionStages.WithServerFarmId, DefinitionStages.WithSiteConfig { + } + } + /** + * The template for a Sites update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithClientAffinityEnabled, UpdateStages.WithClientCertEnabled, UpdateStages.WithClientCertExclusionPaths, UpdateStages.WithCloningInfo, UpdateStages.WithContainerSize, UpdateStages.WithDailyMemoryTimeQuota, UpdateStages.WithEnabled, UpdateStages.WithHostingEnvironmentProfile, UpdateStages.WithHostNamesDisabled, UpdateStages.WithHostNameSslStates, UpdateStages.WithHttpsOnly, UpdateStages.WithHyperV, UpdateStages.WithIdentity, UpdateStages.WithIsXenon, UpdateStages.WithKind, UpdateStages.WithRedundancyMode, UpdateStages.WithReserved, UpdateStages.WithScmSiteAlsoStopped, UpdateStages.WithServerFarmId, UpdateStages.WithSiteConfig { + } + + /** + * Grouping of Sites update stages. + */ + interface UpdateStages { + /** + * The stage of the sites update allowing to specify ClientAffinityEnabled. + */ + interface WithClientAffinityEnabled { + /** + * Specifies clientAffinityEnabled. + * @param clientAffinityEnabled <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> + * @return the next update stage + */ + Update withClientAffinityEnabled(Boolean clientAffinityEnabled); + } + + /** + * The stage of the sites update allowing to specify ClientCertEnabled. + */ + interface WithClientCertEnabled { + /** + * Specifies clientCertEnabled. + * @param clientCertEnabled <code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code> + * @return the next update stage + */ + Update withClientCertEnabled(Boolean clientCertEnabled); + } + + /** + * The stage of the sites update allowing to specify ClientCertExclusionPaths. + */ + interface WithClientCertExclusionPaths { + /** + * Specifies clientCertExclusionPaths. + * @param clientCertExclusionPaths client certificate authentication comma-separated exclusion paths + * @return the next update stage + */ + Update withClientCertExclusionPaths(String clientCertExclusionPaths); + } + + /** + * The stage of the sites update allowing to specify CloningInfo. + */ + interface WithCloningInfo { + /** + * Specifies cloningInfo. + * @param cloningInfo If specified during app creation, the app is cloned from a source app + * @return the next update stage + */ + Update withCloningInfo(CloningInfo cloningInfo); + } + + /** + * The stage of the sites update allowing to specify ContainerSize. + */ + interface WithContainerSize { + /** + * Specifies containerSize. + * @param containerSize Size of the function container + * @return the next update stage + */ + Update withContainerSize(Integer containerSize); + } + + /** + * The stage of the sites update allowing to specify DailyMemoryTimeQuota. + */ + interface WithDailyMemoryTimeQuota { + /** + * Specifies dailyMemoryTimeQuota. + * @param dailyMemoryTimeQuota Maximum allowed daily memory-time quota (applicable on dynamic apps only) + * @return the next update stage + */ + Update withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota); + } + + /** + * The stage of the sites update allowing to specify Enabled. + */ + interface WithEnabled { + /** + * Specifies enabled. + * @param enabled <code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline) + * @return the next update stage + */ + Update withEnabled(Boolean enabled); + } + + /** + * The stage of the sites update allowing to specify HostingEnvironmentProfile. + */ + interface WithHostingEnvironmentProfile { + /** + * Specifies hostingEnvironmentProfile. + * @param hostingEnvironmentProfile App Service Environment to use for the app + * @return the next update stage + */ + Update withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile); + } + + /** + * The stage of the sites update allowing to specify HostNamesDisabled. + */ + interface WithHostNamesDisabled { + /** + * Specifies hostNamesDisabled. + * @param hostNamesDisabled <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 + * @return the next update stage + */ + Update withHostNamesDisabled(Boolean hostNamesDisabled); + } + + /** + * The stage of the sites update allowing to specify HostNameSslStates. + */ + interface WithHostNameSslStates { + /** + * Specifies hostNameSslStates. + * @param hostNameSslStates Hostname SSL states are used to manage the SSL bindings for app's hostnames + * @return the next update stage + */ + Update withHostNameSslStates(List hostNameSslStates); + } + + /** + * The stage of the sites update allowing to specify HttpsOnly. + */ + interface WithHttpsOnly { + /** + * Specifies httpsOnly. + * @param httpsOnly HttpsOnly: configures a web site to accept only https requests. Issues redirect for + http requests + * @return the next update stage + */ + Update withHttpsOnly(Boolean httpsOnly); + } + + /** + * The stage of the sites update allowing to specify HyperV. + */ + interface WithHyperV { + /** + * Specifies hyperV. + * @param hyperV Hyper-V sandbox + * @return the next update stage + */ + Update withHyperV(Boolean hyperV); + } + + /** + * The stage of the sites update allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity the identity parameter value + * @return the next update stage + */ + Update withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the sites update allowing to specify IsXenon. + */ + interface WithIsXenon { + /** + * Specifies isXenon. + * @param isXenon Obsolete: Hyper-V sandbox + * @return the next update stage + */ + Update withIsXenon(Boolean isXenon); + } + + /** + * The stage of the sites update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the sites update allowing to specify RedundancyMode. + */ + interface WithRedundancyMode { + /** + * Specifies redundancyMode. + * @param redundancyMode Site redundancy mode. Possible values include: 'None', 'Manual', 'Failover', 'ActiveActive', 'GeoRedundant' + * @return the next update stage + */ + Update withRedundancyMode(RedundancyMode redundancyMode); + } + + /** + * The stage of the sites update allowing to specify Reserved. + */ + interface WithReserved { + /** + * Specifies reserved. + * @param reserved <code>true</code> if reserved; otherwise, <code>false</code> + * @return the next update stage + */ + Update withReserved(Boolean reserved); + } + + /** + * The stage of the sites update allowing to specify ScmSiteAlsoStopped. + */ + interface WithScmSiteAlsoStopped { + /** + * Specifies scmSiteAlsoStopped. + * @param scmSiteAlsoStopped <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code> + * @return the next update stage + */ + Update withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped); + } + + /** + * The stage of the sites update allowing to specify ServerFarmId. + */ + interface WithServerFarmId { + /** + * Specifies serverFarmId. + * @param serverFarmId Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}" + * @return the next update stage + */ + Update withServerFarmId(String serverFarmId); + } + + /** + * The stage of the sites update allowing to specify SiteConfig. + */ + interface WithSiteConfig { + /** + * Specifies siteConfig. + * @param siteConfig Configuration of the app + * @return the next update stage + */ + Update withSiteConfig(SiteConfig siteConfig); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SkuCapacity.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SkuCapacity.java new file mode 100644 index 0000000000000..eb552bd773c7f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 minimum number of workers for this App Service plan SKU. + * + * @return the minimum value + */ + public Integer minimum() { + return this.minimum; + } + + /** + * Set minimum number of workers for this App Service plan SKU. + * + * @param minimum the minimum value to set + * @return the SkuCapacity object itself. + */ + public SkuCapacity withMinimum(Integer minimum) { + this.minimum = minimum; + return this; + } + + /** + * Get maximum number of workers for this App Service plan SKU. + * + * @return the maximum value + */ + public Integer maximum() { + return this.maximum; + } + + /** + * Set maximum number of workers for this App Service plan SKU. + * + * @param maximum the maximum value to set + * @return the SkuCapacity object itself. + */ + public SkuCapacity withMaximum(Integer maximum) { + this.maximum = maximum; + return this; + } + + /** + * Get default number of workers for this App Service plan SKU. + * + * @return the defaultProperty value + */ + public Integer defaultProperty() { + return this.defaultProperty; + } + + /** + * Set default number of workers for this App Service plan SKU. + * + * @param defaultProperty the defaultProperty value to set + * @return the SkuCapacity object itself. + */ + public SkuCapacity withDefaultProperty(Integer defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Get available scale configurations for an App Service plan. + * + * @return the scaleType value + */ + public String scaleType() { + return this.scaleType; + } + + /** + * Set available scale configurations for an App Service plan. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SkuDescription.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SkuDescription.java new file mode 100644 index 0000000000000..a57b7b7bf8027 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SkuDescription.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.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; + + /** + * 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 name of the resource SKU. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the resource SKU. + * + * @param name the name value to set + * @return the SkuDescription object itself. + */ + public SkuDescription withName(String name) { + this.name = name; + return this; + } + + /** + * Get service tier of the resource SKU. + * + * @return the tier value + */ + public String tier() { + return this.tier; + } + + /** + * Set service tier of the resource SKU. + * + * @param tier the tier value to set + * @return the SkuDescription object itself. + */ + public SkuDescription withTier(String tier) { + this.tier = tier; + return this; + } + + /** + * Get size specifier of the resource SKU. + * + * @return the size value + */ + public String size() { + return this.size; + } + + /** + * Set size specifier of the resource SKU. + * + * @param size the size value to set + * @return the SkuDescription object itself. + */ + public SkuDescription withSize(String size) { + this.size = size; + return this; + } + + /** + * Get family code of the resource SKU. + * + * @return the family value + */ + public String family() { + return this.family; + } + + /** + * Set family code of the resource SKU. + * + * @param family the family value to set + * @return the SkuDescription object itself. + */ + public SkuDescription withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get current number of instances assigned to the resource. + * + * @return the capacity value + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set current number of instances assigned to the resource. + * + * @param capacity the capacity value to set + * @return the SkuDescription object itself. + */ + public SkuDescription withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get min, max, and default scale values of the SKU. + * + * @return the skuCapacity value + */ + public SkuCapacity skuCapacity() { + return this.skuCapacity; + } + + /** + * Set min, max, and default scale values of the SKU. + * + * @param skuCapacity the skuCapacity value to set + * @return the SkuDescription object itself. + */ + public SkuDescription withSkuCapacity(SkuCapacity skuCapacity) { + this.skuCapacity = skuCapacity; + return this; + } + + /** + * Get locations of the SKU. + * + * @return the locations value + */ + public List locations() { + return this.locations; + } + + /** + * Set locations of the SKU. + * + * @param locations the locations value to set + * @return the SkuDescription object itself. + */ + public SkuDescription withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Get capabilities of the SKU, e.g., is traffic manager enabled?. + * + * @return the capabilities value + */ + public List capabilities() { + return this.capabilities; + } + + /** + * Set capabilities of the SKU, e.g., is traffic manager enabled?. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SkuInfo.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SkuInfo.java new file mode 100644 index 0000000000000..f659c0cda49c2 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SkuInfo.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SkuInfoInner; + +/** + * Type representing SkuInfo. + */ +public interface SkuInfo extends HasInner, HasManager { + /** + * @return the capacity value. + */ + SkuCapacity capacity(); + + /** + * @return the resourceType value. + */ + String resourceType(); + + /** + * @return the sku value. + */ + SkuDescription sku(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SkuName.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SkuName.java new file mode 100644 index 0000000000000..89a4622343367 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SkuName.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.appservice.v2019_08_01; + +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 Dynamic for SkuName. */ + public static final SkuName DYNAMIC = fromString("Dynamic"); + + /** Static value Isolated for SkuName. */ + public static final SkuName ISOLATED = fromString("Isolated"); + + /** Static value PremiumV2 for SkuName. */ + public static final SkuName PREMIUM_V2 = fromString("PremiumV2"); + + /** Static value ElasticPremium for SkuName. */ + public static final SkuName ELASTIC_PREMIUM = fromString("ElasticPremium"); + + /** Static value ElasticIsolated for SkuName. */ + public static final SkuName ELASTIC_ISOLATED = fromString("ElasticIsolated"); + + /** + * 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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SlotConfigNamesResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SlotConfigNamesResource.java new file mode 100644 index 0000000000000..47fa02ec53d47 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SlotConfigNamesResource.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SlotConfigNamesResourceInner; +import java.util.List; + +/** + * Type representing SlotConfigNamesResource. + */ +public interface SlotConfigNamesResource extends HasInner, HasManager { + /** + * @return the appSettingNames value. + */ + List appSettingNames(); + + /** + * @return the azureStorageConfigNames value. + */ + List azureStorageConfigNames(); + + /** + * @return the connectionStringNames value. + */ + List connectionStringNames(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SlotDifference.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SlotDifference.java new file mode 100644 index 0000000000000..f38b4d74ab7c2 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SlotDifference.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SlotDifferenceInner; + +/** + * Type representing SlotDifference. + */ +public interface SlotDifference extends HasInner, HasManager { + /** + * @return the description value. + */ + String description(); + + /** + * @return the diffRule value. + */ + String diffRule(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the level value. + */ + String level(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the settingName value. + */ + String settingName(); + + /** + * @return the settingType value. + */ + String settingType(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the valueInCurrentSlot value. + */ + String valueInCurrentSlot(); + + /** + * @return the valueInTargetSlot value. + */ + String valueInTargetSlot(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SlotSwapStatus.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SlotSwapStatus.java new file mode 100644 index 0000000000000..0bc65974a8b11 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The status of the last successful 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 time the last successful slot swap completed. + * + * @return the timestampUtc value + */ + public DateTime timestampUtc() { + return this.timestampUtc; + } + + /** + * Get the source slot of the last swap operation. + * + * @return the sourceSlotName value + */ + public String sourceSlotName() { + return this.sourceSlotName; + } + + /** + * Get the destination slot of the last swap operation. + * + * @return the destinationSlotName value + */ + public String destinationSlotName() { + return this.destinationSlotName; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Slots.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Slots.java new file mode 100644 index 0000000000000..69742213be9bf --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Slots.java @@ -0,0 +1,800 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; +import org.joda.time.DateTime; +import java.util.UUID; +import java.util.Map; + +/** + * Type representing Slots. + */ +public interface Slots extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the availabilityState value. + */ + SiteAvailabilityState availabilityState(); + + /** + * @return the clientAffinityEnabled value. + */ + Boolean clientAffinityEnabled(); + + /** + * @return the clientCertEnabled value. + */ + Boolean clientCertEnabled(); + + /** + * @return the clientCertExclusionPaths value. + */ + String clientCertExclusionPaths(); + + /** + * @return the cloningInfo value. + */ + CloningInfo cloningInfo(); + + /** + * @return the containerSize value. + */ + Integer containerSize(); + + /** + * @return the dailyMemoryTimeQuota value. + */ + Integer dailyMemoryTimeQuota(); + + /** + * @return the defaultHostName value. + */ + String defaultHostName(); + + /** + * @return the enabled value. + */ + Boolean enabled(); + + /** + * @return the enabledHostNames value. + */ + List enabledHostNames(); + + /** + * @return the hostingEnvironmentProfile value. + */ + HostingEnvironmentProfile hostingEnvironmentProfile(); + + /** + * @return the hostNames value. + */ + List hostNames(); + + /** + * @return the hostNamesDisabled value. + */ + Boolean hostNamesDisabled(); + + /** + * @return the hostNameSslStates value. + */ + List hostNameSslStates(); + + /** + * @return the httpsOnly value. + */ + Boolean httpsOnly(); + + /** + * @return the hyperV value. + */ + Boolean hyperV(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * @return the inProgressOperationId value. + */ + UUID inProgressOperationId(); + + /** + * @return the isDefaultContainer value. + */ + Boolean isDefaultContainer(); + + /** + * @return the isXenon value. + */ + Boolean isXenon(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the lastModifiedTimeUtc value. + */ + DateTime lastModifiedTimeUtc(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the maxNumberOfWorkers value. + */ + Integer maxNumberOfWorkers(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the outboundIpAddresses value. + */ + String outboundIpAddresses(); + + /** + * @return the possibleOutboundIpAddresses value. + */ + String possibleOutboundIpAddresses(); + + /** + * @return the redundancyMode value. + */ + RedundancyMode redundancyMode(); + + /** + * @return the repositorySiteName value. + */ + String repositorySiteName(); + + /** + * @return the reserved value. + */ + Boolean reserved(); + + /** + * @return the resourceGroup value. + */ + String resourceGroup(); + + /** + * @return the scmSiteAlsoStopped value. + */ + Boolean scmSiteAlsoStopped(); + + /** + * @return the serverFarmId value. + */ + String serverFarmId(); + + /** + * @return the siteConfig value. + */ + SiteConfig siteConfig(); + + /** + * @return the slotSwapStatus value. + */ + SlotSwapStatus slotSwapStatus(); + + /** + * @return the state value. + */ + String state(); + + /** + * @return the suspendedTill value. + */ + DateTime suspendedTill(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the targetSwapSlot value. + */ + String targetSwapSlot(); + + /** + * @return the trafficManagerHostNames value. + */ + List trafficManagerHostNames(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the usageState value. + */ + UsageState usageState(); + + /** + * The entirety of the Slots definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithSite, DefinitionStages.WithLocation, DefinitionStages.WithCreate { + } + + /** + * Grouping of Slots definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a Slots definition. + */ + interface Blank extends WithSite { + } + + /** + * The stage of the slots definition allowing to specify Site. + */ + interface WithSite { + /** + * Specifies resourceGroupName, name. + * @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 + * @return the next definition stage + */ + WithLocation withExistingSite(String resourceGroupName, String name); + } + + /** + * The stage of the slots definition allowing to specify Location. + */ + interface WithLocation { + /** + * Specifies location. + * @param location Resource Location + * @return the next definition stage + */ + WithCreate withLocation(String location); + } + + /** + * The stage of the slots definition allowing to specify ClientAffinityEnabled. + */ + interface WithClientAffinityEnabled { + /** + * Specifies clientAffinityEnabled. + * @param clientAffinityEnabled <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> + * @return the next definition stage + */ + WithCreate withClientAffinityEnabled(Boolean clientAffinityEnabled); + } + + /** + * The stage of the slots definition allowing to specify ClientCertEnabled. + */ + interface WithClientCertEnabled { + /** + * Specifies clientCertEnabled. + * @param clientCertEnabled <code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code> + * @return the next definition stage + */ + WithCreate withClientCertEnabled(Boolean clientCertEnabled); + } + + /** + * The stage of the slots definition allowing to specify ClientCertExclusionPaths. + */ + interface WithClientCertExclusionPaths { + /** + * Specifies clientCertExclusionPaths. + * @param clientCertExclusionPaths client certificate authentication comma-separated exclusion paths + * @return the next definition stage + */ + WithCreate withClientCertExclusionPaths(String clientCertExclusionPaths); + } + + /** + * The stage of the slots definition allowing to specify CloningInfo. + */ + interface WithCloningInfo { + /** + * Specifies cloningInfo. + * @param cloningInfo If specified during app creation, the app is cloned from a source app + * @return the next definition stage + */ + WithCreate withCloningInfo(CloningInfo cloningInfo); + } + + /** + * The stage of the slots definition allowing to specify ContainerSize. + */ + interface WithContainerSize { + /** + * Specifies containerSize. + * @param containerSize Size of the function container + * @return the next definition stage + */ + WithCreate withContainerSize(Integer containerSize); + } + + /** + * The stage of the slots definition allowing to specify DailyMemoryTimeQuota. + */ + interface WithDailyMemoryTimeQuota { + /** + * Specifies dailyMemoryTimeQuota. + * @param dailyMemoryTimeQuota Maximum allowed daily memory-time quota (applicable on dynamic apps only) + * @return the next definition stage + */ + WithCreate withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota); + } + + /** + * The stage of the slots definition allowing to specify Enabled. + */ + interface WithEnabled { + /** + * Specifies enabled. + * @param enabled <code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline) + * @return the next definition stage + */ + WithCreate withEnabled(Boolean enabled); + } + + /** + * The stage of the slots definition allowing to specify HostingEnvironmentProfile. + */ + interface WithHostingEnvironmentProfile { + /** + * Specifies hostingEnvironmentProfile. + * @param hostingEnvironmentProfile App Service Environment to use for the app + * @return the next definition stage + */ + WithCreate withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile); + } + + /** + * The stage of the slots definition allowing to specify HostNamesDisabled. + */ + interface WithHostNamesDisabled { + /** + * Specifies hostNamesDisabled. + * @param hostNamesDisabled <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 + * @return the next definition stage + */ + WithCreate withHostNamesDisabled(Boolean hostNamesDisabled); + } + + /** + * The stage of the slots definition allowing to specify HostNameSslStates. + */ + interface WithHostNameSslStates { + /** + * Specifies hostNameSslStates. + * @param hostNameSslStates Hostname SSL states are used to manage the SSL bindings for app's hostnames + * @return the next definition stage + */ + WithCreate withHostNameSslStates(List hostNameSslStates); + } + + /** + * The stage of the slots definition allowing to specify HttpsOnly. + */ + interface WithHttpsOnly { + /** + * Specifies httpsOnly. + * @param httpsOnly HttpsOnly: configures a web site to accept only https requests. Issues redirect for + http requests + * @return the next definition stage + */ + WithCreate withHttpsOnly(Boolean httpsOnly); + } + + /** + * The stage of the slots definition allowing to specify HyperV. + */ + interface WithHyperV { + /** + * Specifies hyperV. + * @param hyperV Hyper-V sandbox + * @return the next definition stage + */ + WithCreate withHyperV(Boolean hyperV); + } + + /** + * The stage of the slots definition allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity the identity parameter value + * @return the next definition stage + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the slots definition allowing to specify IsXenon. + */ + interface WithIsXenon { + /** + * Specifies isXenon. + * @param isXenon Obsolete: Hyper-V sandbox + * @return the next definition stage + */ + WithCreate withIsXenon(Boolean isXenon); + } + + /** + * The stage of the slots definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the slots definition allowing to specify RedundancyMode. + */ + interface WithRedundancyMode { + /** + * Specifies redundancyMode. + * @param redundancyMode Site redundancy mode. Possible values include: 'None', 'Manual', 'Failover', 'ActiveActive', 'GeoRedundant' + * @return the next definition stage + */ + WithCreate withRedundancyMode(RedundancyMode redundancyMode); + } + + /** + * The stage of the slots definition allowing to specify Reserved. + */ + interface WithReserved { + /** + * Specifies reserved. + * @param reserved <code>true</code> if reserved; otherwise, <code>false</code> + * @return the next definition stage + */ + WithCreate withReserved(Boolean reserved); + } + + /** + * The stage of the slots definition allowing to specify ScmSiteAlsoStopped. + */ + interface WithScmSiteAlsoStopped { + /** + * Specifies scmSiteAlsoStopped. + * @param scmSiteAlsoStopped <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code> + * @return the next definition stage + */ + WithCreate withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped); + } + + /** + * The stage of the slots definition allowing to specify ServerFarmId. + */ + interface WithServerFarmId { + /** + * Specifies serverFarmId. + * @param serverFarmId Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}" + * @return the next definition stage + */ + WithCreate withServerFarmId(String serverFarmId); + } + + /** + * The stage of the slots definition allowing to specify SiteConfig. + */ + interface WithSiteConfig { + /** + * Specifies siteConfig. + * @param siteConfig Configuration of the app + * @return the next definition stage + */ + WithCreate withSiteConfig(SiteConfig siteConfig); + } + + /** + * The stage of the slots definition allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags Resource tags + * @return the next definition stage + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithClientAffinityEnabled, DefinitionStages.WithClientCertEnabled, DefinitionStages.WithClientCertExclusionPaths, DefinitionStages.WithCloningInfo, DefinitionStages.WithContainerSize, DefinitionStages.WithDailyMemoryTimeQuota, DefinitionStages.WithEnabled, DefinitionStages.WithHostingEnvironmentProfile, DefinitionStages.WithHostNamesDisabled, DefinitionStages.WithHostNameSslStates, DefinitionStages.WithHttpsOnly, DefinitionStages.WithHyperV, DefinitionStages.WithIdentity, DefinitionStages.WithIsXenon, DefinitionStages.WithKind, DefinitionStages.WithRedundancyMode, DefinitionStages.WithReserved, DefinitionStages.WithScmSiteAlsoStopped, DefinitionStages.WithServerFarmId, DefinitionStages.WithSiteConfig, DefinitionStages.WithTags { + } + } + /** + * The template for a Slots update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithClientAffinityEnabled, UpdateStages.WithClientCertEnabled, UpdateStages.WithClientCertExclusionPaths, UpdateStages.WithCloningInfo, UpdateStages.WithContainerSize, UpdateStages.WithDailyMemoryTimeQuota, UpdateStages.WithEnabled, UpdateStages.WithHostingEnvironmentProfile, UpdateStages.WithHostNamesDisabled, UpdateStages.WithHostNameSslStates, UpdateStages.WithHttpsOnly, UpdateStages.WithHyperV, UpdateStages.WithIdentity, UpdateStages.WithIsXenon, UpdateStages.WithKind, UpdateStages.WithRedundancyMode, UpdateStages.WithReserved, UpdateStages.WithScmSiteAlsoStopped, UpdateStages.WithServerFarmId, UpdateStages.WithSiteConfig { + } + + /** + * Grouping of Slots update stages. + */ + interface UpdateStages { + /** + * The stage of the slots update allowing to specify ClientAffinityEnabled. + */ + interface WithClientAffinityEnabled { + /** + * Specifies clientAffinityEnabled. + * @param clientAffinityEnabled <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> + * @return the next update stage + */ + Update withClientAffinityEnabled(Boolean clientAffinityEnabled); + } + + /** + * The stage of the slots update allowing to specify ClientCertEnabled. + */ + interface WithClientCertEnabled { + /** + * Specifies clientCertEnabled. + * @param clientCertEnabled <code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code> + * @return the next update stage + */ + Update withClientCertEnabled(Boolean clientCertEnabled); + } + + /** + * The stage of the slots update allowing to specify ClientCertExclusionPaths. + */ + interface WithClientCertExclusionPaths { + /** + * Specifies clientCertExclusionPaths. + * @param clientCertExclusionPaths client certificate authentication comma-separated exclusion paths + * @return the next update stage + */ + Update withClientCertExclusionPaths(String clientCertExclusionPaths); + } + + /** + * The stage of the slots update allowing to specify CloningInfo. + */ + interface WithCloningInfo { + /** + * Specifies cloningInfo. + * @param cloningInfo If specified during app creation, the app is cloned from a source app + * @return the next update stage + */ + Update withCloningInfo(CloningInfo cloningInfo); + } + + /** + * The stage of the slots update allowing to specify ContainerSize. + */ + interface WithContainerSize { + /** + * Specifies containerSize. + * @param containerSize Size of the function container + * @return the next update stage + */ + Update withContainerSize(Integer containerSize); + } + + /** + * The stage of the slots update allowing to specify DailyMemoryTimeQuota. + */ + interface WithDailyMemoryTimeQuota { + /** + * Specifies dailyMemoryTimeQuota. + * @param dailyMemoryTimeQuota Maximum allowed daily memory-time quota (applicable on dynamic apps only) + * @return the next update stage + */ + Update withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota); + } + + /** + * The stage of the slots update allowing to specify Enabled. + */ + interface WithEnabled { + /** + * Specifies enabled. + * @param enabled <code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline) + * @return the next update stage + */ + Update withEnabled(Boolean enabled); + } + + /** + * The stage of the slots update allowing to specify HostingEnvironmentProfile. + */ + interface WithHostingEnvironmentProfile { + /** + * Specifies hostingEnvironmentProfile. + * @param hostingEnvironmentProfile App Service Environment to use for the app + * @return the next update stage + */ + Update withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile); + } + + /** + * The stage of the slots update allowing to specify HostNamesDisabled. + */ + interface WithHostNamesDisabled { + /** + * Specifies hostNamesDisabled. + * @param hostNamesDisabled <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 + * @return the next update stage + */ + Update withHostNamesDisabled(Boolean hostNamesDisabled); + } + + /** + * The stage of the slots update allowing to specify HostNameSslStates. + */ + interface WithHostNameSslStates { + /** + * Specifies hostNameSslStates. + * @param hostNameSslStates Hostname SSL states are used to manage the SSL bindings for app's hostnames + * @return the next update stage + */ + Update withHostNameSslStates(List hostNameSslStates); + } + + /** + * The stage of the slots update allowing to specify HttpsOnly. + */ + interface WithHttpsOnly { + /** + * Specifies httpsOnly. + * @param httpsOnly HttpsOnly: configures a web site to accept only https requests. Issues redirect for + http requests + * @return the next update stage + */ + Update withHttpsOnly(Boolean httpsOnly); + } + + /** + * The stage of the slots update allowing to specify HyperV. + */ + interface WithHyperV { + /** + * Specifies hyperV. + * @param hyperV Hyper-V sandbox + * @return the next update stage + */ + Update withHyperV(Boolean hyperV); + } + + /** + * The stage of the slots update allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity the identity parameter value + * @return the next update stage + */ + Update withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the slots update allowing to specify IsXenon. + */ + interface WithIsXenon { + /** + * Specifies isXenon. + * @param isXenon Obsolete: Hyper-V sandbox + * @return the next update stage + */ + Update withIsXenon(Boolean isXenon); + } + + /** + * The stage of the slots update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the slots update allowing to specify RedundancyMode. + */ + interface WithRedundancyMode { + /** + * Specifies redundancyMode. + * @param redundancyMode Site redundancy mode. Possible values include: 'None', 'Manual', 'Failover', 'ActiveActive', 'GeoRedundant' + * @return the next update stage + */ + Update withRedundancyMode(RedundancyMode redundancyMode); + } + + /** + * The stage of the slots update allowing to specify Reserved. + */ + interface WithReserved { + /** + * Specifies reserved. + * @param reserved <code>true</code> if reserved; otherwise, <code>false</code> + * @return the next update stage + */ + Update withReserved(Boolean reserved); + } + + /** + * The stage of the slots update allowing to specify ScmSiteAlsoStopped. + */ + interface WithScmSiteAlsoStopped { + /** + * Specifies scmSiteAlsoStopped. + * @param scmSiteAlsoStopped <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code> + * @return the next update stage + */ + Update withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped); + } + + /** + * The stage of the slots update allowing to specify ServerFarmId. + */ + interface WithServerFarmId { + /** + * Specifies serverFarmId. + * @param serverFarmId Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}" + * @return the next update stage + */ + Update withServerFarmId(String serverFarmId); + } + + /** + * The stage of the slots update allowing to specify SiteConfig. + */ + interface WithSiteConfig { + /** + * Specifies siteConfig. + * @param siteConfig Configuration of the app + * @return the next update stage + */ + Update withSiteConfig(SiteConfig siteConfig); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SlowRequestsBasedTrigger.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SlowRequestsBasedTrigger.java new file mode 100644 index 0000000000000..ed5695d0d0145 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 time taken. + * + * @return the timeTaken value + */ + public String timeTaken() { + return this.timeTaken; + } + + /** + * Set time taken. + * + * @param timeTaken the timeTaken value to set + * @return the SlowRequestsBasedTrigger object itself. + */ + public SlowRequestsBasedTrigger withTimeTaken(String timeTaken) { + this.timeTaken = timeTaken; + return this; + } + + /** + * Get request Count. + * + * @return the count value + */ + public Integer count() { + return this.count; + } + + /** + * Set request Count. + * + * @param count the count value to set + * @return the SlowRequestsBasedTrigger object itself. + */ + public SlowRequestsBasedTrigger withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get time interval. + * + * @return the timeInterval value + */ + public String timeInterval() { + return this.timeInterval; + } + + /** + * Set time interval. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Snapshot.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Snapshot.java new file mode 100644 index 0000000000000..2655f84cac728 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Snapshot.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SnapshotInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing Snapshot. + */ +public interface Snapshot extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the time value. + */ + String time(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SnapshotRecoverySource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SnapshotRecoverySource.java new file mode 100644 index 0000000000000..e51720a0d8aa9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SnapshotRecoverySource.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifies the web app that snapshot contents will be retrieved from. + */ +public class SnapshotRecoverySource { + /** + * Geographical location of the source web app, e.g. SouthEastAsia, + * SouthCentralUS. + */ + @JsonProperty(value = "location") + private String location; + + /** + * ARM resource ID of the source 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 geographical location of the source web app, e.g. SouthEastAsia, SouthCentralUS. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set geographical location of the source web app, e.g. SouthEastAsia, SouthCentralUS. + * + * @param location the location value to set + * @return the SnapshotRecoverySource object itself. + */ + public SnapshotRecoverySource withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get aRM resource ID of the source 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. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set aRM resource ID of the source 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. + * + * @param id the id value to set + * @return the SnapshotRecoverySource object itself. + */ + public SnapshotRecoverySource withId(String id) { + this.id = id; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SnapshotRestoreRequest.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SnapshotRestoreRequest.java new file mode 100644 index 0000000000000..1bc3603354da0 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SnapshotRestoreRequest.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Details about app recovery operation. + */ +@JsonFlatten +public class SnapshotRestoreRequest extends ProxyOnlyResource { + /** + * Point in time in which the app restore should be done, formatted as a + * DateTime string. + */ + @JsonProperty(value = "properties.snapshotTime") + private String snapshotTime; + + /** + * Optional. Specifies the web app that snapshot contents will be retrieved + * from. + * If empty, the targeted web app will be used as the source. + */ + @JsonProperty(value = "properties.recoverySource") + private SnapshotRecoverySource recoverySource; + + /** + * If <code>true</code> the restore 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; + + /** + * If true, the snapshot is retrieved from DRSecondary endpoint. + */ + @JsonProperty(value = "properties.useDRSecondary") + private Boolean useDRSecondary; + + /** + * Get point in time in which the app restore should be done, formatted as a DateTime string. + * + * @return the snapshotTime value + */ + public String snapshotTime() { + return this.snapshotTime; + } + + /** + * Set point in time in which the app restore should be done, formatted as a DateTime string. + * + * @param snapshotTime the snapshotTime value to set + * @return the SnapshotRestoreRequest object itself. + */ + public SnapshotRestoreRequest withSnapshotTime(String snapshotTime) { + this.snapshotTime = snapshotTime; + return this; + } + + /** + * Get optional. Specifies the web app that snapshot contents will be retrieved from. + If empty, the targeted web app will be used as the source. + * + * @return the recoverySource value + */ + public SnapshotRecoverySource recoverySource() { + return this.recoverySource; + } + + /** + * Set optional. Specifies the web app that snapshot contents will be retrieved from. + If empty, the targeted web app will be used as the source. + * + * @param recoverySource the recoverySource value to set + * @return the SnapshotRestoreRequest object itself. + */ + public SnapshotRestoreRequest withRecoverySource(SnapshotRecoverySource recoverySource) { + this.recoverySource = recoverySource; + return this; + } + + /** + * Get if <code>true</code> the restore operation can overwrite source app; otherwise, <code>false</code>. + * + * @return the overwrite value + */ + public boolean overwrite() { + return this.overwrite; + } + + /** + * Set if <code>true</code> the restore operation can overwrite source app; otherwise, <code>false</code>. + * + * @param overwrite the overwrite value to set + * @return the SnapshotRestoreRequest object itself. + */ + public SnapshotRestoreRequest withOverwrite(boolean overwrite) { + this.overwrite = overwrite; + return this; + } + + /** + * Get if true, site configuration, in addition to content, will be reverted. + * + * @return the recoverConfiguration value + */ + public Boolean recoverConfiguration() { + return this.recoverConfiguration; + } + + /** + * Set if true, site configuration, in addition to content, will be reverted. + * + * @param recoverConfiguration the recoverConfiguration value to set + * @return the SnapshotRestoreRequest object itself. + */ + public SnapshotRestoreRequest withRecoverConfiguration(Boolean recoverConfiguration) { + this.recoverConfiguration = recoverConfiguration; + return this; + } + + /** + * Get if true, custom hostname conflicts will be ignored when recovering to a target web app. + This setting is only necessary when RecoverConfiguration is enabled. + * + * @return the ignoreConflictingHostNames value + */ + public Boolean ignoreConflictingHostNames() { + return this.ignoreConflictingHostNames; + } + + /** + * Set if true, custom hostname conflicts will be ignored when recovering to a target web app. + This setting is only necessary when RecoverConfiguration is enabled. + * + * @param ignoreConflictingHostNames the ignoreConflictingHostNames value to set + * @return the SnapshotRestoreRequest object itself. + */ + public SnapshotRestoreRequest withIgnoreConflictingHostNames(Boolean ignoreConflictingHostNames) { + this.ignoreConflictingHostNames = ignoreConflictingHostNames; + return this; + } + + /** + * Get if true, the snapshot is retrieved from DRSecondary endpoint. + * + * @return the useDRSecondary value + */ + public Boolean useDRSecondary() { + return this.useDRSecondary; + } + + /** + * Set if true, the snapshot is retrieved from DRSecondary endpoint. + * + * @param useDRSecondary the useDRSecondary value to set + * @return the SnapshotRestoreRequest object itself. + */ + public SnapshotRestoreRequest withUseDRSecondary(Boolean useDRSecondary) { + this.useDRSecondary = useDRSecondary; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Solution.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Solution.java new file mode 100644 index 0000000000000..6c109dfee11d1 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 solution Id. + * + * @return the id value + */ + public Double id() { + return this.id; + } + + /** + * Set solution Id. + * + * @param id the id value to set + * @return the Solution object itself. + */ + public Solution withId(Double id) { + this.id = id; + return this; + } + + /** + * Get display Name of the solution. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set display Name of the solution. + * + * @param displayName the displayName value to set + * @return the Solution object itself. + */ + public Solution withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get order of the solution. + * + * @return the order value + */ + public Double order() { + return this.order; + } + + /** + * Set order of the solution. + * + * @param order the order value to set + * @return the Solution object itself. + */ + public Solution withOrder(Double order) { + this.order = order; + return this; + } + + /** + * Get description of the solution. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of the solution. + * + * @param description the description value to set + * @return the Solution object itself. + */ + public Solution withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get type of Solution. Possible values include: 'QuickSolution', 'DeepInvestigation', 'BestPractices'. + * + * @return the type value + */ + public SolutionType type() { + return this.type; + } + + /** + * Set type of Solution. Possible values include: 'QuickSolution', 'DeepInvestigation', 'BestPractices'. + * + * @param type the type value to set + * @return the Solution object itself. + */ + public Solution withType(SolutionType type) { + this.type = type; + return this; + } + + /** + * Get solution Data. + * + * @return the data value + */ + public List> data() { + return this.data; + } + + /** + * Set solution Data. + * + * @param data the data value to set + * @return the Solution object itself. + */ + public Solution withData(List> data) { + this.data = data; + return this; + } + + /** + * Get solution Metadata. + * + * @return the metadata value + */ + public List> metadata() { + return this.metadata; + } + + /** + * Set solution Metadata. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SolutionType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SolutionType.java new file mode 100644 index 0000000000000..5e312d0875505 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SslState.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SslState.java new file mode 100644 index 0000000000000..721a313a346f2 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StackMajorVersion.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StackMajorVersion.java new file mode 100644 index 0000000000000..edde859cea888 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StackMajorVersion.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.appservice.v2019_08_01; + +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; + + /** + * <code>true</code> if this supports Application Insights; + * otherwise, <code>false</code>. + */ + @JsonProperty(value = "applicationInsights") + private Boolean applicationInsights; + + /** + * <code>true</code> if this stack is in Preview, otherwise + * <code>false</code>. + */ + @JsonProperty(value = "isPreview") + private Boolean isPreview; + + /** + * <code>true</code> if this stack has been deprecated, + * otherwise <code>false</code>. + */ + @JsonProperty(value = "isDeprecated") + private Boolean isDeprecated; + + /** + * <code>true</code> if this stack should be hidden for new + * customers on portal, otherwise <code>false</code>. + */ + @JsonProperty(value = "isHidden") + private Boolean isHidden; + + /** + * Get application stack major version (display only). + * + * @return the displayVersion value + */ + public String displayVersion() { + return this.displayVersion; + } + + /** + * Set application stack major version (display only). + * + * @param displayVersion the displayVersion value to set + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withDisplayVersion(String displayVersion) { + this.displayVersion = displayVersion; + return this; + } + + /** + * Get application stack major version (runtime only). + * + * @return the runtimeVersion value + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set application stack major version (runtime only). + * + * @param runtimeVersion the runtimeVersion value to set + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + /** + * Get <code>true</code> if this is the default major version; otherwise, <code>false</code>. + * + * @return the isDefault value + */ + public Boolean isDefault() { + return this.isDefault; + } + + /** + * Set <code>true</code> if this is the default major version; otherwise, <code>false</code>. + * + * @param isDefault the isDefault value to set + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get minor versions associated with the major version. + * + * @return the minorVersions value + */ + public List minorVersions() { + return this.minorVersions; + } + + /** + * Set minor versions associated with the major version. + * + * @param minorVersions the minorVersions value to set + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withMinorVersions(List minorVersions) { + this.minorVersions = minorVersions; + return this; + } + + /** + * Get <code>true</code> if this supports Application Insights; otherwise, <code>false</code>. + * + * @return the applicationInsights value + */ + public Boolean applicationInsights() { + return this.applicationInsights; + } + + /** + * Set <code>true</code> if this supports Application Insights; otherwise, <code>false</code>. + * + * @param applicationInsights the applicationInsights value to set + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withApplicationInsights(Boolean applicationInsights) { + this.applicationInsights = applicationInsights; + return this; + } + + /** + * Get <code>true</code> if this stack is in Preview, otherwise <code>false</code>. + * + * @return the isPreview value + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set <code>true</code> if this stack is in Preview, otherwise <code>false</code>. + * + * @param isPreview the isPreview value to set + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withIsPreview(Boolean isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Get <code>true</code> if this stack has been deprecated, otherwise <code>false</code>. + * + * @return the isDeprecated value + */ + public Boolean isDeprecated() { + return this.isDeprecated; + } + + /** + * Set <code>true</code> if this stack has been deprecated, otherwise <code>false</code>. + * + * @param isDeprecated the isDeprecated value to set + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withIsDeprecated(Boolean isDeprecated) { + this.isDeprecated = isDeprecated; + return this; + } + + /** + * Get <code>true</code> if this stack should be hidden for new customers on portal, otherwise <code>false</code>. + * + * @return the isHidden value + */ + public Boolean isHidden() { + return this.isHidden; + } + + /** + * Set <code>true</code> if this stack should be hidden for new customers on portal, otherwise <code>false</code>. + * + * @param isHidden the isHidden value to set + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withIsHidden(Boolean isHidden) { + this.isHidden = isHidden; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StackMinorVersion.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StackMinorVersion.java new file mode 100644 index 0000000000000..5669b544d6474 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StackMinorVersion.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.appservice.v2019_08_01; + +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; + + /** + * <code>true</code> if this supports Remote Debugging, + * otherwise <code>false</code>. + */ + @JsonProperty(value = "isRemoteDebuggingEnabled") + private Boolean isRemoteDebuggingEnabled; + + /** + * Get application stack minor version (display only). + * + * @return the displayVersion value + */ + public String displayVersion() { + return this.displayVersion; + } + + /** + * Set application stack minor version (display only). + * + * @param displayVersion the displayVersion value to set + * @return the StackMinorVersion object itself. + */ + public StackMinorVersion withDisplayVersion(String displayVersion) { + this.displayVersion = displayVersion; + return this; + } + + /** + * Get application stack minor version (runtime only). + * + * @return the runtimeVersion value + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set application stack minor version (runtime only). + * + * @param runtimeVersion the runtimeVersion value to set + * @return the StackMinorVersion object itself. + */ + public StackMinorVersion withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + /** + * Get <code>true</code> if this is the default minor version; otherwise, <code>false</code>. + * + * @return the isDefault value + */ + public Boolean isDefault() { + return this.isDefault; + } + + /** + * Set <code>true</code> if this is the default minor version; otherwise, <code>false</code>. + * + * @param isDefault the isDefault value to set + * @return the StackMinorVersion object itself. + */ + public StackMinorVersion withIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get <code>true</code> if this supports Remote Debugging, otherwise <code>false</code>. + * + * @return the isRemoteDebuggingEnabled value + */ + public Boolean isRemoteDebuggingEnabled() { + return this.isRemoteDebuggingEnabled; + } + + /** + * Set <code>true</code> if this supports Remote Debugging, otherwise <code>false</code>. + * + * @param isRemoteDebuggingEnabled the isRemoteDebuggingEnabled value to set + * @return the StackMinorVersion object itself. + */ + public StackMinorVersion withIsRemoteDebuggingEnabled(Boolean isRemoteDebuggingEnabled) { + this.isRemoteDebuggingEnabled = isRemoteDebuggingEnabled; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StampCapacity.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StampCapacity.java new file mode 100644 index 0000000000000..8753ca5b66134 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StampCapacity.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.StampCapacityInner; + +/** + * Type representing StampCapacity. + */ +public interface StampCapacity extends HasInner, HasManager { + /** + * @return the availableCapacity value. + */ + Long availableCapacity(); + + /** + * @return the computeMode value. + */ + ComputeModeOptions computeMode(); + + /** + * @return the excludeFromCapacityAllocation value. + */ + Boolean excludeFromCapacityAllocation(); + + /** + * @return the isApplicableForAllComputeModes value. + */ + Boolean isApplicableForAllComputeModes(); + + /** + * @return the isLinux value. + */ + Boolean isLinux(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the siteMode value. + */ + String siteMode(); + + /** + * @return the totalCapacity value. + */ + Long totalCapacity(); + + /** + * @return the unit value. + */ + String unit(); + + /** + * @return the workerSize value. + */ + WorkerSizeOptions workerSize(); + + /** + * @return the workerSizeId value. + */ + Integer workerSizeId(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteARMResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteARMResource.java new file mode 100644 index 0000000000000..4db7543a33b30 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteARMResource.java @@ -0,0 +1,241 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.StaticSiteARMResourceInner; + +/** + * Type representing StaticSiteARMResource. + */ +public interface StaticSiteARMResource extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the branch value. + */ + String branch(); + + /** + * @return the buildProperties value. + */ + StaticSiteBuildProperties buildProperties(); + + /** + * @return the customDomains value. + */ + List customDomains(); + + /** + * @return the defaultHostname value. + */ + String defaultHostname(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the repositoryToken value. + */ + String repositoryToken(); + + /** + * @return the repositoryUrl value. + */ + String repositoryUrl(); + + /** + * @return the sku value. + */ + SkuDescription sku(); + + /** + * The entirety of the StaticSiteARMResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { + } + + /** + * Grouping of StaticSiteARMResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a StaticSiteARMResource definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the StaticSiteARMResource definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the staticsitearmresource definition allowing to specify Branch. + */ + interface WithBranch { + /** + * Specifies branch. + * @param branch The target branch in the repository + * @return the next definition stage + */ + WithCreate withBranch(String branch); + } + + /** + * The stage of the staticsitearmresource definition allowing to specify BuildProperties. + */ + interface WithBuildProperties { + /** + * Specifies buildProperties. + * @param buildProperties Build properties to configure on the repository + * @return the next definition stage + */ + WithCreate withBuildProperties(StaticSiteBuildProperties buildProperties); + } + + /** + * The stage of the staticsitearmresource definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the staticsitearmresource definition allowing to specify RepositoryToken. + */ + interface WithRepositoryToken { + /** + * Specifies repositoryToken. + * @param repositoryToken A user's github repository token. This is used to setup the Github Actions workflow file and API secrets + * @return the next definition stage + */ + WithCreate withRepositoryToken(String repositoryToken); + } + + /** + * The stage of the staticsitearmresource definition allowing to specify RepositoryUrl. + */ + interface WithRepositoryUrl { + /** + * Specifies repositoryUrl. + * @param repositoryUrl URL for the repository of the static site + * @return the next definition stage + */ + WithCreate withRepositoryUrl(String repositoryUrl); + } + + /** + * The stage of the staticsitearmresource definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku the sku parameter value + * @return the next definition stage + */ + WithCreate withSku(SkuDescription sku); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithBranch, DefinitionStages.WithBuildProperties, DefinitionStages.WithKind, DefinitionStages.WithRepositoryToken, DefinitionStages.WithRepositoryUrl, DefinitionStages.WithSku { + } + } + /** + * The template for a StaticSiteARMResource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithBranch, UpdateStages.WithBuildProperties, UpdateStages.WithKind, UpdateStages.WithRepositoryToken, UpdateStages.WithRepositoryUrl { + } + + /** + * Grouping of StaticSiteARMResource update stages. + */ + interface UpdateStages { + /** + * The stage of the staticsitearmresource update allowing to specify Branch. + */ + interface WithBranch { + /** + * Specifies branch. + * @param branch The target branch in the repository + * @return the next update stage + */ + Update withBranch(String branch); + } + + /** + * The stage of the staticsitearmresource update allowing to specify BuildProperties. + */ + interface WithBuildProperties { + /** + * Specifies buildProperties. + * @param buildProperties Build properties to configure on the repository + * @return the next update stage + */ + Update withBuildProperties(StaticSiteBuildProperties buildProperties); + } + + /** + * The stage of the staticsitearmresource update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the staticsitearmresource update allowing to specify RepositoryToken. + */ + interface WithRepositoryToken { + /** + * Specifies repositoryToken. + * @param repositoryToken A user's github repository token. This is used to setup the Github Actions workflow file and API secrets + * @return the next update stage + */ + Update withRepositoryToken(String repositoryToken); + } + + /** + * The stage of the staticsitearmresource update allowing to specify RepositoryUrl. + */ + interface WithRepositoryUrl { + /** + * Specifies repositoryUrl. + * @param repositoryUrl URL for the repository of the static site + * @return the next update stage + */ + Update withRepositoryUrl(String repositoryUrl); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteBuildARMResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteBuildARMResource.java new file mode 100644 index 0000000000000..54cc192ce8a04 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteBuildARMResource.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.StaticSiteBuildARMResourceInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import org.joda.time.DateTime; + +/** + * Type representing StaticSiteBuildARMResource. + */ +public interface StaticSiteBuildARMResource extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the buildId value. + */ + String buildId(); + + /** + * @return the createdTimeUtc value. + */ + DateTime createdTimeUtc(); + + /** + * @return the hostname value. + */ + String hostname(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the lastUpdatedOn value. + */ + DateTime lastUpdatedOn(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the pullRequestTitle value. + */ + String pullRequestTitle(); + + /** + * @return the sourceBranch value. + */ + String sourceBranch(); + + /** + * @return the status value. + */ + BuildStatus status(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteBuildProperties.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteBuildProperties.java new file mode 100644 index 0000000000000..6449e6a7558f9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteBuildProperties.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Build properties for the static site. + */ +public class StaticSiteBuildProperties { + /** + * The path to the app code within the repository. + */ + @JsonProperty(value = "appLocation") + private String appLocation; + + /** + * The path to the api code within the repository. + */ + @JsonProperty(value = "apiLocation") + private String apiLocation; + + /** + * The path of the app artifacts after building. + */ + @JsonProperty(value = "appArtifactLocation") + private String appArtifactLocation; + + /** + * Get the path to the app code within the repository. + * + * @return the appLocation value + */ + public String appLocation() { + return this.appLocation; + } + + /** + * Set the path to the app code within the repository. + * + * @param appLocation the appLocation value to set + * @return the StaticSiteBuildProperties object itself. + */ + public StaticSiteBuildProperties withAppLocation(String appLocation) { + this.appLocation = appLocation; + return this; + } + + /** + * Get the path to the api code within the repository. + * + * @return the apiLocation value + */ + public String apiLocation() { + return this.apiLocation; + } + + /** + * Set the path to the api code within the repository. + * + * @param apiLocation the apiLocation value to set + * @return the StaticSiteBuildProperties object itself. + */ + public StaticSiteBuildProperties withApiLocation(String apiLocation) { + this.apiLocation = apiLocation; + return this; + } + + /** + * Get the path of the app artifacts after building. + * + * @return the appArtifactLocation value + */ + public String appArtifactLocation() { + return this.appArtifactLocation; + } + + /** + * Set the path of the app artifacts after building. + * + * @param appArtifactLocation the appArtifactLocation value to set + * @return the StaticSiteBuildProperties object itself. + */ + public StaticSiteBuildProperties withAppArtifactLocation(String appArtifactLocation) { + this.appArtifactLocation = appArtifactLocation; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteCustomDomainOverviewARMResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteCustomDomainOverviewARMResource.java new file mode 100644 index 0000000000000..dc2aae710f3d4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteCustomDomainOverviewARMResource.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.StaticSiteCustomDomainOverviewARMResourceInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import org.joda.time.DateTime; + +/** + * Type representing StaticSiteCustomDomainOverviewARMResource. + */ +public interface StaticSiteCustomDomainOverviewARMResource extends HasInner, Indexable, Updatable, HasManager { + /** + * @return the createdOn value. + */ + DateTime createdOn(); + + /** + * @return the domainName value. + */ + String domainName(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the StaticSiteCustomDomainOverviewARMResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithStaticSite, DefinitionStages.WithCreate { + } + + /** + * Grouping of StaticSiteCustomDomainOverviewARMResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a StaticSiteCustomDomainOverviewARMResource definition. + */ + interface Blank extends WithStaticSite { + } + + /** + * The stage of the staticsitecustomdomainoverviewarmresource definition allowing to specify StaticSite. + */ + interface WithStaticSite { + /** + * Specifies resourceGroupName, name. + * @param resourceGroupName Name of the resource group to which the resource belongs + * @param name Name of the static site + * @return the next definition stage + */ + WithCreate withExistingStaticSite(String resourceGroupName, String name); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a StaticSiteCustomDomainOverviewARMResource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable { + } + + /** + * Grouping of StaticSiteCustomDomainOverviewARMResource update stages. + */ + interface UpdateStages { + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteFunctionOverviewARMResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteFunctionOverviewARMResource.java new file mode 100644 index 0000000000000..ad6bfdd950ef0 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteFunctionOverviewARMResource.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.StaticSiteFunctionOverviewARMResourceInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing StaticSiteFunctionOverviewARMResource. + */ +public interface StaticSiteFunctionOverviewARMResource extends HasInner, HasManager { + /** + * @return the functionName value. + */ + String functionName(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the triggerType value. + */ + TriggerTypes triggerType(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSitePatchResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSitePatchResource.java new file mode 100644 index 0000000000000..671fa04371e1d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSitePatchResource.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.appservice.v2019_08_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * ARM resource for a static site when patching. + */ +@JsonFlatten +public class StaticSitePatchResource extends ProxyOnlyResource { + /** + * The default autogenerated hostname for the static site. + */ + @JsonProperty(value = "properties.defaultHostname", access = JsonProperty.Access.WRITE_ONLY) + private String defaultHostname; + + /** + * URL for the repository of the static site. + */ + @JsonProperty(value = "properties.repositoryUrl") + private String repositoryUrl; + + /** + * The target branch in the repository. + */ + @JsonProperty(value = "properties.branch") + private String branch; + + /** + * The custom domains associated with this static site. + */ + @JsonProperty(value = "properties.customDomains", access = JsonProperty.Access.WRITE_ONLY) + private List customDomains; + + /** + * A user's github repository token. This is used to setup the Github + * Actions workflow file and API secrets. + */ + @JsonProperty(value = "properties.repositoryToken") + private String repositoryToken; + + /** + * Build properties to configure on the repository. + */ + @JsonProperty(value = "properties.buildProperties") + private StaticSiteBuildProperties buildProperties; + + /** + * Get the default autogenerated hostname for the static site. + * + * @return the defaultHostname value + */ + public String defaultHostname() { + return this.defaultHostname; + } + + /** + * Get uRL for the repository of the static site. + * + * @return the repositoryUrl value + */ + public String repositoryUrl() { + return this.repositoryUrl; + } + + /** + * Set uRL for the repository of the static site. + * + * @param repositoryUrl the repositoryUrl value to set + * @return the StaticSitePatchResource object itself. + */ + public StaticSitePatchResource withRepositoryUrl(String repositoryUrl) { + this.repositoryUrl = repositoryUrl; + return this; + } + + /** + * Get the target branch in the repository. + * + * @return the branch value + */ + public String branch() { + return this.branch; + } + + /** + * Set the target branch in the repository. + * + * @param branch the branch value to set + * @return the StaticSitePatchResource object itself. + */ + public StaticSitePatchResource withBranch(String branch) { + this.branch = branch; + return this; + } + + /** + * Get the custom domains associated with this static site. + * + * @return the customDomains value + */ + public List customDomains() { + return this.customDomains; + } + + /** + * Get a user's github repository token. This is used to setup the Github Actions workflow file and API secrets. + * + * @return the repositoryToken value + */ + public String repositoryToken() { + return this.repositoryToken; + } + + /** + * Set a user's github repository token. This is used to setup the Github Actions workflow file and API secrets. + * + * @param repositoryToken the repositoryToken value to set + * @return the StaticSitePatchResource object itself. + */ + public StaticSitePatchResource withRepositoryToken(String repositoryToken) { + this.repositoryToken = repositoryToken; + return this; + } + + /** + * Get build properties to configure on the repository. + * + * @return the buildProperties value + */ + public StaticSiteBuildProperties buildProperties() { + return this.buildProperties; + } + + /** + * Set build properties to configure on the repository. + * + * @param buildProperties the buildProperties value to set + * @return the StaticSitePatchResource object itself. + */ + public StaticSitePatchResource withBuildProperties(StaticSiteBuildProperties buildProperties) { + this.buildProperties = buildProperties; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteResetPropertiesARMResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteResetPropertiesARMResource.java new file mode 100644 index 0000000000000..45cd827373a86 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteResetPropertiesARMResource.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Static Site Reset Properties ARM resource. + */ +@JsonFlatten +public class StaticSiteResetPropertiesARMResource extends ProxyOnlyResource { + /** + * The token which proves admin privileges to the repository. + */ + @JsonProperty(value = "properties.repositoryToken") + private String repositoryToken; + + /** + * Determines whether the repository should be updated with the new + * properties. + */ + @JsonProperty(value = "properties.shouldUpdateRepository") + private Boolean shouldUpdateRepository; + + /** + * Get the token which proves admin privileges to the repository. + * + * @return the repositoryToken value + */ + public String repositoryToken() { + return this.repositoryToken; + } + + /** + * Set the token which proves admin privileges to the repository. + * + * @param repositoryToken the repositoryToken value to set + * @return the StaticSiteResetPropertiesARMResource object itself. + */ + public StaticSiteResetPropertiesARMResource withRepositoryToken(String repositoryToken) { + this.repositoryToken = repositoryToken; + return this; + } + + /** + * Get determines whether the repository should be updated with the new properties. + * + * @return the shouldUpdateRepository value + */ + public Boolean shouldUpdateRepository() { + return this.shouldUpdateRepository; + } + + /** + * Set determines whether the repository should be updated with the new properties. + * + * @param shouldUpdateRepository the shouldUpdateRepository value to set + * @return the StaticSiteResetPropertiesARMResource object itself. + */ + public StaticSiteResetPropertiesARMResource withShouldUpdateRepository(Boolean shouldUpdateRepository) { + this.shouldUpdateRepository = shouldUpdateRepository; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteUserARMResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteUserARMResource.java new file mode 100644 index 0000000000000..9a7d15eef6680 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteUserARMResource.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.StaticSiteUserARMResourceInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing StaticSiteUserARMResource. + */ +public interface StaticSiteUserARMResource extends HasInner, Indexable, Updatable, HasManager { + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the provider value. + */ + String provider(); + + /** + * @return the roles value. + */ + String roles(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the userId value. + */ + String userId(); + + /** + * The template for a StaticSiteUserARMResource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithKind, UpdateStages.WithRoles { + } + + /** + * Grouping of StaticSiteUserARMResource update stages. + */ + interface UpdateStages { + /** + * The stage of the staticsiteuserarmresource update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the staticsiteuserarmresource update allowing to specify Roles. + */ + interface WithRoles { + /** + * Specifies roles. + * @param roles The roles for the static site user, in free-form string format + * @return the next update stage + */ + Update withRoles(String roles); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteUserInvitationRequestResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteUserInvitationRequestResource.java new file mode 100644 index 0000000000000..5ff76a362f6f9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteUserInvitationRequestResource.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Static sites user roles invitation resource. + */ +@JsonFlatten +public class StaticSiteUserInvitationRequestResource extends ProxyOnlyResource { + /** + * The domain name for the static site custom domain. + */ + @JsonProperty(value = "properties.domain") + private String domain; + + /** + * The identity provider for the static site user. + */ + @JsonProperty(value = "properties.provider") + private String provider; + + /** + * The user id for the static site user. + */ + @JsonProperty(value = "properties.userDetails") + private String userDetails; + + /** + * The roles for the static site user, in free-form string format. + */ + @JsonProperty(value = "properties.roles") + private String roles; + + /** + * The number of hours the sas token stays valid. + */ + @JsonProperty(value = "properties.numHoursToExpiration") + private Integer numHoursToExpiration; + + /** + * Get the domain name for the static site custom domain. + * + * @return the domain value + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain name for the static site custom domain. + * + * @param domain the domain value to set + * @return the StaticSiteUserInvitationRequestResource object itself. + */ + public StaticSiteUserInvitationRequestResource withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the identity provider for the static site user. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set the identity provider for the static site user. + * + * @param provider the provider value to set + * @return the StaticSiteUserInvitationRequestResource object itself. + */ + public StaticSiteUserInvitationRequestResource withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the user id for the static site user. + * + * @return the userDetails value + */ + public String userDetails() { + return this.userDetails; + } + + /** + * Set the user id for the static site user. + * + * @param userDetails the userDetails value to set + * @return the StaticSiteUserInvitationRequestResource object itself. + */ + public StaticSiteUserInvitationRequestResource withUserDetails(String userDetails) { + this.userDetails = userDetails; + return this; + } + + /** + * Get the roles for the static site user, in free-form string format. + * + * @return the roles value + */ + public String roles() { + return this.roles; + } + + /** + * Set the roles for the static site user, in free-form string format. + * + * @param roles the roles value to set + * @return the StaticSiteUserInvitationRequestResource object itself. + */ + public StaticSiteUserInvitationRequestResource withRoles(String roles) { + this.roles = roles; + return this; + } + + /** + * Get the number of hours the sas token stays valid. + * + * @return the numHoursToExpiration value + */ + public Integer numHoursToExpiration() { + return this.numHoursToExpiration; + } + + /** + * Set the number of hours the sas token stays valid. + * + * @param numHoursToExpiration the numHoursToExpiration value to set + * @return the StaticSiteUserInvitationRequestResource object itself. + */ + public StaticSiteUserInvitationRequestResource withNumHoursToExpiration(Integer numHoursToExpiration) { + this.numHoursToExpiration = numHoursToExpiration; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteUserInvitationResponseResource.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteUserInvitationResponseResource.java new file mode 100644 index 0000000000000..9c2d8ea0ca1a6 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSiteUserInvitationResponseResource.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.StaticSiteUserInvitationResponseResourceInner; +import org.joda.time.DateTime; + +/** + * Type representing StaticSiteUserInvitationResponseResource. + */ +public interface StaticSiteUserInvitationResponseResource extends HasInner, HasManager { + /** + * @return the expiresOn value. + */ + DateTime expiresOn(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the invitationUrl value. + */ + String invitationUrl(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSites.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSites.java new file mode 100644 index 0000000000000..e416b6205a0d3 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StaticSites.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Completable; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.StaticSitesInner; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteBuildARMResource; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.StringDictionaryInner; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteFunctionOverviewARMResource; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteCustomDomainOverviewARMResource; + +/** + * Type representing StaticSites. + */ +public interface StaticSites extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * Begins definition for a new CustomDomain resource. + * @param name resource name. + * @return the first stage of the new CustomDomain definition. + */ + StaticSiteCustomDomainOverviewARMResource.DefinitionStages.Blank defineCustomDomain(String name); + + /** + * Creates an invitation link for a user with the role. + * Description for Creates an invitation link for a user with the role. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteUserRolesInvitationEnvelope the StaticSiteUserInvitationRequestResource value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable createUserRolesInvitationLinkAsync(String resourceGroupName, String name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope); + + /** + * Detaches a static site. + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable detachStaticSiteAsync(String resourceGroupName, String name); + + /** + * Gets the application settings of a static site. + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listStaticSiteFunctionAppSettingsAsync(String resourceGroupName, String name); + + /** + * Lists the secrets for an existing static site. + * Description for Lists the secrets for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listStaticSiteSecretsAsync(String resourceGroupName, String name); + + /** + * Resets the api key for an existing static site. + * Description for Resets the api key for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param resetPropertiesEnvelope the StaticSiteResetPropertiesARMResource value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable resetStaticSiteApiKeyAsync(String resourceGroupName, String name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope); + + /** + * Gets the list of users of a static site. + * Description for Gets the list of users of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for the users. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listStaticSiteUsersAsync(final String resourceGroupName, final String name, final String authprovider); + + /** + * Deletes the user entry from the static site. + * Description for Deletes the user entry from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the staticsite. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteStaticSiteUserAsync(String resourceGroupName, String name, String authprovider, String userid); + + /** + * Gets the details of a static site build. + * Description for Gets the details of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getStaticSiteBuildAsync(String resourceGroupName, String name, String prId); + + /** + * Gets all static site builds for a particular static site. + * Description for Gets all static site builds for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getStaticSiteBuildsAsync(final String resourceGroupName, final String name); + + /** + * Deletes a static site build. + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteStaticSiteBuildAsync(String resourceGroupName, String name, String prId); + + /** + * Gets the application settings of a static site. + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listStaticSiteBuildFunctionAppSettingsAsync(String resourceGroupName, String name, String prId); + + /** + * Creates or updates the function app settings of a static site build. + * Description for Creates or updates the function app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @param appSettings the StringDictionaryInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable createOrUpdateStaticSiteBuildFunctionAppSettingsAsync(String resourceGroupName, String name, String prId, StringDictionaryInner appSettings); + + /** + * Creates or updates the function app settings of a static site. + * Description for Creates or updates the function app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings the StringDictionaryInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable createOrUpdateStaticSiteFunctionAppSettingsAsync(String resourceGroupName, String name, StringDictionaryInner appSettings); + + /** + * Gets the functions of a particular static site build. + * Description for Gets the functions of a particular static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listStaticSiteBuildFunctionsAsync(final String resourceGroupName, final String name, final String prId); + + /** + * Gets the functions of a static site. + * Description for Gets the functions of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listStaticSiteFunctionsAsync(final String resourceGroupName, final String name); + + /** + * Gets all static site custom domains for a particular static site. + * Description for Gets all static site custom domains for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listStaticSiteCustomDomainsAsync(final String resourceGroupName, final String name); + + /** + * Deletes a custom domain. + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteStaticSiteCustomDomainAsync(String resourceGroupName, String name, String domainName); + + /** + * Validates a particular custom domain can be added to a static site. + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable validateCustomDomainCanBeAddedToStaticSiteAsync(String resourceGroupName, String name, String domainName); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StatusCodesBasedTrigger.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StatusCodesBasedTrigger.java new file mode 100644 index 0000000000000..8749f326f059a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 hTTP status code. + * + * @return the status value + */ + public Integer status() { + return this.status; + } + + /** + * Set hTTP status code. + * + * @param status the status value to set + * @return the StatusCodesBasedTrigger object itself. + */ + public StatusCodesBasedTrigger withStatus(Integer status) { + this.status = status; + return this; + } + + /** + * Get request Sub Status. + * + * @return the subStatus value + */ + public Integer subStatus() { + return this.subStatus; + } + + /** + * Set request Sub Status. + * + * @param subStatus the subStatus value to set + * @return the StatusCodesBasedTrigger object itself. + */ + public StatusCodesBasedTrigger withSubStatus(Integer subStatus) { + this.subStatus = subStatus; + return this; + } + + /** + * Get win32 error code. + * + * @return the win32Status value + */ + public Integer win32Status() { + return this.win32Status; + } + + /** + * Set win32 error code. + * + * @param win32Status the win32Status value to set + * @return the StatusCodesBasedTrigger object itself. + */ + public StatusCodesBasedTrigger withWin32Status(Integer win32Status) { + this.win32Status = win32Status; + return this; + } + + /** + * Get request Count. + * + * @return the count value + */ + public Integer count() { + return this.count; + } + + /** + * Set request Count. + * + * @param count the count value to set + * @return the StatusCodesBasedTrigger object itself. + */ + public StatusCodesBasedTrigger withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get time interval. + * + * @return the timeInterval value + */ + public String timeInterval() { + return this.timeInterval; + } + + /** + * Set time interval. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StatusOptions.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StatusOptions.java new file mode 100644 index 0000000000000..c846cbe23b04f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StorageMigrationOptions.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StorageMigrationOptions.java new file mode 100644 index 0000000000000..ef209ea6ba729 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StorageMigrationOptions.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Options for app content migration. + */ +@JsonFlatten +public class StorageMigrationOptions 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 azureFiles connection string. + * + * @return the azurefilesConnectionString value + */ + public String azurefilesConnectionString() { + return this.azurefilesConnectionString; + } + + /** + * Set azureFiles connection string. + * + * @param azurefilesConnectionString the azurefilesConnectionString value to set + * @return the StorageMigrationOptions object itself. + */ + public StorageMigrationOptions withAzurefilesConnectionString(String azurefilesConnectionString) { + this.azurefilesConnectionString = azurefilesConnectionString; + return this; + } + + /** + * Get azureFiles share. + * + * @return the azurefilesShare value + */ + public String azurefilesShare() { + return this.azurefilesShare; + } + + /** + * Set azureFiles share. + * + * @param azurefilesShare the azurefilesShare value to set + * @return the StorageMigrationOptions object itself. + */ + public StorageMigrationOptions withAzurefilesShare(String azurefilesShare) { + this.azurefilesShare = azurefilesShare; + return this; + } + + /** + * Get <code>true</code>if the app should be switched over; otherwise, <code>false</code>. + * + * @return the switchSiteAfterMigration value + */ + public Boolean switchSiteAfterMigration() { + return this.switchSiteAfterMigration; + } + + /** + * Set <code>true</code>if the app should be switched over; otherwise, <code>false</code>. + * + * @param switchSiteAfterMigration the switchSiteAfterMigration value to set + * @return the StorageMigrationOptions object itself. + */ + public StorageMigrationOptions withSwitchSiteAfterMigration(Boolean switchSiteAfterMigration) { + this.switchSiteAfterMigration = switchSiteAfterMigration; + return this; + } + + /** + * Get <code>true</code> if the app should be read only during copy operation; otherwise, <code>false</code>. + * + * @return the blockWriteAccessToSite value + */ + public Boolean blockWriteAccessToSite() { + return this.blockWriteAccessToSite; + } + + /** + * Set <code>true</code> if the app should be read only during copy operation; otherwise, <code>false</code>. + * + * @param blockWriteAccessToSite the blockWriteAccessToSite value to set + * @return the StorageMigrationOptions object itself. + */ + public StorageMigrationOptions withBlockWriteAccessToSite(Boolean blockWriteAccessToSite) { + this.blockWriteAccessToSite = blockWriteAccessToSite; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StorageMigrationResponse.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StorageMigrationResponse.java new file mode 100644 index 0000000000000..aa7e3300b74c5 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StorageMigrationResponse.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.StorageMigrationResponseInner; + +/** + * Type representing StorageMigrationResponse. + */ +public interface StorageMigrationResponse extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the operationId value. + */ + String operationId(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StringDictionary.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StringDictionary.java new file mode 100644 index 0000000000000..70fc94e7c10af --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/StringDictionary.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.StringDictionaryInner; +import java.util.Map; + +/** + * Type representing StringDictionary. + */ +public interface StringDictionary extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the properties value. + */ + Map properties(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SupportedTlsVersions.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SupportedTlsVersions.java new file mode 100644 index 0000000000000..719000dfb8a9e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SwiftVirtualNetwork.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SwiftVirtualNetwork.java new file mode 100644 index 0000000000000..123ec2b4a077d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/SwiftVirtualNetwork.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SwiftVirtualNetworkInner; + +/** + * Type representing SwiftVirtualNetwork. + */ +public interface SwiftVirtualNetwork extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the subnetResourceId value. + */ + String subnetResourceId(); + + /** + * @return the swiftSupported value. + */ + Boolean swiftSupported(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TldLegalAgreement.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TldLegalAgreement.java new file mode 100644 index 0000000000000..49fa69034d971 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TldLegalAgreement.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.TldLegalAgreementInner; + +/** + * Type representing TldLegalAgreement. + */ +public interface TldLegalAgreement extends HasInner, HasManager { + /** + * @return the agreementKey value. + */ + String agreementKey(); + + /** + * @return the content value. + */ + String content(); + + /** + * @return the title value. + */ + String title(); + + /** + * @return the url value. + */ + String url(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TopLevelDomain.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TopLevelDomain.java new file mode 100644 index 0000000000000..a0a26c4040827 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TopLevelDomain.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.TopLevelDomainInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing TopLevelDomain. + */ +public interface TopLevelDomain extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the privacy value. + */ + Boolean privacy(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TopLevelDomainAgreementOption.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TopLevelDomainAgreementOption.java new file mode 100644 index 0000000000000..130856ddbb2d5 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TopLevelDomainAgreementOption.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Options for retrieving the list of top level domain legal agreements. + */ +public class TopLevelDomainAgreementOption { + /** + * 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 if <code>true</code>, then the list of agreements will include agreements for domain privacy as well; otherwise, <code>false</code>. + * + * @return the includePrivacy value + */ + public Boolean includePrivacy() { + return this.includePrivacy; + } + + /** + * Set if <code>true</code>, then the list of agreements will include agreements for domain privacy as well; otherwise, <code>false</code>. + * + * @param includePrivacy the includePrivacy value to set + * @return the TopLevelDomainAgreementOption object itself. + */ + public TopLevelDomainAgreementOption withIncludePrivacy(Boolean includePrivacy) { + this.includePrivacy = includePrivacy; + return this; + } + + /** + * Get if <code>true</code>, then the list of agreements will include agreements for domain transfer as well; otherwise, <code>false</code>. + * + * @return the forTransfer value + */ + public Boolean forTransfer() { + return this.forTransfer; + } + + /** + * Set if <code>true</code>, then the list of agreements will include agreements for domain transfer as well; otherwise, <code>false</code>. + * + * @param forTransfer the forTransfer value to set + * @return the TopLevelDomainAgreementOption object itself. + */ + public TopLevelDomainAgreementOption withForTransfer(Boolean forTransfer) { + this.forTransfer = forTransfer; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TopLevelDomains.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TopLevelDomains.java new file mode 100644 index 0000000000000..c7ebcf648ce67 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TopLevelDomains.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.TopLevelDomainsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing TopLevelDomains. + */ +public interface TopLevelDomains extends SupportsListing, HasInner { + /** + * Get details of a top-level domain. + * Description for 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 for the request + */ + Observable getAsync(String name); + + /** + * Gets all legal agreements that user needs to accept before purchasing a domain. + * Description for 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 for the request + */ + Observable listAgreementsAsync(final String name, final TopLevelDomainAgreementOption agreementOption); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TriggerTypes.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TriggerTypes.java new file mode 100644 index 0000000000000..0f8a601c92965 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TriggerTypes.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.appservice.v2019_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for TriggerTypes. + */ +public final class TriggerTypes extends ExpandableStringEnum { + /** Static value HttpTrigger for TriggerTypes. */ + public static final TriggerTypes HTTP_TRIGGER = fromString("HttpTrigger"); + + /** Static value Unknown for TriggerTypes. */ + public static final TriggerTypes UNKNOWN = fromString("Unknown"); + + /** + * Creates or finds a TriggerTypes from its string representation. + * @param name a name to look for + * @return the corresponding TriggerTypes + */ + @JsonCreator + public static TriggerTypes fromString(String name) { + return fromString(name, TriggerTypes.class); + } + + /** + * @return known TriggerTypes values + */ + public static Collection values() { + return values(TriggerTypes.class); + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TriggeredJobHistory.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TriggeredJobHistory.java new file mode 100644 index 0000000000000..5430c11f99ac0 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TriggeredJobHistory.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.TriggeredJobHistoryInner; +import java.util.List; + +/** + * Type representing TriggeredJobHistory. + */ +public interface TriggeredJobHistory extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the runs value. + */ + List runs(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TriggeredJobRun.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TriggeredJobRun.java new file mode 100644 index 0000000000000..a4f62fe7a98b0 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TriggeredJobRun.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.appservice.v2019_08_01; + +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.web_job_id") + private String webJobId; + + /** + * Job name. + */ + @JsonProperty(value = "properties.web_job_name") + private String webJobName; + + /** + * Job status. Possible values include: 'Success', 'Failed', 'Error'. + */ + @JsonProperty(value = "properties.status") + private TriggeredWebJobStatus status; + + /** + * Start time. + */ + @JsonProperty(value = "properties.start_time") + private DateTime startTime; + + /** + * End time. + */ + @JsonProperty(value = "properties.end_time") + private DateTime endTime; + + /** + * Job duration. + */ + @JsonProperty(value = "properties.duration") + private String duration; + + /** + * Output URL. + */ + @JsonProperty(value = "properties.output_url") + private String outputUrl; + + /** + * Error URL. + */ + @JsonProperty(value = "properties.error_url") + private String errorUrl; + + /** + * Job URL. + */ + @JsonProperty(value = "properties.url") + private String url; + + /** + * Job name. + */ + @JsonProperty(value = "properties.job_name") + private String jobName; + + /** + * Job trigger. + */ + @JsonProperty(value = "properties.trigger") + private String trigger; + + /** + * Get job ID. + * + * @return the webJobId value + */ + public String webJobId() { + return this.webJobId; + } + + /** + * Set job ID. + * + * @param webJobId the webJobId value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withWebJobId(String webJobId) { + this.webJobId = webJobId; + return this; + } + + /** + * Get job name. + * + * @return the webJobName value + */ + public String webJobName() { + return this.webJobName; + } + + /** + * Set job name. + * + * @param webJobName the webJobName value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withWebJobName(String webJobName) { + this.webJobName = webJobName; + return this; + } + + /** + * Get job status. Possible values include: 'Success', 'Failed', 'Error'. + * + * @return the status value + */ + public TriggeredWebJobStatus status() { + return this.status; + } + + /** + * Set job status. Possible values include: 'Success', 'Failed', 'Error'. + * + * @param status the status value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withStatus(TriggeredWebJobStatus status) { + this.status = status; + return this; + } + + /** + * Get start time. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set start time. + * + * @param startTime the startTime value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get end time. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set end time. + * + * @param endTime the endTime value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get job duration. + * + * @return the duration value + */ + public String duration() { + return this.duration; + } + + /** + * Set job duration. + * + * @param duration the duration value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withDuration(String duration) { + this.duration = duration; + return this; + } + + /** + * Get output URL. + * + * @return the outputUrl value + */ + public String outputUrl() { + return this.outputUrl; + } + + /** + * Set output URL. + * + * @param outputUrl the outputUrl value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withOutputUrl(String outputUrl) { + this.outputUrl = outputUrl; + return this; + } + + /** + * Get error URL. + * + * @return the errorUrl value + */ + public String errorUrl() { + return this.errorUrl; + } + + /** + * Set error URL. + * + * @param errorUrl the errorUrl value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withErrorUrl(String errorUrl) { + this.errorUrl = errorUrl; + return this; + } + + /** + * Get job URL. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Set job URL. + * + * @param url the url value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get job name. + * + * @return the jobName value + */ + public String jobName() { + return this.jobName; + } + + /** + * Set job name. + * + * @param jobName the jobName value to set + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withJobName(String jobName) { + this.jobName = jobName; + return this; + } + + /** + * Get job trigger. + * + * @return the trigger value + */ + public String trigger() { + return this.trigger; + } + + /** + * Set job trigger. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TriggeredWebJob.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TriggeredWebJob.java new file mode 100644 index 0000000000000..14709936bfac9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TriggeredWebJob.java @@ -0,0 +1,93 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.TriggeredWebJobInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.Map; + +/** + * Type representing TriggeredWebJob. + */ +public interface TriggeredWebJob extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the error value. + */ + String error(); + + /** + * @return the extraInfoUrl value. + */ + String extraInfoUrl(); + + /** + * @return the historyUrl value. + */ + String historyUrl(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the latestRun value. + */ + TriggeredJobRun latestRun(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the runCommand value. + */ + String runCommand(); + + /** + * @return the schedulerLogsUrl value. + */ + String schedulerLogsUrl(); + + /** + * @return the settings value. + */ + Map settings(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the url value. + */ + String url(); + + /** + * @return the usingSdk value. + */ + Boolean usingSdk(); + + /** + * @return the webJobType value. + */ + WebJobType webJobType(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TriggeredWebJobStatus.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/TriggeredWebJobStatus.java new file mode 100644 index 0000000000000..920b729d44acb --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/UnauthenticatedClientAction.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/UnauthenticatedClientAction.java new file mode 100644 index 0000000000000..c8aff0c7d6fce --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Usage.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Usage.java new file mode 100644 index 0000000000000..1f1f436a1a366 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/Usage.java @@ -0,0 +1,81 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.UsageInner; +import org.joda.time.DateTime; + +/** + * Type representing Usage. + */ +public interface Usage extends HasInner, HasManager { + /** + * @return the computeMode value. + */ + ComputeModeOptions computeMode(); + + /** + * @return the currentValue value. + */ + Long currentValue(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the limit value. + */ + Long limit(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the nextResetTime value. + */ + DateTime nextResetTime(); + + /** + * @return the resourceName value. + */ + String resourceName(); + + /** + * @return the siteMode value. + */ + String siteMode(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the unit value. + */ + String unit(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/UsageState.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/UsageState.java new file mode 100644 index 0000000000000..b549134bff264 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/User.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/User.java new file mode 100644 index 0000000000000..f9b98a552dd22 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/User.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.UserInner; + +/** + * Type representing User. + */ +public interface User extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the publishingPassword value. + */ + String publishingPassword(); + + /** + * @return the publishingPasswordHash value. + */ + String publishingPasswordHash(); + + /** + * @return the publishingPasswordHashSalt value. + */ + String publishingPasswordHashSalt(); + + /** + * @return the publishingUserName value. + */ + String publishingUserName(); + + /** + * @return the scmUri value. + */ + String scmUri(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ValidateRequest.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ValidateRequest.java new file mode 100644 index 0000000000000..6a7553f760fd7 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ValidateRequest.java @@ -0,0 +1,440 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Resource validation request content. + */ +@JsonFlatten +public class ValidateRequest { + /** + * 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 VMs). + */ + @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; + + /** + * <code>true</code> if App Service plan is running as a + * windows container. + */ + @JsonProperty(value = "properties.isXenon") + private Boolean isXenon; + + /** + * Base URL of the container registry. + */ + @JsonProperty(value = "properties.containerRegistryBaseUrl") + private String containerRegistryBaseUrl; + + /** + * Username for to access the container registry. + */ + @JsonProperty(value = "properties.containerRegistryUsername") + private String containerRegistryUsername; + + /** + * Password for to access the container registry. + */ + @JsonProperty(value = "properties.containerRegistryPassword") + private String containerRegistryPassword; + + /** + * Repository name (image name). + */ + @JsonProperty(value = "properties.containerImageRepository") + private String containerImageRepository; + + /** + * Image tag. + */ + @JsonProperty(value = "properties.containerImageTag") + private String containerImageTag; + + /** + * Platform (windows or linux). + */ + @JsonProperty(value = "properties.containerImagePlatform") + private String containerImagePlatform; + + /** + * Get resource name to verify. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set resource name to verify. + * + * @param name the name value to set + * @return the ValidateRequest object itself. + */ + public ValidateRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get resource type used for verification. Possible values include: 'ServerFarm', 'Site'. + * + * @return the type value + */ + public ValidateResourceTypes type() { + return this.type; + } + + /** + * Set resource type used for verification. Possible values include: 'ServerFarm', 'Site'. + * + * @param type the type value to set + * @return the ValidateRequest object itself. + */ + public ValidateRequest withType(ValidateResourceTypes type) { + this.type = type; + return this; + } + + /** + * Get expected location of the resource. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set expected location of the resource. + * + * @param location the location value to set + * @return the ValidateRequest object itself. + */ + public ValidateRequest withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get aRM resource ID of an App Service plan that would host the app. + * + * @return the serverFarmId value + */ + public String serverFarmId() { + return this.serverFarmId; + } + + /** + * Set aRM resource ID of an App Service plan that would host the app. + * + * @param serverFarmId the serverFarmId value to set + * @return the ValidateRequest object itself. + */ + public ValidateRequest withServerFarmId(String serverFarmId) { + this.serverFarmId = serverFarmId; + return this; + } + + /** + * Get name of the target SKU for the App Service plan. + * + * @return the skuName value + */ + public String skuName() { + return this.skuName; + } + + /** + * Set name of the target SKU for the App Service plan. + * + * @param skuName the skuName value to set + * @return the ValidateRequest object itself. + */ + public ValidateRequest withSkuName(String skuName) { + this.skuName = skuName; + return this; + } + + /** + * Get <code>true</code> if App Service plan is for Linux workers; otherwise, <code>false</code>. + * + * @return the needLinuxWorkers value + */ + public Boolean needLinuxWorkers() { + return this.needLinuxWorkers; + } + + /** + * Set <code>true</code> if App Service plan is for Linux workers; otherwise, <code>false</code>. + * + * @param needLinuxWorkers the needLinuxWorkers value to set + * @return the ValidateRequest object itself. + */ + public ValidateRequest withNeedLinuxWorkers(Boolean needLinuxWorkers) { + this.needLinuxWorkers = needLinuxWorkers; + return this; + } + + /** + * Get <code>true</code> if App Service plan is for Spot instances; otherwise, <code>false</code>. + * + * @return the isSpot value + */ + public Boolean isSpot() { + return this.isSpot; + } + + /** + * Set <code>true</code> if App Service plan is for Spot instances; otherwise, <code>false</code>. + * + * @param isSpot the isSpot value to set + * @return the ValidateRequest object itself. + */ + public ValidateRequest withIsSpot(Boolean isSpot) { + this.isSpot = isSpot; + return this; + } + + /** + * Get target capacity of the App Service plan (number of VMs). + * + * @return the capacity value + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set target capacity of the App Service plan (number of VMs). + * + * @param capacity the capacity value to set + * @return the ValidateRequest object itself. + */ + public ValidateRequest withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get name of App Service Environment where app or App Service plan should be created. + * + * @return the hostingEnvironment value + */ + public String hostingEnvironment() { + return this.hostingEnvironment; + } + + /** + * Set name of App Service Environment where app or App Service plan should be created. + * + * @param hostingEnvironment the hostingEnvironment value to set + * @return the ValidateRequest object itself. + */ + public ValidateRequest withHostingEnvironment(String hostingEnvironment) { + this.hostingEnvironment = hostingEnvironment; + return this; + } + + /** + * Get <code>true</code> if App Service plan is running as a windows container. + * + * @return the isXenon value + */ + public Boolean isXenon() { + return this.isXenon; + } + + /** + * Set <code>true</code> if App Service plan is running as a windows container. + * + * @param isXenon the isXenon value to set + * @return the ValidateRequest object itself. + */ + public ValidateRequest withIsXenon(Boolean isXenon) { + this.isXenon = isXenon; + return this; + } + + /** + * Get base URL of the container registry. + * + * @return the containerRegistryBaseUrl value + */ + public String containerRegistryBaseUrl() { + return this.containerRegistryBaseUrl; + } + + /** + * Set base URL of the container registry. + * + * @param containerRegistryBaseUrl the containerRegistryBaseUrl value to set + * @return the ValidateRequest object itself. + */ + public ValidateRequest withContainerRegistryBaseUrl(String containerRegistryBaseUrl) { + this.containerRegistryBaseUrl = containerRegistryBaseUrl; + return this; + } + + /** + * Get username for to access the container registry. + * + * @return the containerRegistryUsername value + */ + public String containerRegistryUsername() { + return this.containerRegistryUsername; + } + + /** + * Set username for to access the container registry. + * + * @param containerRegistryUsername the containerRegistryUsername value to set + * @return the ValidateRequest object itself. + */ + public ValidateRequest withContainerRegistryUsername(String containerRegistryUsername) { + this.containerRegistryUsername = containerRegistryUsername; + return this; + } + + /** + * Get password for to access the container registry. + * + * @return the containerRegistryPassword value + */ + public String containerRegistryPassword() { + return this.containerRegistryPassword; + } + + /** + * Set password for to access the container registry. + * + * @param containerRegistryPassword the containerRegistryPassword value to set + * @return the ValidateRequest object itself. + */ + public ValidateRequest withContainerRegistryPassword(String containerRegistryPassword) { + this.containerRegistryPassword = containerRegistryPassword; + return this; + } + + /** + * Get repository name (image name). + * + * @return the containerImageRepository value + */ + public String containerImageRepository() { + return this.containerImageRepository; + } + + /** + * Set repository name (image name). + * + * @param containerImageRepository the containerImageRepository value to set + * @return the ValidateRequest object itself. + */ + public ValidateRequest withContainerImageRepository(String containerImageRepository) { + this.containerImageRepository = containerImageRepository; + return this; + } + + /** + * Get image tag. + * + * @return the containerImageTag value + */ + public String containerImageTag() { + return this.containerImageTag; + } + + /** + * Set image tag. + * + * @param containerImageTag the containerImageTag value to set + * @return the ValidateRequest object itself. + */ + public ValidateRequest withContainerImageTag(String containerImageTag) { + this.containerImageTag = containerImageTag; + return this; + } + + /** + * Get platform (windows or linux). + * + * @return the containerImagePlatform value + */ + public String containerImagePlatform() { + return this.containerImagePlatform; + } + + /** + * Set platform (windows or linux). + * + * @param containerImagePlatform the containerImagePlatform value to set + * @return the ValidateRequest object itself. + */ + public ValidateRequest withContainerImagePlatform(String containerImagePlatform) { + this.containerImagePlatform = containerImagePlatform; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ValidateResourceTypes.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ValidateResourceTypes.java new file mode 100644 index 0000000000000..82bc10e6b2f43 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ValidateResponseError.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/ValidateResponseError.java new file mode 100644 index 0000000000000..b74bb1e1c6337 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 validation error code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set validation error code. + * + * @param code the code value to set + * @return the ValidateResponseError object itself. + */ + public ValidateResponseError withCode(String code) { + this.code = code; + return this; + } + + /** + * Get validation error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set validation error message. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VirtualApplication.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VirtualApplication.java new file mode 100644 index 0000000000000..d027f4c00f749 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 virtual path. + * + * @return the virtualPath value + */ + public String virtualPath() { + return this.virtualPath; + } + + /** + * Set virtual path. + * + * @param virtualPath the virtualPath value to set + * @return the VirtualApplication object itself. + */ + public VirtualApplication withVirtualPath(String virtualPath) { + this.virtualPath = virtualPath; + return this; + } + + /** + * Get physical path. + * + * @return the physicalPath value + */ + public String physicalPath() { + return this.physicalPath; + } + + /** + * Set physical path. + * + * @param physicalPath the physicalPath value to set + * @return the VirtualApplication object itself. + */ + public VirtualApplication withPhysicalPath(String physicalPath) { + this.physicalPath = physicalPath; + return this; + } + + /** + * Get <code>true</code> if preloading is enabled; otherwise, <code>false</code>. + * + * @return the preloadEnabled value + */ + public Boolean preloadEnabled() { + return this.preloadEnabled; + } + + /** + * Set <code>true</code> if preloading is enabled; otherwise, <code>false</code>. + * + * @param preloadEnabled the preloadEnabled value to set + * @return the VirtualApplication object itself. + */ + public VirtualApplication withPreloadEnabled(Boolean preloadEnabled) { + this.preloadEnabled = preloadEnabled; + return this; + } + + /** + * Get virtual directories for virtual application. + * + * @return the virtualDirectories value + */ + public List virtualDirectories() { + return this.virtualDirectories; + } + + /** + * Set virtual directories for virtual application. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VirtualDirectory.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VirtualDirectory.java new file mode 100644 index 0000000000000..42b5aab4c7b78 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 path to virtual application. + * + * @return the virtualPath value + */ + public String virtualPath() { + return this.virtualPath; + } + + /** + * Set path to virtual application. + * + * @param virtualPath the virtualPath value to set + * @return the VirtualDirectory object itself. + */ + public VirtualDirectory withVirtualPath(String virtualPath) { + this.virtualPath = virtualPath; + return this; + } + + /** + * Get physical path. + * + * @return the physicalPath value + */ + public String physicalPath() { + return this.physicalPath; + } + + /** + * Set physical path. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VirtualIPMapping.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VirtualIPMapping.java new file mode 100644 index 0000000000000..673810ba3ec07 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VirtualIPMapping.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.appservice.v2019_08_01; + +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; + + /** + * name of the service that virtual IP is assigned to. + */ + @JsonProperty(value = "serviceName") + private String serviceName; + + /** + * Get virtual IP address. + * + * @return the virtualIP value + */ + public String virtualIP() { + return this.virtualIP; + } + + /** + * Set virtual IP address. + * + * @param virtualIP the virtualIP value to set + * @return the VirtualIPMapping object itself. + */ + public VirtualIPMapping withVirtualIP(String virtualIP) { + this.virtualIP = virtualIP; + return this; + } + + /** + * Get internal HTTP port. + * + * @return the internalHttpPort value + */ + public Integer internalHttpPort() { + return this.internalHttpPort; + } + + /** + * Set internal HTTP port. + * + * @param internalHttpPort the internalHttpPort value to set + * @return the VirtualIPMapping object itself. + */ + public VirtualIPMapping withInternalHttpPort(Integer internalHttpPort) { + this.internalHttpPort = internalHttpPort; + return this; + } + + /** + * Get internal HTTPS port. + * + * @return the internalHttpsPort value + */ + public Integer internalHttpsPort() { + return this.internalHttpsPort; + } + + /** + * Set internal HTTPS port. + * + * @param internalHttpsPort the internalHttpsPort value to set + * @return the VirtualIPMapping object itself. + */ + public VirtualIPMapping withInternalHttpsPort(Integer internalHttpsPort) { + this.internalHttpsPort = internalHttpsPort; + return this; + } + + /** + * Get is virtual IP mapping in use. + * + * @return the inUse value + */ + public Boolean inUse() { + return this.inUse; + } + + /** + * Set is virtual IP mapping in use. + * + * @param inUse the inUse value to set + * @return the VirtualIPMapping object itself. + */ + public VirtualIPMapping withInUse(Boolean inUse) { + this.inUse = inUse; + return this; + } + + /** + * Get name of the service that virtual IP is assigned to. + * + * @return the serviceName value + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set name of the service that virtual IP is assigned to. + * + * @param serviceName the serviceName value to set + * @return the VirtualIPMapping object itself. + */ + public VirtualIPMapping withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VirtualNetworkProfile.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VirtualNetworkProfile.java new file mode 100644 index 0000000000000..5ef2deb6b9b6e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 resource id of the Virtual Network. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource id of the Virtual Network. + * + * @param id the id value to set + * @return the VirtualNetworkProfile object itself. + */ + public VirtualNetworkProfile withId(String id) { + this.id = id; + return this; + } + + /** + * Get name of the Virtual Network (read-only). + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get resource type of the Virtual Network (read-only). + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get subnet within the Virtual Network. + * + * @return the subnet value + */ + public String subnet() { + return this.subnet; + } + + /** + * Set subnet within the Virtual Network. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VnetParameters.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VnetParameters.java new file mode 100644 index 0000000000000..1ae754c6251e1 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VnetParameters.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The required set of inputs to validate a VNET. + */ +@JsonFlatten +public class VnetParameters 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 Resource Group of the VNET to be validated. + * + * @return the vnetResourceGroup value + */ + public String vnetResourceGroup() { + return this.vnetResourceGroup; + } + + /** + * Set the Resource Group of the VNET to be validated. + * + * @param vnetResourceGroup the vnetResourceGroup value to set + * @return the VnetParameters object itself. + */ + public VnetParameters withVnetResourceGroup(String vnetResourceGroup) { + this.vnetResourceGroup = vnetResourceGroup; + return this; + } + + /** + * Get the name of the VNET to be validated. + * + * @return the vnetName value + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set the name of the VNET to be validated. + * + * @param vnetName the vnetName value to set + * @return the VnetParameters object itself. + */ + public VnetParameters withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get the subnet name to be validated. + * + * @return the vnetSubnetName value + */ + public String vnetSubnetName() { + return this.vnetSubnetName; + } + + /** + * Set the subnet name to be validated. + * + * @param vnetSubnetName the vnetSubnetName value to set + * @return the VnetParameters object itself. + */ + public VnetParameters withVnetSubnetName(String vnetSubnetName) { + this.vnetSubnetName = vnetSubnetName; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VnetRoute.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VnetRoute.java new file mode 100644 index 0000000000000..b4180d0bc9d6f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VnetRoute.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.VnetRouteInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; + +/** + * Type representing VnetRoute. + */ +public interface VnetRoute extends HasInner, Indexable, Updatable, HasManager { + /** + * @return the endAddress value. + */ + String endAddress(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the routeType value. + */ + RouteType routeType(); + + /** + * @return the startAddress value. + */ + String startAddress(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the VnetRoute definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithVirtualNetworkConnection, DefinitionStages.WithCreate { + } + + /** + * Grouping of VnetRoute definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a VnetRoute definition. + */ + interface Blank extends WithVirtualNetworkConnection { + } + + /** + * The stage of the vnetroute definition allowing to specify VirtualNetworkConnection. + */ + interface WithVirtualNetworkConnection { + /** + * Specifies resourceGroupName, name, vnetName. + * @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 + * @return the next definition stage + */ + WithCreate withExistingVirtualNetworkConnection(String resourceGroupName, String name, String vnetName); + } + + /** + * The stage of the vnetroute definition allowing to specify EndAddress. + */ + interface WithEndAddress { + /** + * Specifies endAddress. + * @param endAddress The ending address for this route. If the start address is specified in CIDR notation, this must be omitted + * @return the next definition stage + */ + WithCreate withEndAddress(String endAddress); + } + + /** + * The stage of the vnetroute definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the vnetroute definition allowing to specify RouteType. + */ + interface WithRouteType { + /** + * Specifies routeType. + * @param routeType 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' + * @return the next definition stage + */ + WithCreate withRouteType(RouteType routeType); + } + + /** + * The stage of the vnetroute definition allowing to specify StartAddress. + */ + interface WithStartAddress { + /** + * Specifies startAddress. + * @param startAddress The starting address for this route. This may also include a CIDR notation, in which case the end address must not be specified + * @return the next definition stage + */ + WithCreate withStartAddress(String startAddress); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithEndAddress, DefinitionStages.WithKind, DefinitionStages.WithRouteType, DefinitionStages.WithStartAddress { + } + } + /** + * The template for a VnetRoute update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithEndAddress, UpdateStages.WithKind, UpdateStages.WithRouteType, UpdateStages.WithStartAddress { + } + + /** + * Grouping of VnetRoute update stages. + */ + interface UpdateStages { + /** + * The stage of the vnetroute update allowing to specify EndAddress. + */ + interface WithEndAddress { + /** + * Specifies endAddress. + * @param endAddress The ending address for this route. If the start address is specified in CIDR notation, this must be omitted + * @return the next update stage + */ + Update withEndAddress(String endAddress); + } + + /** + * The stage of the vnetroute update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the vnetroute update allowing to specify RouteType. + */ + interface WithRouteType { + /** + * Specifies routeType. + * @param routeType 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' + * @return the next update stage + */ + Update withRouteType(RouteType routeType); + } + + /** + * The stage of the vnetroute update allowing to specify StartAddress. + */ + interface WithStartAddress { + /** + * Specifies startAddress. + * @param startAddress The starting address for this route. This may also include a CIDR notation, in which case the end address must not be specified + * @return the next update stage + */ + Update withStartAddress(String startAddress); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VnetValidationTestFailure.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/VnetValidationTestFailure.java new file mode 100644 index 0000000000000..da01d231cfd4f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 name of the test that failed. + * + * @return the testName value + */ + public String testName() { + return this.testName; + } + + /** + * Set the name of the test that failed. + * + * @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 of what caused the failure, e.g. the blocking rule name, etc. + * + * @return the details value + */ + public String details() { + return this.details; + } + + /** + * Set the details of what caused the failure, e.g. the blocking rule name, etc. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WebApps.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WebApps.java new file mode 100644 index 0000000000000..fd4877914a81a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WebApps.java @@ -0,0 +1,4471 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.Sites; +import rx.Completable; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.BackupRequestInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.StringDictionaryInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteConfigResourceInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.RestoreRequestInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.KeyInfoInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.RelayServiceConnectionEntityInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SwiftVirtualNetworkInner; +import com.microsoft.azure.management.appservice.v2019_08_01.BackupItem; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CsmPublishingCredentialsPoliciesEntityInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteAuthSettingsInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.AzureStoragePropertyDictionaryResourceInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.ConnectionStringDictionaryInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteLogsConfigInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.PushSettingsInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SlotConfigNamesResourceInner; +import com.microsoft.azure.management.appservice.v2019_08_01.Snapshot; +import com.microsoft.azure.management.appservice.v2019_08_01.ContinuousWebJob; +import com.microsoft.azure.management.appservice.v2019_08_01.Deployment; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.DeploymentInner; +import com.microsoft.azure.management.appservice.v2019_08_01.Identifier; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.IdentifierInner; +import com.microsoft.azure.management.appservice.v2019_08_01.FunctionEnvelope; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.FunctionEnvelopeInner; +import com.microsoft.azure.management.appservice.v2019_08_01.HostNameBinding; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.HostNameBindingInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.HybridConnectionInner; +import com.microsoft.azure.management.appservice.v2019_08_01.WebSiteInstanceStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.ProcessInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.ProcessModuleInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.ProcessThreadInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.PerfMonResponse; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.PremierAddOnInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.PrivateAccessInner; +import com.microsoft.azure.management.appservice.v2019_08_01.PublicCertificate; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.PublicCertificateInner; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteExtensionInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.Slots; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.SiteSourceControlInner; +import com.microsoft.azure.management.appservice.v2019_08_01.TriggeredWebJob; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteCsmUsageQuota; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteVnetInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.VnetInfoInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.VnetGatewayInner; +import com.microsoft.azure.management.appservice.v2019_08_01.WebJob; + +/** + * Type representing WebApps. + */ +public interface WebApps { + /** + * Begins definition for a new Site resource. + * @param name resource name. + * @return the first stage of the new Site definition. + */ + Sites.DefinitionStages.Blank defineSite(String name); + + /** + * Begins definition for a new Deployment resource. + * @param name resource name. + * @return the first stage of the new Deployment definition. + */ + Deployment.DefinitionStages.Blank defineDeployment(String name); + + /** + * Begins definition for a new DomainOwnershipIdentifier resource. + * @param name resource name. + * @return the first stage of the new DomainOwnershipIdentifier definition. + */ + Identifier.DefinitionStages.Blank defineDomainOwnershipIdentifier(String name); + + /** + * Begins definition for a new Function resource. + * @param name resource name. + * @return the first stage of the new Function definition. + */ + FunctionEnvelope.DefinitionStages.Blank defineFunction(String name); + + /** + * Begins definition for a new Key resource. + * @param name resource name. + * @return the first stage of the new Key definition. + */ + KeyInfo.DefinitionStages.Blank defineKey(String name); + + /** + * Begins definition for a new HostNameBinding resource. + * @param name resource name. + * @return the first stage of the new HostNameBinding definition. + */ + HostNameBinding.DefinitionStages.Blank defineHostNameBinding(String name); + + /** + * Begins definition for a new Relay resource. + * @param name resource name. + * @return the first stage of the new Relay definition. + */ + SiteHybridConnection.DefinitionStages.Blank defineRelay(String name); + + /** + * Begins definition for a new Premieraddon resource. + * @param name resource name. + * @return the first stage of the new Premieraddon definition. + */ + PremierAddOn.DefinitionStages.Blank definePremieraddon(String name); + + /** + * Begins definition for a new PublicCertificate resource. + * @param name resource name. + * @return the first stage of the new PublicCertificate definition. + */ + PublicCertificate.DefinitionStages.Blank definePublicCertificate(String name); + + /** + * Begins definition for a new Siteextension resource. + * @param name resource name. + * @return the first stage of the new Siteextension definition. + */ + SiteExtensionInfo.DefinitionStages.Blank defineSiteextension(String name); + + /** + * Begins definition for a new Slot resource. + * @param name resource name. + * @return the first stage of the new Slot definition. + */ + Slots.DefinitionStages.Blank defineSlot(String name); + + /** + * Begins definition for a new PrivateEndpointConnection resource. + * @param name resource name. + * @return the first stage of the new PrivateEndpointConnection definition. + */ + PrivateEndpointConnectionResource.DefinitionStages.Blank definePrivateEndpointConnection(String name); + + /** + * Begins definition for a new VirtualNetworkConnection resource. + * @param name resource name. + * @return the first stage of the new VirtualNetworkConnection definition. + */ + SiteVnetInfo.DefinitionStages.Blank defineVirtualNetworkConnection(String name); + + /** + * Begins definition for a new Gateway resource. + * @param name resource name. + * @return the first stage of the new Gateway definition. + */ + SiteVnetGateway.DefinitionStages.Blank defineGateway(String name); + + /** + * Gets the details of a web, mobile, or API app. + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName resource group name + * @param name resource name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getByResourceGroupAsync(String resourceGroupName, String name); + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Description for Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName resource group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByResourceGroupAsync(String resourceGroupName); + + /** + * Get all apps for a subscription. + * Description for Get all apps for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName resource group name + * @param name resource name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String name); + + /** + * Analyze a custom hostname. + * Description for 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 for the request + */ + Observable analyzeCustomHostnameAsync(String resourceGroupName, String name); + + /** + * Applies the configuration settings from the target slot onto the current slot. + * Description for 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 observable for the request + */ + Completable applySlotConfigToProductionAsync(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity); + + /** + * Creates a backup of an app. + * Description for 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 for the request + */ + Observable backupAsync(String resourceGroupName, String name, BackupRequestInner request); + + /** + * List the configurations of an app. + * Description for 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 for the request + */ + Observable listConfigurationsAsync(final String resourceGroupName, final String name); + + /** + * Updates the backup configuration of an app. + * Description for 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 for the request + */ + Observable updateBackupConfigurationAsync(String resourceGroupName, String name, BackupRequestInner request); + + /** + * Deletes the backup configuration of an app. + * Description for 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 observable for the request + */ + Completable deleteBackupConfigurationAsync(String resourceGroupName, String name); + + /** + * Gets the backup configuration of an app. + * Description for 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 for the request + */ + Observable getBackupConfigurationAsync(String resourceGroupName, String name); + + /** + * Replaces the metadata of an app. + * Description for 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 for the request + */ + Observable updateMetadataAsync(String resourceGroupName, String name, StringDictionaryInner metadata); + + /** + * Gets the metadata of an app. + * Description for 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 for the request + */ + Observable listMetadataAsync(String resourceGroupName, String name); + + /** + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * Description for 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 for the request + */ + Observable getConfigurationAsync(String resourceGroupName, String name); + + /** + * Updates the configuration of an app. + * Description for 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 for the request + */ + Observable createOrUpdateConfigurationAsync(String resourceGroupName, String name, SiteConfigResourceInner siteConfig); + + /** + * Updates the configuration of an app. + * Description for 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 for the request + */ + Observable updateConfigurationAsync(String resourceGroupName, String name, SiteConfigResourceInner siteConfig); + + /** + * Gets the last lines of docker logs for the given site. + * Description for 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 for the request + */ + Observable getWebSiteContainerLogsAsync(String resourceGroupName, String name); + + /** + * Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * + * @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 for the request + */ + Observable discoverBackupAsync(String resourceGroupName, String name, RestoreRequestInner request); + + /** + * Fetch a short lived token that can be exchanged for a master key. + * Description for 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 for the request + */ + Observable getFunctionsAdminTokenAsync(String resourceGroupName, String name); + + /** + * Get host secrets for a function app. + * Description for Get host secrets for a function app. + * + * @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 for the request + */ + Observable listHostKeysAsync(String resourceGroupName, String name); + + /** + * This is to allow calling via powershell and ARM template. + * Description for 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 for the request + */ + Completable listSyncStatusAsync(String resourceGroupName, String name); + + /** + * Syncs function trigger metadata to the management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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 + */ + Completable syncFunctionsAsync(String resourceGroupName, String name); + + /** + * Add or update a host level secret. + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param key The key to create or update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable createOrUpdateHostSecretAsync(String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key); + + /** + * Delete a host level secret. + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteHostSecretAsync(String resourceGroupName, String name, String keyType, String keyName); + + /** + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * Description for 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 for the request + */ + Observable listRelayServiceConnectionsAsync(String resourceGroupName, String name); + + /** + * Gets a hybrid connection configuration by its name. + * Description for 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 for the request + */ + Observable getRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName); + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Description for 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 for the request + */ + Observable createOrUpdateRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope); + + /** + * Deletes a relay service connection by its name. + * Description for 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 observable for the request + */ + Completable deleteRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName); + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Description for 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 for the request + */ + Observable updateRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope); + + /** + * Shows whether an app can be cloned to another resource group or subscription. + * Description for 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 for the request + */ + Observable isCloneableAsync(String resourceGroupName, String name); + + /** + * Gets existing backups of an app. + * Description for 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 for the request + */ + Observable listSiteBackupsAsync(final String resourceGroupName, final String name); + + /** + * This is to allow calling via powershell and ARM template. + * Description for 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 for the request + */ + Observable listSyncFunctionTriggersAsync(String resourceGroupName, String name); + + /** + * Restores a web app. + * Description for 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 + */ + Observable migrateStorageAsync(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptions migrationOptions); + + /** + * Migrates a local (in-app) MySql database to a remote MySql database. + * Description for 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 + */ + Observable migrateMySqlAsync(String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope); + + /** + * Gets a Swift Virtual Network connection. + * Description for Gets a Swift Virtual Network connection. + * + * @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 + */ + Observable getSwiftVirtualNetworkConnectionAsync(String resourceGroupName, String name); + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable createOrUpdateSwiftVirtualNetworkConnectionAsync(String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope); + + /** + * Deletes a Swift Virtual Network connection from an app (or deployment slot). + * Description for Deletes a Swift Virtual Network connection from an app (or 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 for the request + */ + Completable deleteSwiftVirtualNetworkAsync(String resourceGroupName, String name); + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable updateSwiftVirtualNetworkConnectionAsync(String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope); + + /** + * Start capturing network packets for the site (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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 for the request + */ + Observable startWebSiteNetworkTraceAsync(String resourceGroupName, String name); + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + Observable startWebSiteNetworkTraceOperationAsync(String resourceGroupName, String name); + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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 for the request + */ + Completable stopWebSiteNetworkTraceAsync(String resourceGroupName, String name); + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getNetworkTracesAsync(String resourceGroupName, String name, String operationId); + + /** + * Generates a new publishing password for an app (or deployment slot, if specified). + * Description for 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 observable for the request + */ + Completable generateNewSitePublishingPasswordAsync(String resourceGroupName, String name); + + /** + * Gets web app's event logs. + * Description for 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 for the request + */ + Observable getSitePhpErrorLogFlagAsync(String resourceGroupName, String name); + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable getProcessDumpAsync(String resourceGroupName, String name, String processId); + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Description for 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 publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listPublishingProfileXmlWithSecretsAsync(String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions); + + /** + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * Description for 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 observable for the request + */ + Completable resetProductionSlotConfigAsync(String resourceGroupName, String name); + + /** + * Restarts an app (or deployment slot, if specified). + * Description for 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 observable for the request + */ + Completable restartAsync(String resourceGroupName, String name); + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable restoreFromBackupBlobAsync(String resourceGroupName, String name, RestoreRequestInner request); + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable restoreFromDeletedAppAsync(String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest); + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. 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 + */ + Completable restoreSnapshotAsync(String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest); + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable copyProductionSlotAsync(String resourceGroupName, String name, CsmCopySlotEntity copySlotEntity); + + /** + * Get the difference in configuration settings between two web app slots. + * Description for 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 for the request + */ + Observable listSlotDifferencesFromProductionAsync(final String resourceGroupName, final String name, final CsmSlotEntity slotSwapEntity); + + /** + * Swaps two deployment slots of an app. + * Description for 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 + */ + Completable swapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity); + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @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 for the request + */ + Observable listSnapshotsFromDRSecondaryAsync(final String resourceGroupName, final String name); + + /** + * Starts an app (or deployment slot, if specified). + * Description for 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 observable for the request + */ + Completable startAsync(String resourceGroupName, String name); + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + Observable startNetworkTraceAsync(String resourceGroupName, String name); + + /** + * Stops an app (or deployment slot, if specified). + * Description for 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 observable for the request + */ + Completable stopAsync(String resourceGroupName, String name); + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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 for the request + */ + Completable stopNetworkTraceAsync(String resourceGroupName, String name); + + /** + * Sync web app repository. + * Description for 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 observable for the request + */ + Completable syncRepositoryAsync(String resourceGroupName, String name); + + /** + * Syncs function trigger metadata to the management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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 + */ + Completable syncFunctionTriggersAsync(String resourceGroupName, String name); + + /** + * Gets a backup of an app by its ID. + * Description for 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 for the request + */ + Observable getBackupStatusAsync(String resourceGroupName, String name, String backupId); + + /** + * Gets existing backups of an app. + * Description for 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 for the request + */ + Observable listBackupsAsync(final String resourceGroupName, final String name); + + /** + * Deletes a backup of an app by its ID. + * Description for 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 observable for the request + */ + Completable deleteBackupAsync(String resourceGroupName, String name, String backupId); + + /** + * 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. + * Description for 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 for the request + */ + Observable listBackupStatusSecretsAsync(String resourceGroupName, String name, String backupId, BackupRequestInner request); + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Description for 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 + */ + Completable restoreAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request); + + /** + * Gets existing backups of an app. + * Description for 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 for the request + */ + Observable listBackupsSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Gets a backup of an app by its ID. + * Description for 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 for the request + */ + Observable getBackupStatusSlotAsync(String resourceGroupName, String name, String backupId, String slot); + + /** + * Deletes a backup of an app by its ID. + * Description for 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 observable for the request + */ + Completable deleteBackupSlotAsync(String resourceGroupName, String name, String backupId, String slot); + + /** + * 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. + * Description for 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 for the request + */ + Observable listBackupStatusSecretsSlotAsync(String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request); + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Description for 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 + */ + Completable restoreSlotAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request); + + /** + * Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @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 + */ + Observable getBasicPublishingCredentialsPoliciesAsync(String resourceGroupName, String name); + + /** + * Returns whether FTP is allowed on the site or not. + * Description for Returns whether FTP is allowed on the site or not. + * + * @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 + */ + Observable getFtpAllowedAsync(String resourceGroupName, String name); + + /** + * Updates whether FTP is allowed on the site or not. + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity the CsmPublishingCredentialsPoliciesEntityInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable updateFtpAllowedAsync(String resourceGroupName, String name, CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity); + + /** + * Returns whether Scm basic auth is allowed on the site or not. + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @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 + */ + Observable getScmAllowedAsync(String resourceGroupName, String name); + + /** + * Updates whether user publishing credentials are allowed on the site or not. + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity the CsmPublishingCredentialsPoliciesEntityInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable updateScmAllowedAsync(String resourceGroupName, String name, CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity); + + /** + * Replaces the application settings of an app. + * Description for 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 for the request + */ + Observable updateApplicationSettingsAsync(String resourceGroupName, String name, StringDictionaryInner appSettings); + + /** + * Gets the application settings of an app. + * Description for 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 for the request + */ + Observable listApplicationSettingsAsync(String resourceGroupName, String name); + + /** + * Gets the config reference app settings and status of an app. + * Description for Gets the config reference app settings and status 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 + */ + Observable getAppSettingsKeyVaultReferencesAsync(String resourceGroupName, String name); + + /** + * Gets the config reference and status of an app. + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAppSettingKeyVaultReferenceAsync(String resourceGroupName, String name, String appSettingKey); + + /** + * Replaces the application settings of an app. + * Description for 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 for the request + */ + Observable updateApplicationSettingsSlotAsync(String resourceGroupName, String name, String slot, StringDictionaryInner appSettings); + + /** + * Gets the application settings of an app. + * Description for 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 for the request + */ + Observable listApplicationSettingsSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Updates the Authentication / Authorization settings associated with web app. + * Description for 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 for the request + */ + Observable updateAuthSettingsAsync(String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings); + + /** + * Gets the Authentication/Authorization settings of an app. + * Description for 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 for the request + */ + Observable getAuthSettingsAsync(String resourceGroupName, String name); + + /** + * Updates the Authentication / Authorization settings associated with web app. + * Description for 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 for the request + */ + Observable updateAuthSettingsSlotAsync(String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings); + + /** + * Gets the Authentication/Authorization settings of an app. + * Description for 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 for the request + */ + Observable getAuthSettingsSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Updates the Azure storage account configurations of an app. + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable updateAzureStorageAccountsAsync(String resourceGroupName, String name, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts); + + /** + * Gets the Azure storage account configurations of an app. + * Description for Gets the Azure storage account 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 for the request + */ + Observable listAzureStorageAccountsAsync(String resourceGroupName, String name); + + /** + * Updates the Azure storage account configurations of an app. + * Description for Updates the Azure storage account 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 update the Azure storage account configurations for the production slot. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable updateAzureStorageAccountsSlotAsync(String resourceGroupName, String name, String slot, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts); + + /** + * Gets the Azure storage account configurations of an app. + * Description for Gets the Azure storage account 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 update the Azure storage account configurations for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAzureStorageAccountsSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Replaces the connection strings of an app. + * Description for 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 for the request + */ + Observable updateConnectionStringsAsync(String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings); + + /** + * Gets the connection strings of an app. + * Description for 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 for the request + */ + Observable listConnectionStringsAsync(String resourceGroupName, String name); + + /** + * Replaces the connection strings of an app. + * Description for 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 for the request + */ + Observable updateConnectionStringsSlotAsync(String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings); + + /** + * Gets the connection strings of an app. + * Description for 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 for the request + */ + Observable listConnectionStringsSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Gets the logging configuration of an app. + * Description for 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 for the request + */ + Observable getDiagnosticLogsConfigurationAsync(String resourceGroupName, String name); + + /** + * Updates the logging configuration of an app. + * Description for 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 for the request + */ + Observable updateDiagnosticLogsConfigAsync(String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig); + + /** + * Gets the logging configuration of an app. + * Description for 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 for the request + */ + Observable getDiagnosticLogsConfigurationSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Updates the logging configuration of an app. + * Description for 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 for the request + */ + Observable updateDiagnosticLogsConfigSlotAsync(String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig); + + /** + * Gets the Git/FTP publishing credentials of an app. + * Description for 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 + */ + Observable listPublishingCredentialsAsync(String resourceGroupName, String name); + + /** + * Gets the Git/FTP publishing credentials of an app. + * Description for 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 + */ + Observable listPublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Updates the Push settings associated with web app. + * Description for 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 for the request + */ + Observable updateSitePushSettingsAsync(String resourceGroupName, String name, PushSettingsInner pushSettings); + + /** + * Gets the Push settings associated with web app. + * Description for 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 for the request + */ + Observable listSitePushSettingsAsync(String resourceGroupName, String name); + + /** + * Updates the Push settings associated with web app. + * Description for 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 for the request + */ + Observable updateSitePushSettingsSlotAsync(String resourceGroupName, String name, String slot, PushSettingsInner pushSettings); + + /** + * Gets the Push settings associated with web app. + * Description for 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 for the request + */ + Observable listSitePushSettingsSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Gets the names of app settings and connection strings that stick to the slot (not swapped). + * Description for 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 for the request + */ + Observable listSlotConfigurationNamesAsync(String resourceGroupName, String name); + + /** + * Updates the names of application settings and connection string that remain with the slot during swap operation. + * Description for 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 for the request + */ + Observable updateSlotConfigurationNamesAsync(String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames); + + /** + * Returns all Snapshots to the user. + * Description for 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 for the request + */ + Observable listSnapshotsAsync(final String resourceGroupName, final String name); + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Description for 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 for the request + */ + Observable listConfigurationSnapshotInfoAsync(final String resourceGroupName, final String name); + + /** + * Gets a snapshot of the configuration of an app at a previous point in time. + * Description for 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 for the request + */ + Observable getConfigurationSnapshotAsync(String resourceGroupName, String name, String snapshotId); + + /** + * Reverts the configuration of an app to a previous snapshot. + * Description for 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 observable for the request + */ + Completable recoverSiteConfigurationSnapshotAsync(String resourceGroupName, String name, String snapshotId); + + /** + * Gets a list of web app configuration snapshots identifiers. Each element of the list contains a timestamp and the ID of the snapshot. + * Description for 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 for the request + */ + Observable listConfigurationSnapshotInfoSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Gets a snapshot of the configuration of an app at a previous point in time. + * Description for 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 for the request + */ + Observable getConfigurationSnapshotSlotAsync(String resourceGroupName, String name, String snapshotId, String slot); + + /** + * Reverts the configuration of an app to a previous snapshot. + * Description for 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 observable for the request + */ + Completable recoverSiteConfigurationSnapshotSlotAsync(String resourceGroupName, String name, String snapshotId, String slot); + + /** + * Returns all Snapshots to the user. + * Description for 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 for the request + */ + Observable listSnapshotsSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Gets the ZIP archived docker log files for the given site. + * Description for 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 for the request + */ + Observable getContainerLogsZipAsync(String resourceGroupName, String name); + + /** + * Gets the ZIP archived docker log files for the given site. + * Description for 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 for the request + */ + Observable getContainerLogsZipSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Gets a continuous web job by its ID for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable getContinuousWebJobAsync(String resourceGroupName, String name, String webJobName); + + /** + * List continuous web jobs for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable listContinuousWebJobsAsync(final String resourceGroupName, final String name); + + /** + * Delete a continuous web job by its ID for an app, or a deployment slot. + * Description for 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 observable for the request + */ + Completable deleteContinuousWebJobAsync(String resourceGroupName, String name, String webJobName); + + /** + * Start a continuous web job for an app, or a deployment slot. + * Description for 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 observable for the request + */ + Completable startContinuousWebJobAsync(String resourceGroupName, String name, String webJobName); + + /** + * Stop a continuous web job for an app, or a deployment slot. + * Description for 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 observable for the request + */ + Completable stopContinuousWebJobAsync(String resourceGroupName, String name, String webJobName); + + /** + * List continuous web jobs for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable listContinuousWebJobsSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Gets a continuous web job by its ID for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable getContinuousWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Delete a continuous web job by its ID for an app, or a deployment slot. + * Description for 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 observable for the request + */ + Completable deleteContinuousWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Start a continuous web job for an app, or a deployment slot. + * Description for 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 observable for the request + */ + Completable startContinuousWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Stop a continuous web job for an app, or a deployment slot. + * Description for 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 observable for the request + */ + Completable stopContinuousWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Get a deployment by its ID for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable getDeploymentAsync(String resourceGroupName, String name, String id); + + /** + * List deployments for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable listDeploymentsAsync(final String resourceGroupName, final String name); + + /** + * Delete a deployment by its ID for an app, or a deployment slot. + * Description for 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 observable for the request + */ + Completable deleteDeploymentAsync(String resourceGroupName, String name, String id); + + /** + * List deployment log for specific deployment for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable listDeploymentLogAsync(String resourceGroupName, String name, String id); + + /** + * List deployments for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable listDeploymentsSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Get a deployment by its ID for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable getDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot); + + /** + * Create a deployment for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable createDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, DeploymentInner deployment); + + /** + * Delete a deployment by its ID for an app, or a deployment slot. + * Description for 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 observable for the request + */ + Completable deleteDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot); + + /** + * List deployment log for specific deployment for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable listDeploymentLogSlotAsync(String resourceGroupName, String name, String id, String slot); + + /** + * Get domain ownership identifier for web app. + * Description for 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 for the request + */ + Observable getDomainOwnershipIdentifierAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName); + + /** + * Lists ownership identifiers for domain associated with web app. + * Description for 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 for the request + */ + Observable listDomainOwnershipIdentifiersAsync(final String resourceGroupName, final String name); + + /** + * Deletes a domain ownership identifier for a web app. + * Description for 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 observable for the request + */ + Completable deleteDomainOwnershipIdentifierAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName); + + /** + * Lists ownership identifiers for domain associated with web app. + * Description for 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 for the request + */ + Observable listDomainOwnershipIdentifiersSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Get domain ownership identifier for web app. + * Description for 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 for the request + */ + Observable getDomainOwnershipIdentifierSlotAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot); + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Description for 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 for the request + */ + Observable createOrUpdateDomainOwnershipIdentifierSlotAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, IdentifierInner domainOwnershipIdentifier); + + /** + * Deletes a domain ownership identifier for a web app. + * Description for 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 observable for the request + */ + Completable deleteDomainOwnershipIdentifierSlotAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot); + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Description for 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 for the request + */ + Observable updateDomainOwnershipIdentifierSlotAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, IdentifierInner domainOwnershipIdentifier); + + /** + * Get the status of the last MSDeploy operation. + * Description for 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 for the request + */ + Observable getMSDeployStatusAsync(String resourceGroupName, String name); + + /** + * Invoke the MSDeploy web app extension. + * Description for 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 + */ + Observable createMSDeployOperationAsync(String resourceGroupName, String name, MSDeploy mSDeploy); + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Description for 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 for the request + */ + Observable getMSDeployLogAsync(String resourceGroupName, String name); + + /** + * Get the status of the last MSDeploy operation. + * Description for 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 for the request + */ + Observable getInstanceMsDeployStatusAsync(String resourceGroupName, String name, String instanceId); + + /** + * Invoke the MSDeploy web app extension. + * Description for 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 + */ + Observable createInstanceMSDeployOperationAsync(String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy); + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Description for 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 for the request + */ + Observable getInstanceMSDeployLogAsync(String resourceGroupName, String name, String instanceId); + + /** + * Get the status of the last MSDeploy operation. + * Description for 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 for the request + */ + Observable getMSDeployStatusSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Invoke the MSDeploy web app extension. + * Description for 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 + */ + Observable createMSDeployOperationSlotAsync(String resourceGroupName, String name, String slot, MSDeploy mSDeploy); + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Description for 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 for the request + */ + Observable getMSDeployLogSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Get the status of the last MSDeploy operation. + * Description for 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 for the request + */ + Observable getInstanceMsDeployStatusSlotAsync(String resourceGroupName, String name, String slot, String instanceId); + + /** + * Invoke the MSDeploy web app extension. + * Description for 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 + */ + Observable createInstanceMSDeployOperationSlotAsync(String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy); + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Description for 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 for the request + */ + Observable getInstanceMSDeployLogSlotAsync(String resourceGroupName, String name, String slot, String instanceId); + + /** + * Get function information by its ID for web site, or a deployment slot. + * Description for 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 for the request + */ + Observable getFunctionAsync(String resourceGroupName, String name, String functionName); + + /** + * List the functions for a web site, or a deployment slot. + * Description for 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 for the request + */ + Observable listFunctionsAsync(final String resourceGroupName, final String name); + + /** + * Delete a function for web site, or a deployment slot. + * Description for 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 observable for the request + */ + Completable deleteFunctionAsync(String resourceGroupName, String name, String functionName); + + /** + * Get function keys for a function in a web site, or a deployment slot. + * Description for Get function keys 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 for the request + */ + Observable listFunctionKeysAsync(String resourceGroupName, String name, String functionName); + + /** + * Get function secrets for a function in a web site, or a deployment slot. + * Description for 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 for the request + */ + Observable listFunctionSecretsAsync(String resourceGroupName, String name, String functionName); + + /** + * List the functions for a web site, or a deployment slot. + * Description for 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listInstanceFunctionsSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Get function information by its ID for web site, or a deployment slot. + * Description for 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getInstanceFunctionSlotAsync(String resourceGroupName, String name, String functionName, String slot); + + /** + * Create function for web site, or a deployment slot. + * Description for 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. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable createInstanceFunctionSlotAsync(String resourceGroupName, String name, String functionName, String slot, FunctionEnvelopeInner functionEnvelope); + + /** + * Delete a function for web site, or a deployment slot. + * Description for 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteInstanceFunctionSlotAsync(String resourceGroupName, String name, String functionName, String slot); + + /** + * Get function keys for a function in a web site, or a deployment slot. + * Description for Get function keys 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listFunctionKeysSlotAsync(String resourceGroupName, String name, String functionName, String slot); + + /** + * Get function secrets for a function in a web site, or a deployment slot. + * Description for 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listFunctionSecretsSlotAsync(String resourceGroupName, String name, String functionName, String slot); + + /** + * Delete a function secret. + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteFunctionSecretAsync(String resourceGroupName, String name, String functionName, String keyName); + + /** + * Add or update a function secret. + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable createOrUpdateFunctionSecretSlotAsync(String resourceGroupName, String name, String functionName, String keyName, String slot, KeyInfoInner key); + + /** + * Delete a function secret. + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteFunctionSecretSlotAsync(String resourceGroupName, String name, String functionName, String keyName, String slot); + + /** + * Get the named hostname binding for an app (or deployment slot, if specified). + * Description for 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 for the request + */ + Observable getHostNameBindingAsync(String resourceGroupName, String name, String hostName); + + /** + * Get hostname bindings for an app or a deployment slot. + * Description for 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 for the request + */ + Observable listHostNameBindingsAsync(final String resourceGroupName, final String name); + + /** + * Deletes a hostname binding for an app. + * Description for 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 observable for the request + */ + Completable deleteHostNameBindingAsync(String resourceGroupName, String name, String hostName); + + /** + * Get hostname bindings for an app or a deployment slot. + * Description for 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 for the request + */ + Observable listHostNameBindingsSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Get the named hostname binding for an app (or deployment slot, if specified). + * Description for 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 for the request + */ + Observable getHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName); + + /** + * Creates a hostname binding for an app. + * Description for 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 for the request + */ + Observable createOrUpdateHostNameBindingSlotAsync(String resourceGroupName, String name, String hostName, String slot, HostNameBindingInner hostNameBinding); + + /** + * Deletes a hostname binding for an app. + * Description for 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 observable for the request + */ + Completable deleteHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName); + + /** + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * Description for 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 for the request + */ + Observable getHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Removes a Hybrid Connection from this site. + * Description for 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 observable for the request + */ + Completable deleteHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * Description for 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 for the request + */ + Observable getHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot); + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Description for 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 for the request + */ + Observable createOrUpdateHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, HybridConnectionInner connectionEnvelope); + + /** + * Removes a Hybrid Connection from this site. + * Description for 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 observable for the request + */ + Completable deleteHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot); + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Description for 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 for the request + */ + Observable updateHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, HybridConnectionInner connectionEnvelope); + + /** + * Retrieves all Service Bus Hybrid Connections used by this Web App. + * Description for 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 for the request + */ + Observable listHybridConnectionsAsync(String resourceGroupName, String name); + + /** + * Retrieves all Service Bus Hybrid Connections used by this Web App. + * Description for 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 for the request + */ + Observable listHybridConnectionsSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Gets all scale-out instances of an app. + * Description for 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 instanceId the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getInstanceInfoAsync(String resourceGroupName, String name, String instanceId); + + /** + * Gets all scale-out instances of an app. + * Description for 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 for the request + */ + Observable listInstanceIdentifiersAsync(final String resourceGroupName, final String name); + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable getInstanceProcessDumpAsync(String resourceGroupName, String name, String processId, String instanceId); + + /** + * Gets all scale-out instances of an app. + * Description for 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 for the request + */ + Observable listInstanceIdentifiersSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Gets all scale-out instances of an app. + * Description for 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 instanceId the String value + * @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 for the request + */ + Observable getInstanceInfoSlotAsync(String resourceGroupName, String name, String instanceId, String slot); + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable getInstanceProcessDumpSlotAsync(String resourceGroupName, String name, String processId, String slot, String instanceId); + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable getInstanceProcessAsync(String resourceGroupName, String name, String processId, String instanceId); + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable listInstanceProcessesAsync(final String resourceGroupName, final String name, final String instanceId); + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Description for 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 observable for the request + */ + Completable deleteInstanceProcessAsync(String resourceGroupName, String name, String processId, String instanceId); + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable listProcessesAsync(final String resourceGroupName, final String name); + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable getProcessAsync(String resourceGroupName, String name, String processId); + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Description for 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 observable for the request + */ + Completable deleteProcessAsync(String resourceGroupName, String name, String processId); + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable listInstanceProcessesSlotAsync(final String resourceGroupName, final String name, final String slot, final String instanceId); + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable getInstanceProcessSlotAsync(String resourceGroupName, String name, String processId, String slot, String instanceId); + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Description for 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 observable for the request + */ + Completable deleteInstanceProcessSlotAsync(String resourceGroupName, String name, String processId, String slot, String instanceId); + + /** + * Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable listProcessesSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable getProcessSlotAsync(String resourceGroupName, String name, String processId, String slot); + + /** + * Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in a web site. + * Description for 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 observable for the request + */ + Completable deleteProcessSlotAsync(String resourceGroupName, String name, String processId, String slot); + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable getInstanceProcessModuleAsync(String resourceGroupName, String name, String processId, String baseAddress, String instanceId); + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable listInstanceProcessModulesAsync(final String resourceGroupName, final String name, final String processId, final String instanceId); + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable listProcessModulesAsync(final String resourceGroupName, final String name, final String processId); + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable getProcessModuleAsync(String resourceGroupName, String name, String processId, String baseAddress); + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable listInstanceProcessModulesSlotAsync(final String resourceGroupName, final String name, final String processId, final String slot, final String instanceId); + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable getInstanceProcessModuleSlotAsync(String resourceGroupName, String name, String processId, String baseAddress, String slot, String instanceId); + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable listProcessModulesSlotAsync(final String resourceGroupName, final String name, final String processId, final String slot); + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable getProcessModuleSlotAsync(String resourceGroupName, String name, String processId, String baseAddress, String slot); + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable listInstanceProcessThreadsAsync(final String resourceGroupName, final String name, final String processId, final String instanceId); + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable listProcessThreadsAsync(final String resourceGroupName, final String name, final String processId); + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable listInstanceProcessThreadsSlotAsync(final String resourceGroupName, final String name, final String processId, final String slot, final String instanceId); + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable listProcessThreadsSlotAsync(final String resourceGroupName, final String name, final String processId, final String slot); + + /** + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * Description for 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 for the request + */ + Observable getMigrateMySqlStatusAsync(String resourceGroupName, String name); + + /** + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * Description for 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 for the request + */ + Observable getMigrateMySqlStatusSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Gets all network features used by the app (or deployment slot, if specified). + * Description for 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 for the request + */ + Observable listNetworkFeaturesAsync(String resourceGroupName, String name, String view); + + /** + * Gets all network features used by the app (or deployment slot, if specified). + * Description for 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 for the request + */ + Observable listNetworkFeaturesSlotAsync(String resourceGroupName, String name, String view, String slot); + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getNetworkTraceOperationAsync(String resourceGroupName, String name, String operationId); + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getNetworkTraceOperationV2Async(String resourceGroupName, String name, String operationId); + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getNetworkTraceOperationSlotAsync(String resourceGroupName, String name, String operationId, String slot); + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getNetworkTraceOperationSlotV2Async(String resourceGroupName, String name, String operationId, String slot); + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getNetworkTracesV2Async(String resourceGroupName, String name, String operationId); + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getNetworkTracesSlotV2Async(String resourceGroupName, String name, String operationId, String slot); + + /** + * Gets perfmon counters for web app. + * Description for 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 for the request + */ + Observable listPerfMonCountersAsync(final String resourceGroupName, final String name); + + /** + * Gets perfmon counters for web app. + * Description for 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 for the request + */ + Observable listPerfMonCountersSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Gets a named add-on of an app. + * Description for 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 for the request + */ + Observable getPremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName); + + /** + * Delete a premier add-on from an app. + * Description for 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 observable for the request + */ + Completable deletePremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName); + + /** + * Gets the premier add-ons of an app. + * Description for 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 for the request + */ + Observable listPremierAddOnsAsync(String resourceGroupName, String name); + + /** + * Gets the premier add-ons of an app. + * Description for 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 for the request + */ + Observable listPremierAddOnsSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Gets a named add-on of an app. + * Description for 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 for the request + */ + Observable getPremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot); + + /** + * Updates a named add-on of an app. + * Description for 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 for the request + */ + Observable addPremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnInner premierAddOn); + + /** + * Delete a premier add-on from an app. + * Description for 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 observable for the request + */ + Completable deletePremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot); + + /** + * Updates a named add-on of an app. + * Description for 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 for the request + */ + Observable updatePremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnPatchResource premierAddOn); + + /** + * Gets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access 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 for the request + */ + Observable getPrivateAccessAsync(String resourceGroupName, String name); + + /** + * Sets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param access The information for the private access + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable putPrivateAccessVnetAsync(String resourceGroupName, String name, PrivateAccessInner access); + + /** + * Gets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access 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 the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getPrivateAccessSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Sets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access 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 the web app. + * @param access The information for the private access + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable putPrivateAccessVnetSlotAsync(String resourceGroupName, String name, String slot, PrivateAccessInner access); + + /** + * Get the named public certificate for an app (or deployment slot, if specified). + * Description for 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 for the request + */ + Observable getPublicCertificateAsync(String resourceGroupName, String name, String publicCertificateName); + + /** + * Get public certificates for an app or a deployment slot. + * Description for 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 for the request + */ + Observable listPublicCertificatesAsync(final String resourceGroupName, final String name); + + /** + * Deletes a hostname binding for an app. + * Description for 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 observable for the request + */ + Completable deletePublicCertificateAsync(String resourceGroupName, String name, String publicCertificateName); + + /** + * Get public certificates for an app or a deployment slot. + * Description for 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 for the request + */ + Observable listPublicCertificatesSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Get the named public certificate for an app (or deployment slot, if specified). + * Description for 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 for the request + */ + Observable getPublicCertificateSlotAsync(String resourceGroupName, String name, String slot, String publicCertificateName); + + /** + * Creates a hostname binding for an app. + * Description for 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 for the request + */ + Observable createOrUpdatePublicCertificateSlotAsync(String resourceGroupName, String name, String publicCertificateName, String slot, PublicCertificateInner publicCertificate); + + /** + * Deletes a hostname binding for an app. + * Description for 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 observable for the request + */ + Completable deletePublicCertificateSlotAsync(String resourceGroupName, String name, String slot, String publicCertificateName); + + /** + * Get site extension information by its ID for a web site, or a deployment slot. + * Description for 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 for the request + */ + Observable getSiteExtensionAsync(String resourceGroupName, String name, String siteExtensionId); + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Description for 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 for the request + */ + Observable listSiteExtensionsAsync(final String resourceGroupName, final String name); + + /** + * Remove a site extension from a web site, or a deployment slot. + * Description for 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 observable for the request + */ + Completable deleteSiteExtensionAsync(String resourceGroupName, String name, String siteExtensionId); + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Description for 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 uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listSiteExtensionsSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Get site extension information by its ID for a web site, or a deployment slot. + * Description for 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 uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getSiteExtensionSlotAsync(String resourceGroupName, String name, String siteExtensionId, String slot); + + /** + * Install site extension on a web site, or a deployment slot. + * Description for 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 uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable installSiteExtensionSlotAsync(String resourceGroupName, String name, String siteExtensionId, String slot); + + /** + * Remove a site extension from a web site, or a deployment slot. + * Description for 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 observable for the request + */ + Completable deleteSiteExtensionSlotAsync(String resourceGroupName, String name, String siteExtensionId, String slot); + + /** + * Gets the details of a web, mobile, or API app. + * Description for 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 for the request + */ + Observable getSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Gets an app's deployment slots. + * Description for 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 for the request + */ + Observable listSlotsAsync(final String resourceGroupName, final String name); + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Description for 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 observable for the request + */ + Completable deleteSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Analyze a custom hostname. + * Description for 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 for the request + */ + Observable analyzeCustomHostnameSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Applies the configuration settings from the target slot onto the current slot. + * Description for 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 observable for the request + */ + Completable applySlotConfigurationSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity); + + /** + * Creates a backup of an app. + * Description for 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 for the request + */ + Observable backupSlotAsync(String resourceGroupName, String name, String slot, BackupRequestInner request); + + /** + * List the configurations of an app. + * Description for 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 for the request + */ + Observable listConfigurationsSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Updates the backup configuration of an app. + * Description for 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 for the request + */ + Observable updateBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot, BackupRequestInner request); + + /** + * Deletes the backup configuration of an app. + * Description for 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 observable for the request + */ + Completable deleteBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Gets the backup configuration of an app. + * Description for 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 for the request + */ + Observable getBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Replaces the metadata of an app. + * Description for 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 for the request + */ + Observable updateMetadataSlotAsync(String resourceGroupName, String name, String slot, StringDictionaryInner metadata); + + /** + * Gets the metadata of an app. + * Description for 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 for the request + */ + Observable listMetadataSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * Description for 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 for the request + */ + Observable getConfigurationSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Updates the configuration of an app. + * Description for 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 for the request + */ + Observable createOrUpdateConfigurationSlotAsync(String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig); + + /** + * Updates the configuration of an app. + * Description for 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 for the request + */ + Observable updateConfigurationSlotAsync(String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig); + + /** + * Gets the last lines of docker logs for the given site. + * Description for 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 for the request + */ + Observable getWebSiteContainerLogsSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * + * @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 for the request + */ + Observable discoverBackupSlotAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request); + + /** + * Fetch a short lived token that can be exchanged for a master key. + * Description for 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 for the request + */ + Observable getFunctionsAdminTokenSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Get host secrets for a function app. + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listHostKeysSlotAsync(String resourceGroupName, String name, String slot); + + /** + * This is to allow calling via powershell and ARM template. + * Description for 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable listSyncStatusSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Syncs function trigger metadata to the management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable syncFunctionsSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Add or update a host level secret. + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable createOrUpdateHostSecretSlotAsync(String resourceGroupName, String name, String keyType, String keyName, String slot, KeyInfoInner key); + + /** + * Delete a host level secret. + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteHostSecretSlotAsync(String resourceGroupName, String name, String keyType, String keyName, String slot); + + /** + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * Description for 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 for the request + */ + Observable listRelayServiceConnectionsSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Gets a hybrid connection configuration by its name. + * Description for 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 for the request + */ + Observable getRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot); + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Description for 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 for the request + */ + Observable createOrUpdateRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope); + + /** + * Deletes a relay service connection by its name. + * Description for 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 observable for the request + */ + Completable deleteRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot); + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Description for 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 for the request + */ + Observable updateRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope); + + /** + * Shows whether an app can be cloned to another resource group or subscription. + * Description for 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 for the request + */ + Observable isCloneableSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Gets existing backups of an app. + * Description for 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 for the request + */ + Observable listSiteBackupsSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * This is to allow calling via powershell and ARM template. + * Description for 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listSyncFunctionTriggersSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Gets a Swift Virtual Network connection. + * Description for Gets a Swift Virtual Network connection. + * + * @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 a gateway for the production slot's Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getSwiftVirtualNetworkConnectionSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @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 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 for the request + */ + Observable createOrUpdateSwiftVirtualNetworkConnectionSlotAsync(String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope); + + /** + * Deletes a Swift Virtual Network connection from an app (or deployment slot). + * Description for Deletes a Swift Virtual Network connection from an app (or 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 will delete the connection for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteSwiftVirtualNetworkSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @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 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 for the request + */ + Observable updateSwiftVirtualNetworkConnectionSlotAsync(String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope); + + /** + * Start capturing network packets for the site (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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 for the request + */ + Observable startWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + Observable startWebSiteNetworkTraceOperationSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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 for the request + */ + Completable stopWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getNetworkTracesSlotAsync(String resourceGroupName, String name, String operationId, String slot); + + /** + * Generates a new publishing password for an app (or deployment slot, if specified). + * Description for 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 observable for the request + */ + Completable generateNewSitePublishingPasswordSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Gets web app's event logs. + * Description for 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 for the request + */ + Observable getSitePhpErrorLogFlagSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 for the request + */ + Observable getProcessDumpSlotAsync(String resourceGroupName, String name, String processId, String slot); + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Description for 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 publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listPublishingProfileXmlWithSecretsSlotAsync(String resourceGroupName, String name, String slot, CsmPublishingProfileOptions publishingProfileOptions); + + /** + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * Description for 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 observable for the request + */ + Completable resetSlotConfigurationSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Restarts an app (or deployment slot, if specified). + * Description for 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 observable for the request + */ + Completable restartSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup 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 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 + */ + Completable restoreFromBackupBlobSlotAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request); + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this 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 restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable restoreFromDeletedAppSlotAsync(String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest); + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a 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 restoreRequest Snapshot restore settings. 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 + */ + Completable restoreSnapshotSlotAsync(String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest); + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot 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 copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable copySlotSlotAsync(String resourceGroupName, String name, String slot, CsmCopySlotEntity copySlotEntity); + + /** + * Get the difference in configuration settings between two web app slots. + * Description for 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 for the request + */ + Observable listSlotDifferencesSlotAsync(final String resourceGroupName, final String name, final String slot, final CsmSlotEntity slotSwapEntity); + + /** + * Swaps two deployment slots of an app. + * Description for 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 + */ + Completable swapSlotSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity); + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @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 for the request + */ + Observable listSnapshotsFromDRSecondarySlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Starts an app (or deployment slot, if specified). + * Description for 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 observable for the request + */ + Completable startSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + Observable startNetworkTraceSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Stops an app (or deployment slot, if specified). + * Description for 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 observable for the request + */ + Completable stopSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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 for the request + */ + Completable stopNetworkTraceSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Sync web app repository. + * Description for 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 observable for the request + */ + Completable syncRepositorySlotAsync(String resourceGroupName, String name, String slot); + + /** + * Syncs function trigger metadata to the management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable syncFunctionTriggersSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Gets a private endpoint connection. + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getPrivateEndpointConnectionAsync(String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Deletes a private endpoint connection. + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deletePrivateEndpointConnectionAsync(String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Gets the private link resources. + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getPrivateLinkResourcesAsync(String resourceGroupName, String name); + + /** + * Gets the source control configuration of an app. + * Description for 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 for the request + */ + Observable getSourceControlSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Updates the source control configuration of an app. + * Description for 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 + */ + Observable createOrUpdateSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl); + + /** + * Deletes the source control configuration of an app. + * Description for 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 observable for the request + */ + Completable deleteSourceControlSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Updates the source control configuration of an app. + * Description for 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 + */ + Observable updateSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl); + + /** + * Gets the source control configuration of an app. + * Description for 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 for the request + */ + Observable getSourceControlAsync(String resourceGroupName, String name); + + /** + * Updates the source control configuration of an app. + * Description for 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 + */ + Observable createOrUpdateSourceControlAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl); + + /** + * Deletes the source control configuration of an app. + * Description for 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 observable for the request + */ + Completable deleteSourceControlAsync(String resourceGroupName, String name); + + /** + * Updates the source control configuration of an app. + * Description for 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 + */ + Observable updateSourceControlAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl); + + /** + * Gets a triggered web job by its ID for an app, or a deployment slot. + * Description for 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 uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getTriggeredWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot); + + /** + * List triggered web jobs for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable listTriggeredWebJobsSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Delete a triggered web job by its ID for an app, or a deployment slot. + * Description for 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 web job for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteTriggeredWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot); + + /** + * List a triggered web job's history for an app, or a deployment slot. + * Description for 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 uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listTriggeredWebJobHistorySlotAsync(final String resourceGroupName, final String name, final String webJobName, final String slot); + + /** + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * Description for 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 uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getTriggeredWebJobHistorySlotAsync(String resourceGroupName, String name, String webJobName, String id, String slot); + + /** + * Run a triggered web job for an app, or a deployment slot. + * Description for 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 uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable runTriggeredWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot); + + /** + * List triggered web jobs for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable listTriggeredWebJobsAsync(final String resourceGroupName, final String name); + + /** + * Gets a triggered web job by its ID for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable getTriggeredWebJobAsync(String resourceGroupName, String name, String webJobName); + + /** + * Delete a triggered web job by its ID for an app, or a deployment slot. + * Description for 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 observable for the request + */ + Completable deleteTriggeredWebJobAsync(String resourceGroupName, String name, String webJobName); + + /** + * List a triggered web job's history for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable listTriggeredWebJobHistoryAsync(final String resourceGroupName, final String name, final String webJobName); + + /** + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * Description for 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 for the request + */ + Observable getTriggeredWebJobHistoryAsync(String resourceGroupName, String name, String webJobName, String id); + + /** + * Run a triggered web job for an app, or a deployment slot. + * Description for 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 observable for the request + */ + Completable runTriggeredWebJobAsync(String resourceGroupName, String name, String webJobName); + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Description for 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 for the request + */ + Observable listUsagesSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Description for 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 for the request + */ + Observable listUsagesAsync(final String resourceGroupName, final String name); + + /** + * Gets a virtual network the app (or deployment slot) is connected to by name. + * Description for 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 for the request + */ + Observable getVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot); + + /** + * Gets the virtual networks the app (or deployment slot) is connected to. + * Description for 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 for the request + */ + Observable listVnetConnectionsSlotAsync(String resourceGroupName, String name, String slot); + + /** + * Deletes a connection from an app (or deployment slot to a named virtual network. + * Description for 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 observable for the request + */ + Completable deleteVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot); + + /** + * Gets the virtual networks the app (or deployment slot) is connected to. + * Description for 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 for the request + */ + Observable listVnetConnectionsAsync(String resourceGroupName, String name); + + /** + * Gets a virtual network the app (or deployment slot) is connected to by name. + * Description for 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 for the request + */ + Observable getVnetConnectionAsync(String resourceGroupName, String name, String vnetName); + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Description for 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 for the request + */ + Observable createOrUpdateVnetConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope); + + /** + * Deletes a connection from an app (or deployment slot to a named virtual network. + * Description for 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 observable for the request + */ + Completable deleteVnetConnectionAsync(String resourceGroupName, String name, String vnetName); + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Description for 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 for the request + */ + Observable updateVnetConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope); + + /** + * Gets an app's Virtual Network gateway. + * Description for 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 for the request + */ + Observable getVnetConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot); + + /** + * Gets an app's Virtual Network gateway. + * Description for 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 for the request + */ + Observable getVnetConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName); + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Description for 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 for the request + */ + Observable createOrUpdateVnetConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope); + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Description for 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 for the request + */ + Observable updateVnetConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope); + + /** + * Get webjob information for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable getWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot); + + /** + * List webjobs for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable listWebJobsSlotAsync(final String resourceGroupName, final String name, final String slot); + + /** + * List webjobs for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable listWebJobsAsync(final String resourceGroupName, final String name); + + /** + * Get webjob information for an app, or a deployment slot. + * Description for 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 for the request + */ + Observable getWebJobAsync(String resourceGroupName, String name, String webJobName); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WebJob.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WebJob.java new file mode 100644 index 0000000000000..7b0b41dd94fa1 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WebJob.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.WebJobInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.Map; + +/** + * Type representing WebJob. + */ +public interface WebJob extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the error value. + */ + String error(); + + /** + * @return the extraInfoUrl value. + */ + String extraInfoUrl(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the runCommand value. + */ + String runCommand(); + + /** + * @return the settings value. + */ + Map settings(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the url value. + */ + String url(); + + /** + * @return the usingSdk value. + */ + Boolean usingSdk(); + + /** + * @return the webJobType value. + */ + WebJobType webJobType(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WebJobType.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WebJobType.java new file mode 100644 index 0000000000000..26edaeb8eddd7 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WebSiteInstanceStatus.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WebSiteInstanceStatus.java new file mode 100644 index 0000000000000..b88824495d976 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WebSiteInstanceStatus.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.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.WebSiteInstanceStatusInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.Map; + +/** + * Type representing WebSiteInstanceStatus. + */ +public interface WebSiteInstanceStatus extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the consoleUrl value. + */ + String consoleUrl(); + + /** + * @return the containers value. + */ + Map containers(); + + /** + * @return the detectorUrl value. + */ + String detectorUrl(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the state value. + */ + SiteRuntimeState state(); + + /** + * @return the statusUrl value. + */ + String statusUrl(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WorkerPool.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WorkerPool.java new file mode 100644 index 0000000000000..0d9268c5025c0 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01; + +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 worker size ID for referencing this worker pool. + * + * @return the workerSizeId value + */ + public Integer workerSizeId() { + return this.workerSizeId; + } + + /** + * Set worker size ID for referencing this worker pool. + * + * @param workerSizeId the workerSizeId value to set + * @return the WorkerPool object itself. + */ + public WorkerPool withWorkerSizeId(Integer workerSizeId) { + this.workerSizeId = workerSizeId; + return this; + } + + /** + * Get shared or dedicated app hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'. + * + * @return the computeMode value + */ + public ComputeModeOptions computeMode() { + return this.computeMode; + } + + /** + * Set shared or dedicated app hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'. + * + * @param computeMode the computeMode value to set + * @return the WorkerPool object itself. + */ + public WorkerPool withComputeMode(ComputeModeOptions computeMode) { + this.computeMode = computeMode; + return this; + } + + /** + * Get vM size of the worker pool instances. + * + * @return the workerSize value + */ + public String workerSize() { + return this.workerSize; + } + + /** + * Set vM size of the worker pool instances. + * + * @param workerSize the workerSize value to set + * @return the WorkerPool object itself. + */ + public WorkerPool withWorkerSize(String workerSize) { + this.workerSize = workerSize; + return this; + } + + /** + * Get number of instances in the worker pool. + * + * @return the workerCount value + */ + public Integer workerCount() { + return this.workerCount; + } + + /** + * Set number of instances in the worker pool. + * + * @param workerCount the workerCount value to set + * @return the WorkerPool object itself. + */ + public WorkerPool withWorkerCount(Integer workerCount) { + this.workerCount = workerCount; + return this; + } + + /** + * Get names of all instances in the worker pool (read only). + * + * @return the instanceNames value + */ + public List instanceNames() { + return this.instanceNames; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WorkerPools.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WorkerPools.java new file mode 100644 index 0000000000000..20ac9bb55a696 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WorkerPools.java @@ -0,0 +1,268 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.WorkerPoolResourceInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.appservice.v2019_08_01.implementation.CertificateRegistrationManager; +import java.util.List; + +/** + * Type representing WorkerPools. + */ +public interface WorkerPools extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the computeMode value. + */ + ComputeModeOptions computeMode(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the instanceNames value. + */ + List instanceNames(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the sku value. + */ + SkuDescription sku(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the workerCount value. + */ + Integer workerCount(); + + /** + * @return the workerSize value. + */ + String workerSize(); + + /** + * @return the workerSizeId value. + */ + Integer workerSizeId(); + + /** + * The entirety of the WorkerPools definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithHostingEnvironment, DefinitionStages.WithCreate { + } + + /** + * Grouping of WorkerPools definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a WorkerPools definition. + */ + interface Blank extends WithHostingEnvironment { + } + + /** + * The stage of the workerpools definition allowing to specify HostingEnvironment. + */ + interface WithHostingEnvironment { + /** + * Specifies resourceGroupName, name. + * @param resourceGroupName Name of the resource group to which the resource belongs + * @param name Name of the App Service Environment + * @return the next definition stage + */ + WithCreate withExistingHostingEnvironment(String resourceGroupName, String name); + } + + /** + * The stage of the workerpools definition allowing to specify ComputeMode. + */ + interface WithComputeMode { + /** + * Specifies computeMode. + * @param computeMode Shared or dedicated app hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic' + * @return the next definition stage + */ + WithCreate withComputeMode(ComputeModeOptions computeMode); + } + + /** + * The stage of the workerpools definition allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next definition stage + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the workerpools definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku the sku parameter value + * @return the next definition stage + */ + WithCreate withSku(SkuDescription sku); + } + + /** + * The stage of the workerpools definition allowing to specify WorkerCount. + */ + interface WithWorkerCount { + /** + * Specifies workerCount. + * @param workerCount Number of instances in the worker pool + * @return the next definition stage + */ + WithCreate withWorkerCount(Integer workerCount); + } + + /** + * The stage of the workerpools definition allowing to specify WorkerSize. + */ + interface WithWorkerSize { + /** + * Specifies workerSize. + * @param workerSize VM size of the worker pool instances + * @return the next definition stage + */ + WithCreate withWorkerSize(String workerSize); + } + + /** + * The stage of the workerpools definition allowing to specify WorkerSizeId. + */ + interface WithWorkerSizeId { + /** + * Specifies workerSizeId. + * @param workerSizeId Worker size ID for referencing this worker pool + * @return the next definition stage + */ + WithCreate withWorkerSizeId(Integer workerSizeId); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithComputeMode, DefinitionStages.WithKind, DefinitionStages.WithSku, DefinitionStages.WithWorkerCount, DefinitionStages.WithWorkerSize, DefinitionStages.WithWorkerSizeId { + } + } + /** + * The template for a WorkerPools update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithComputeMode, UpdateStages.WithKind, UpdateStages.WithSku, UpdateStages.WithWorkerCount, UpdateStages.WithWorkerSize, UpdateStages.WithWorkerSizeId { + } + + /** + * Grouping of WorkerPools update stages. + */ + interface UpdateStages { + /** + * The stage of the workerpools update allowing to specify ComputeMode. + */ + interface WithComputeMode { + /** + * Specifies computeMode. + * @param computeMode Shared or dedicated app hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic' + * @return the next update stage + */ + Update withComputeMode(ComputeModeOptions computeMode); + } + + /** + * The stage of the workerpools update allowing to specify Kind. + */ + interface WithKind { + /** + * Specifies kind. + * @param kind Kind of resource + * @return the next update stage + */ + Update withKind(String kind); + } + + /** + * The stage of the workerpools update allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku the sku parameter value + * @return the next update stage + */ + Update withSku(SkuDescription sku); + } + + /** + * The stage of the workerpools update allowing to specify WorkerCount. + */ + interface WithWorkerCount { + /** + * Specifies workerCount. + * @param workerCount Number of instances in the worker pool + * @return the next update stage + */ + Update withWorkerCount(Integer workerCount); + } + + /** + * The stage of the workerpools update allowing to specify WorkerSize. + */ + interface WithWorkerSize { + /** + * Specifies workerSize. + * @param workerSize VM size of the worker pool instances + * @return the next update stage + */ + Update withWorkerSize(String workerSize); + } + + /** + * The stage of the workerpools update allowing to specify WorkerSizeId. + */ + interface WithWorkerSizeId { + /** + * Specifies workerSizeId. + * @param workerSizeId Worker size ID for referencing this worker pool + * @return the next update stage + */ + Update withWorkerSizeId(Integer workerSizeId); + } + + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WorkerSizeOptions.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WorkerSizeOptions.java new file mode 100644 index 0000000000000..98c663d7f439b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WorkerSizeOptions.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.appservice.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for WorkerSizeOptions. + */ +public enum WorkerSizeOptions { + /** 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"), + + /** Enum value NestedSmall. */ + NESTED_SMALL("NestedSmall"), + + /** Enum value Default. */ + DEFAULT("Default"); + + /** 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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AddressResponseImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AddressResponseImpl.java new file mode 100644 index 0000000000000..e13d345faa576 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AddressResponseImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.AddressResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.VirtualIPMapping; + +class AddressResponseImpl extends WrapperImpl implements AddressResponse { + private final CertificateRegistrationManager manager; + AddressResponseImpl(AddressResponseInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String internalIpAddress() { + return this.inner().internalIpAddress(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List outboundIpAddresses() { + return this.inner().outboundIpAddresses(); + } + + @Override + public String serviceIpAddress() { + return this.inner().serviceIpAddress(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public List vipMappings() { + return this.inner().vipMappings(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AddressResponseInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AddressResponseInner.java new file mode 100644 index 0000000000000..56e35869c015b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AddressResponseInner.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.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.VirtualIPMapping; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Describes main public IP address and any extra virtual IPs. + */ +@JsonFlatten +public class AddressResponseInner extends ProxyOnlyResource { + /** + * Main public virtual IP. + */ + @JsonProperty(value = "properties.serviceIpAddress") + private String serviceIpAddress; + + /** + * Virtual Network internal IP address of the App Service Environment if it + * is in internal load-balancing mode. + */ + @JsonProperty(value = "properties.internalIpAddress") + private String internalIpAddress; + + /** + * IP addresses appearing on outbound connections. + */ + @JsonProperty(value = "properties.outboundIpAddresses") + private List outboundIpAddresses; + + /** + * Additional virtual IPs. + */ + @JsonProperty(value = "properties.vipMappings") + private List vipMappings; + + /** + * Get main public virtual IP. + * + * @return the serviceIpAddress value + */ + public String serviceIpAddress() { + return this.serviceIpAddress; + } + + /** + * Set main public virtual IP. + * + * @param serviceIpAddress the serviceIpAddress value to set + * @return the AddressResponseInner object itself. + */ + public AddressResponseInner withServiceIpAddress(String serviceIpAddress) { + this.serviceIpAddress = serviceIpAddress; + return this; + } + + /** + * Get virtual Network internal IP address of the App Service Environment if it is in internal load-balancing mode. + * + * @return the internalIpAddress value + */ + public String internalIpAddress() { + return this.internalIpAddress; + } + + /** + * Set virtual Network internal IP address of the App Service Environment if it is in internal load-balancing mode. + * + * @param internalIpAddress the internalIpAddress value to set + * @return the AddressResponseInner object itself. + */ + public AddressResponseInner withInternalIpAddress(String internalIpAddress) { + this.internalIpAddress = internalIpAddress; + return this; + } + + /** + * Get iP addresses appearing on outbound connections. + * + * @return the outboundIpAddresses value + */ + public List outboundIpAddresses() { + return this.outboundIpAddresses; + } + + /** + * Set iP addresses appearing on outbound connections. + * + * @param outboundIpAddresses the outboundIpAddresses value to set + * @return the AddressResponseInner object itself. + */ + public AddressResponseInner withOutboundIpAddresses(List outboundIpAddresses) { + this.outboundIpAddresses = outboundIpAddresses; + return this; + } + + /** + * Get additional virtual IPs. + * + * @return the vipMappings value + */ + public List vipMappings() { + return this.vipMappings; + } + + /** + * Set additional virtual IPs. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AnalysisDefinitionImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AnalysisDefinitionImpl.java new file mode 100644 index 0000000000000..49a475fd93f94 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AnalysisDefinitionImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.AnalysisDefinition; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; + +class AnalysisDefinitionImpl extends IndexableRefreshableWrapperImpl implements AnalysisDefinition { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String siteName; + private String diagnosticCategory; + private String analysisName; + + AnalysisDefinitionImpl(AnalysisDefinitionInner inner, CertificateRegistrationManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.siteName = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.diagnosticCategory = IdParsingUtils.getValueFromIdByName(inner.id(), "diagnostics"); + this.analysisName = IdParsingUtils.getValueFromIdByName(inner.id(), "analyses"); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + DiagnosticsInner client = this.manager().inner().diagnostics(); + return client.getSiteAnalysisAsync(this.resourceGroupName, this.siteName, this.diagnosticCategory, this.analysisName); + } + + + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AnalysisDefinitionInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AnalysisDefinitionInner.java new file mode 100644 index 0000000000000..424990afb1be5 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 description of the Analysis. + * + * @return the description value + */ + public String description() { + return this.description; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateOrderImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateOrderImpl.java new file mode 100644 index 0000000000000..bd0cf8310a158 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateOrderImpl.java @@ -0,0 +1,251 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceCertificateOrder; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceCertificateOrderPatchResource; +import java.util.Map; +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceCertificate; +import com.microsoft.azure.management.appservice.v2019_08_01.CertificateProductType; +import com.microsoft.azure.management.appservice.v2019_08_01.ProvisioningState; +import com.microsoft.azure.management.appservice.v2019_08_01.CertificateOrderStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.CertificateDetails; +import rx.functions.Func1; + +class AppServiceCertificateOrderImpl extends GroupableResourceCoreImpl implements AppServiceCertificateOrder, AppServiceCertificateOrder.Definition, AppServiceCertificateOrder.Update { + private AppServiceCertificateOrderPatchResource updateParameter; + AppServiceCertificateOrderImpl(String name, AppServiceCertificateOrderInner inner, CertificateRegistrationManager manager) { + super(name, inner, manager); + this.updateParameter = new AppServiceCertificateOrderPatchResource(); + } + + @Override + public Observable createResourceAsync() { + AppServiceCertificateOrdersInner client = this.manager().inner().appServiceCertificateOrders(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(new Func1() { + @Override + public AppServiceCertificateOrderInner call(AppServiceCertificateOrderInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + AppServiceCertificateOrdersInner client = this.manager().inner().appServiceCertificateOrders(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter) + .map(new Func1() { + @Override + public AppServiceCertificateOrderInner call(AppServiceCertificateOrderInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + AppServiceCertificateOrdersInner client = this.manager().inner().appServiceCertificateOrders(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.updateParameter = new AppServiceCertificateOrderPatchResource(); + } + + @Override + public List appServiceCertificateNotRenewableReasons() { + return this.inner().appServiceCertificateNotRenewableReasons(); + } + + @Override + public Boolean autoRenew() { + return this.inner().autoRenew(); + } + + @Override + public Map certificates() { + return this.inner().certificates(); + } + + @Override + public String csr() { + return this.inner().csr(); + } + + @Override + public String distinguishedName() { + return this.inner().distinguishedName(); + } + + @Override + public String domainVerificationToken() { + return this.inner().domainVerificationToken(); + } + + @Override + public DateTime expirationTime() { + return this.inner().expirationTime(); + } + + @Override + public CertificateDetails intermediate() { + return this.inner().intermediate(); + } + + @Override + public Boolean isPrivateKeyExternal() { + return this.inner().isPrivateKeyExternal(); + } + + @Override + public Integer keySize() { + return this.inner().keySize(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public DateTime lastCertificateIssuanceTime() { + return this.inner().lastCertificateIssuanceTime(); + } + + @Override + public DateTime nextAutoRenewalTimeStamp() { + return this.inner().nextAutoRenewalTimeStamp(); + } + + @Override + public CertificateProductType productType() { + return this.inner().productType(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public CertificateDetails root() { + return this.inner().root(); + } + + @Override + public String serialNumber() { + return this.inner().serialNumber(); + } + + @Override + public CertificateDetails signedCertificate() { + return this.inner().signedCertificate(); + } + + @Override + public CertificateOrderStatus status() { + return this.inner().status(); + } + + @Override + public Integer validityInYears() { + return this.inner().validityInYears(); + } + + @Override + public AppServiceCertificateOrderImpl withProductType(CertificateProductType productType) { + this.inner().withProductType(productType); + return this; + } + + @Override + public AppServiceCertificateOrderImpl withAutoRenew(Boolean autoRenew) { + if (isInCreateMode()) { + this.inner().withAutoRenew(autoRenew); + } else { + this.updateParameter.withAutoRenew(autoRenew); + } + return this; + } + + @Override + public AppServiceCertificateOrderImpl withCertificates(Map certificates) { + if (isInCreateMode()) { + this.inner().withCertificates(certificates); + } else { + this.updateParameter.withCertificates(certificates); + } + return this; + } + + @Override + public AppServiceCertificateOrderImpl withCsr(String csr) { + if (isInCreateMode()) { + this.inner().withCsr(csr); + } else { + this.updateParameter.withCsr(csr); + } + return this; + } + + @Override + public AppServiceCertificateOrderImpl withDistinguishedName(String distinguishedName) { + if (isInCreateMode()) { + this.inner().withDistinguishedName(distinguishedName); + } else { + this.updateParameter.withDistinguishedName(distinguishedName); + } + return this; + } + + @Override + public AppServiceCertificateOrderImpl withKeySize(Integer keySize) { + if (isInCreateMode()) { + this.inner().withKeySize(keySize); + } else { + this.updateParameter.withKeySize(keySize); + } + return this; + } + + @Override + public AppServiceCertificateOrderImpl withKind(String kind) { + if (isInCreateMode()) { + this.inner().withKind(kind); + } else { + this.updateParameter.withKind(kind); + } + return this; + } + + @Override + public AppServiceCertificateOrderImpl withValidityInYears(Integer validityInYears) { + if (isInCreateMode()) { + this.inner().withValidityInYears(validityInYears); + } else { + this.updateParameter.withValidityInYears(validityInYears); + } + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateOrderInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateOrderInner.java new file mode 100644 index 0000000000000..49c4a4ebaf190 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateOrderInner.java @@ -0,0 +1,423 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import java.util.Map; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceCertificate; +import com.microsoft.azure.management.appservice.v2019_08_01.CertificateProductType; +import com.microsoft.azure.management.appservice.v2019_08_01.ProvisioningState; +import com.microsoft.azure.management.appservice.v2019_08_01.CertificateOrderStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.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; + + /** + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get state of the Key Vault secret. + * + * @return the certificates value + */ + public Map certificates() { + return this.certificates; + } + + /** + * Set state of the Key Vault secret. + * + * @param certificates the certificates value to set + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withCertificates(Map certificates) { + this.certificates = certificates; + return this; + } + + /** + * Get certificate distinguished name. + * + * @return the distinguishedName value + */ + public String distinguishedName() { + return this.distinguishedName; + } + + /** + * Set certificate distinguished name. + * + * @param distinguishedName the distinguishedName value to set + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withDistinguishedName(String distinguishedName) { + this.distinguishedName = distinguishedName; + return this; + } + + /** + * Get domain verification token. + * + * @return the domainVerificationToken value + */ + public String domainVerificationToken() { + return this.domainVerificationToken; + } + + /** + * Get duration in years (must be between 1 and 3). + * + * @return the validityInYears value + */ + public Integer validityInYears() { + return this.validityInYears; + } + + /** + * Set duration in years (must be between 1 and 3). + * + * @param validityInYears the validityInYears value to set + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withValidityInYears(Integer validityInYears) { + this.validityInYears = validityInYears; + return this; + } + + /** + * Get certificate key size. + * + * @return the keySize value + */ + public Integer keySize() { + return this.keySize; + } + + /** + * Set certificate key size. + * + * @param keySize the keySize value to set + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withKeySize(Integer keySize) { + this.keySize = keySize; + return this; + } + + /** + * Get certificate product type. Possible values include: 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl'. + * + * @return the productType value + */ + public CertificateProductType productType() { + return this.productType; + } + + /** + * Set certificate product type. Possible values include: 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl'. + * + * @param productType the productType value to set + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withProductType(CertificateProductType productType) { + this.productType = productType; + return this; + } + + /** + * Get <code>true</code> if the certificate should be automatically renewed when it expires; otherwise, <code>false</code>. + * + * @return the autoRenew value + */ + public Boolean autoRenew() { + return this.autoRenew; + } + + /** + * Set <code>true</code> if the certificate should be automatically renewed when it expires; otherwise, <code>false</code>. + * + * @param autoRenew the autoRenew value to set + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withAutoRenew(Boolean autoRenew) { + this.autoRenew = autoRenew; + return this; + } + + /** + * Get status of certificate order. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get current order status. Possible values include: 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted'. + * + * @return the status value + */ + public CertificateOrderStatus status() { + return this.status; + } + + /** + * Get signed certificate. + * + * @return the signedCertificate value + */ + public CertificateDetails signedCertificate() { + return this.signedCertificate; + } + + /** + * Get last CSR that was created for this order. + * + * @return the csr value + */ + public String csr() { + return this.csr; + } + + /** + * Set last CSR that was created for this order. + * + * @param csr the csr value to set + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withCsr(String csr) { + this.csr = csr; + return this; + } + + /** + * Get intermediate certificate. + * + * @return the intermediate value + */ + public CertificateDetails intermediate() { + return this.intermediate; + } + + /** + * Get root certificate. + * + * @return the root value + */ + public CertificateDetails root() { + return this.root; + } + + /** + * Get current serial number of the certificate. + * + * @return the serialNumber value + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get certificate last issuance time. + * + * @return the lastCertificateIssuanceTime value + */ + public DateTime lastCertificateIssuanceTime() { + return this.lastCertificateIssuanceTime; + } + + /** + * Get certificate expiration time. + * + * @return the expirationTime value + */ + public DateTime expirationTime() { + return this.expirationTime; + } + + /** + * Get <code>true</code> if private key is external; otherwise, <code>false</code>. + * + * @return the isPrivateKeyExternal value + */ + public Boolean isPrivateKeyExternal() { + return this.isPrivateKeyExternal; + } + + /** + * Get reasons why App Service Certificate is not renewable at the current moment. + * + * @return the appServiceCertificateNotRenewableReasons value + */ + public List appServiceCertificateNotRenewableReasons() { + return this.appServiceCertificateNotRenewableReasons; + } + + /** + * Get time stamp when the certificate would be auto renewed next. + * + * @return the nextAutoRenewalTimeStamp value + */ + public DateTime nextAutoRenewalTimeStamp() { + return this.nextAutoRenewalTimeStamp; + } + + /** + * Get kind of resource. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Set kind of resource. + * + * @param kind the kind value to set + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withKind(String kind) { + this.kind = kind; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateOrdersImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateOrdersImpl.java new file mode 100644 index 0000000000000..37ce154dceea4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateOrdersImpl.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. + * abc + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceCertificateOrders; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceCertificateOrder; +import com.microsoft.azure.Page; +import rx.Completable; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteSeal; +import com.microsoft.azure.management.appservice.v2019_08_01.CertificateOrderAction; +import com.microsoft.azure.management.appservice.v2019_08_01.CertificateEmail; +import com.microsoft.azure.management.appservice.v2019_08_01.ReissueCertificateOrderRequest; +import com.microsoft.azure.management.appservice.v2019_08_01.RenewCertificateOrderRequest; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteSealRequest; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceCertificateResource; + +class AppServiceCertificateOrdersImpl extends WrapperImpl implements AppServiceCertificateOrders { + private final CertificateRegistrationManager manager; + + AppServiceCertificateOrdersImpl(CertificateRegistrationManager manager) { + super(manager.inner().appServiceCertificateOrders()); + this.manager = manager; + } + + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public AppServiceCertificateOrderImpl defineCertificateOrder(String name) { + return wrapCertificateOrderModel(name); + } + + @Override + public AppServiceCertificateResourceImpl defineCertificate(String name) { + return wrapCertificateModel(name); + } + + private AppServiceCertificateOrderImpl wrapCertificateOrderModel(String name) { + return new AppServiceCertificateOrderImpl(name, new AppServiceCertificateOrderInner(), this.manager()); + } + + private AppServiceCertificateResourceImpl wrapCertificateModel(String name) { + return new AppServiceCertificateResourceImpl(name, this.manager()); + } + + private AppServiceCertificateOrderImpl wrapAppServiceCertificateOrderModel(AppServiceCertificateOrderInner inner) { + return new AppServiceCertificateOrderImpl(inner.name(), inner, manager()); + } + + private AppServiceCertificateResourceImpl wrapAppServiceCertificateResourceModel(AppServiceCertificateResourceInner inner) { + return new AppServiceCertificateResourceImpl(inner, manager()); + } + + private Observable getAppServiceCertificateOrderInnerUsingAppServiceCertificateOrdersInnerAsync(String resourceGroupName, String name) { + AppServiceCertificateOrdersInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + private Observable getAppServiceCertificateResourceInnerUsingAppServiceCertificateOrdersInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String certificateOrderName = IdParsingUtils.getValueFromIdByName(id, "certificateOrders"); + String name = IdParsingUtils.getValueFromIdByName(id, "certificates"); + AppServiceCertificateOrdersInner client = this.inner(); + return client.getCertificateAsync(resourceGroupName, certificateOrderName, name); + } + + @Override + public Observable getByResourceGroupAsync(String resourceGroupName, String name) { + return this.getAppServiceCertificateOrderInnerUsingAppServiceCertificateOrdersInnerAsync(resourceGroupName, name).flatMap(new Func1> () { + @Override + public Observable call(AppServiceCertificateOrderInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((AppServiceCertificateOrder)wrapAppServiceCertificateOrderModel(inner)); + } + } + }); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + AppServiceCertificateOrdersInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AppServiceCertificateOrder call(AppServiceCertificateOrderInner inner) { + return wrapAppServiceCertificateOrderModel(inner); + } + }); + } + + @Override + public Observable listAsync() { + AppServiceCertificateOrdersInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AppServiceCertificateOrder call(AppServiceCertificateOrderInner inner) { + return wrapAppServiceCertificateOrderModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String name) { + return this.inner().deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Completable reissueAsync(String resourceGroupName, String certificateOrderName, ReissueCertificateOrderRequest reissueCertificateOrderRequest) { + AppServiceCertificateOrdersInner client = this.inner(); + return client.reissueAsync(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest).toCompletable(); + } + + @Override + public Completable renewAsync(String resourceGroupName, String certificateOrderName, RenewCertificateOrderRequest renewCertificateOrderRequest) { + AppServiceCertificateOrdersInner client = this.inner(); + return client.renewAsync(resourceGroupName, certificateOrderName, renewCertificateOrderRequest).toCompletable(); + } + + @Override + public Completable resendEmailAsync(String resourceGroupName, String certificateOrderName) { + AppServiceCertificateOrdersInner client = this.inner(); + return client.resendEmailAsync(resourceGroupName, certificateOrderName).toCompletable(); + } + + @Override + public Completable resendRequestEmailsAsync(String resourceGroupName, String certificateOrderName) { + AppServiceCertificateOrdersInner client = this.inner(); + return client.resendRequestEmailsAsync(resourceGroupName, certificateOrderName).toCompletable(); + } + + @Override + public Observable retrieveSiteSealAsync(String resourceGroupName, String certificateOrderName, SiteSealRequest siteSealRequest) { + AppServiceCertificateOrdersInner client = this.inner(); + return client.retrieveSiteSealAsync(resourceGroupName, certificateOrderName, siteSealRequest) + .map(new Func1() { + @Override + public SiteSeal call(SiteSealInner inner) { + return new SiteSealImpl(inner, manager()); + } + }); + } + + @Override + public Completable verifyDomainOwnershipAsync(String resourceGroupName, String certificateOrderName) { + AppServiceCertificateOrdersInner client = this.inner(); + return client.verifyDomainOwnershipAsync(resourceGroupName, certificateOrderName).toCompletable(); + } + + @Override + public Observable retrieveCertificateActionsAsync(String resourceGroupName, String name) { + AppServiceCertificateOrdersInner client = this.inner(); + return client.retrieveCertificateActionsAsync(resourceGroupName, name) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public CertificateOrderAction call(CertificateOrderActionInner inner) { + return new CertificateOrderActionImpl(inner, manager()); + } + }); + } + + @Override + public Observable retrieveCertificateEmailHistoryAsync(String resourceGroupName, String name) { + AppServiceCertificateOrdersInner client = this.inner(); + return client.retrieveCertificateEmailHistoryAsync(resourceGroupName, name) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public CertificateEmail call(CertificateEmailInner inner) { + return new CertificateEmailImpl(inner, manager()); + } + }); + } + + @Override + public Completable validatePurchaseInformationAsync(AppServiceCertificateOrderInner appServiceCertificateOrder) { + AppServiceCertificateOrdersInner client = this.inner(); + return client.validatePurchaseInformationAsync(appServiceCertificateOrder).toCompletable(); + } + + @Override + public Observable getCertificateAsync(String resourceGroupName, String certificateOrderName, String name) { + AppServiceCertificateOrdersInner client = this.inner(); + return client.getCertificateAsync(resourceGroupName, certificateOrderName, name) + .flatMap(new Func1>() { + @Override + public Observable call(AppServiceCertificateResourceInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((AppServiceCertificateResource)wrapAppServiceCertificateResourceModel(inner)); + } + } + }); + } + + @Override + public Observable listCertificatesAsync(final String resourceGroupName, final String certificateOrderName) { + AppServiceCertificateOrdersInner client = this.inner(); + return client.listCertificatesAsync(resourceGroupName, certificateOrderName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AppServiceCertificateResource call(AppServiceCertificateResourceInner inner) { + return wrapAppServiceCertificateResourceModel(inner); + } + }); + } + + @Override + public Completable deleteCertificateAsync(String resourceGroupName, String certificateOrderName, String name) { + AppServiceCertificateOrdersInner client = this.inner(); + return client.deleteCertificateAsync(resourceGroupName, certificateOrderName, name).toCompletable(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateOrdersInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateOrdersInner.java new file mode 100644 index 0000000000000..51cd1b7916b86 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateOrdersInner.java @@ -0,0 +1,2750 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceCertificateOrderPatchResource; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceCertificatePatchResource; +import com.microsoft.azure.management.appservice.v2019_08_01.DefaultErrorResponseException; +import com.microsoft.azure.management.appservice.v2019_08_01.ReissueCertificateOrderRequest; +import com.microsoft.azure.management.appservice.v2019_08_01.RenewCertificateOrderRequest; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteSealRequest; +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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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 AppServiceCertificateOrderPatchResource 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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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 AppServiceCertificatePatchResource 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.appservice.v2019_08_01.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 ReissueCertificateOrderRequest 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.appservice.v2019_08_01.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 RenewCertificateOrderRequest 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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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 SiteSealRequest 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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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. + * Description for List all certificate orders in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Validate information for a certificate order. + * Description for Validate information for a certificate order. + * + * @param appServiceCertificateOrder Information for a certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(appServiceCertificateOrder); + return service.validatePurchaseInformation(this.client.subscriptionId(), appServiceCertificateOrder, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get certificate orders in a resource group. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a certificate order. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(resourceGroupName, certificateOrderName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Create or update a certificate purchase order. + * Description for 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 use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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 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. + * Description for 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 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. + * Description for 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 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(certificateDistinguishedName); + Observable> observable = service.createOrUpdate(resourceGroupName, certificateOrderName, this.client.subscriptionId(), certificateDistinguishedName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a certificate purchase order. + * Description for 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 use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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 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. + * Description for 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 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. + * Description for 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 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(certificateDistinguishedName); + return service.beginCreateOrUpdate(resourceGroupName, certificateOrderName, this.client.subscriptionId(), certificateDistinguishedName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete an existing certificate order. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(resourceGroupName, certificateOrderName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Create or update a certificate purchase order. + * Description for 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 use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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, AppServiceCertificateOrderPatchResource certificateDistinguishedName) { + return updateWithServiceResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName).toBlocking().single().body(); + } + + /** + * Create or update a certificate purchase order. + * Description for 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 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, AppServiceCertificateOrderPatchResource certificateDistinguishedName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName), serviceCallback); + } + + /** + * Create or update a certificate purchase order. + * Description for 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 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, AppServiceCertificateOrderPatchResource 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. + * Description for 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 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, AppServiceCertificateOrderPatchResource 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(certificateDistinguishedName); + return service.update(resourceGroupName, certificateOrderName, this.client.subscriptionId(), certificateDistinguishedName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List all certificates associated with a certificate order. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listCertificates(resourceGroupName, certificateOrderName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listCertificatesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listCertificatesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the certificate associated with a certificate order. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getCertificate(resourceGroupName, certificateOrderName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates or updates a certificate and associates with key vault secret. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(keyVaultCertificate); + Observable> observable = service.createOrUpdateCertificate(resourceGroupName, certificateOrderName, name, this.client.subscriptionId(), keyVaultCertificate, this.client.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(keyVaultCertificate); + return service.beginCreateOrUpdateCertificate(resourceGroupName, certificateOrderName, name, this.client.subscriptionId(), keyVaultCertificate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateCertificateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateCertificateDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete the certificate associated with a certificate order. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteCertificate(resourceGroupName, certificateOrderName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates or updates a certificate and associates with key vault secret. + * Description for 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 DefaultErrorResponseException 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, AppServiceCertificatePatchResource keyVaultCertificate) { + return updateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).toBlocking().single().body(); + } + + /** + * Creates or updates a certificate and associates with key vault secret. + * Description for 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, AppServiceCertificatePatchResource keyVaultCertificate, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate), serviceCallback); + } + + /** + * Creates or updates a certificate and associates with key vault secret. + * Description for 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, AppServiceCertificatePatchResource 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. + * Description for 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, AppServiceCertificatePatchResource 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(keyVaultCertificate); + return service.updateCertificate(resourceGroupName, certificateOrderName, name, this.client.subscriptionId(), keyVaultCertificate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateCertificateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateCertificateDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Reissue an existing certificate order. + * Description for 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 DefaultErrorResponseException 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, ReissueCertificateOrderRequest reissueCertificateOrderRequest) { + reissueWithServiceResponseAsync(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest).toBlocking().single().body(); + } + + /** + * Reissue an existing certificate order. + * Description for 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, ReissueCertificateOrderRequest reissueCertificateOrderRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(reissueWithServiceResponseAsync(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest), serviceCallback); + } + + /** + * Reissue an existing certificate order. + * Description for 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, ReissueCertificateOrderRequest reissueCertificateOrderRequest) { + return reissueWithServiceResponseAsync(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reissue an existing certificate order. + * Description for 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, ReissueCertificateOrderRequest 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(reissueCertificateOrderRequest); + return service.reissue(resourceGroupName, certificateOrderName, this.client.subscriptionId(), reissueCertificateOrderRequest, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Renew an existing certificate order. + * Description for 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 DefaultErrorResponseException 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, RenewCertificateOrderRequest renewCertificateOrderRequest) { + renewWithServiceResponseAsync(resourceGroupName, certificateOrderName, renewCertificateOrderRequest).toBlocking().single().body(); + } + + /** + * Renew an existing certificate order. + * Description for 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, RenewCertificateOrderRequest renewCertificateOrderRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(renewWithServiceResponseAsync(resourceGroupName, certificateOrderName, renewCertificateOrderRequest), serviceCallback); + } + + /** + * Renew an existing certificate order. + * Description for 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, RenewCertificateOrderRequest renewCertificateOrderRequest) { + return renewWithServiceResponseAsync(resourceGroupName, certificateOrderName, renewCertificateOrderRequest).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Renew an existing certificate order. + * Description for 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, RenewCertificateOrderRequest 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(renewCertificateOrderRequest); + return service.renew(resourceGroupName, certificateOrderName, this.client.subscriptionId(), renewCertificateOrderRequest, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Resend certificate email. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.resendEmail(resourceGroupName, certificateOrderName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = resendEmailDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse resendEmailDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Verify domain ownership for this certificate order. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String name = null; + NameIdentifierInner nameIdentifier = new NameIdentifierInner(); + nameIdentifier.withName(null); + return service.resendRequestEmails(resourceGroupName, certificateOrderName, this.client.subscriptionId(), this.client.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + NameIdentifierInner nameIdentifier = new NameIdentifierInner(); + nameIdentifier.withName(name); + return service.resendRequestEmails(resourceGroupName, certificateOrderName, this.client.subscriptionId(), this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Verify domain ownership for this certificate order. + * Description for 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 DefaultErrorResponseException 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, SiteSealRequest siteSealRequest) { + return retrieveSiteSealWithServiceResponseAsync(resourceGroupName, certificateOrderName, siteSealRequest).toBlocking().single().body(); + } + + /** + * Verify domain ownership for this certificate order. + * Description for 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, SiteSealRequest siteSealRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(retrieveSiteSealWithServiceResponseAsync(resourceGroupName, certificateOrderName, siteSealRequest), serviceCallback); + } + + /** + * Verify domain ownership for this certificate order. + * Description for 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, SiteSealRequest 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. + * Description for 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, SiteSealRequest 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteSealRequest); + return service.retrieveSiteSeal(resourceGroupName, certificateOrderName, this.client.subscriptionId(), siteSealRequest, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Verify domain ownership for this certificate order. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.verifyDomainOwnership(resourceGroupName, certificateOrderName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = verifyDomainOwnershipDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse verifyDomainOwnershipDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Retrieve the list of certificate actions. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.retrieveCertificateActions(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Retrieve email history. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.retrieveCertificateEmailHistory(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List all certificate orders in a subscription. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get certificate orders in a resource group. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List all certificates associated with a certificate order. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateResourceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateResourceImpl.java new file mode 100644 index 0000000000000..da63c881afa55 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateResourceImpl.java @@ -0,0 +1,190 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceCertificateResource; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceCertificatePatchResource; +import java.util.Map; +import com.microsoft.azure.management.appservice.v2019_08_01.KeyVaultSecretStatus; +import rx.functions.Func1; + +class AppServiceCertificateResourceImpl extends CreatableUpdatableImpl implements AppServiceCertificateResource, AppServiceCertificateResource.Definition, AppServiceCertificateResource.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String certificateOrderName; + private String name; + private AppServiceCertificatePatchResource updateParameter; + + AppServiceCertificateResourceImpl(String name, CertificateRegistrationManager manager) { + super(name, new AppServiceCertificateResourceInner()); + this.manager = manager; + // Set resource name + this.name = name; + // + this.updateParameter = new AppServiceCertificatePatchResource(); + } + + AppServiceCertificateResourceImpl(AppServiceCertificateResourceInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.name = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.certificateOrderName = IdParsingUtils.getValueFromIdByName(inner.id(), "certificateOrders"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "certificates"); + // + this.updateParameter = new AppServiceCertificatePatchResource(); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + AppServiceCertificateOrdersInner client = this.manager().inner().appServiceCertificateOrders(); + return client.createOrUpdateCertificateAsync(this.resourceGroupName, this.certificateOrderName, this.name, this.inner()) + .map(new Func1() { + @Override + public AppServiceCertificateResourceInner call(AppServiceCertificateResourceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + AppServiceCertificateOrdersInner client = this.manager().inner().appServiceCertificateOrders(); + return client.updateCertificateAsync(this.resourceGroupName, this.certificateOrderName, this.name, this.updateParameter) + .map(new Func1() { + @Override + public AppServiceCertificateResourceInner call(AppServiceCertificateResourceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + AppServiceCertificateOrdersInner client = this.manager().inner().appServiceCertificateOrders(); + return client.getCertificateAsync(this.resourceGroupName, this.certificateOrderName, this.name); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.updateParameter = new AppServiceCertificatePatchResource(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String keyVaultId() { + return this.inner().keyVaultId(); + } + + @Override + public String keyVaultSecretName() { + return this.inner().keyVaultSecretName(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public KeyVaultSecretStatus provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public AppServiceCertificateResourceImpl withExistingCertificateOrder(String resourceGroupName, String certificateOrderName) { + this.resourceGroupName = resourceGroupName; + this.certificateOrderName = certificateOrderName; + return this; + } + + @Override + public AppServiceCertificateResourceImpl withLocation(String location) { + this.inner().withLocation(location); + return this; + } + + @Override + public AppServiceCertificateResourceImpl withTags(Map tags) { + this.inner().withTags(tags); + return this; + } + + @Override + public AppServiceCertificateResourceImpl withKeyVaultId(String keyVaultId) { + if (isInCreateMode()) { + this.inner().withKeyVaultId(keyVaultId); + } else { + this.updateParameter.withKeyVaultId(keyVaultId); + } + return this; + } + + @Override + public AppServiceCertificateResourceImpl withKeyVaultSecretName(String keyVaultSecretName) { + if (isInCreateMode()) { + this.inner().withKeyVaultSecretName(keyVaultSecretName); + } else { + this.updateParameter.withKeyVaultSecretName(keyVaultSecretName); + } + return this; + } + + @Override + public AppServiceCertificateResourceImpl withKind(String kind) { + if (isInCreateMode()) { + this.inner().withKind(kind); + } else { + this.updateParameter.withKind(kind); + } + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateResourceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateResourceInner.java new file mode 100644 index 0000000000000..d0d066f672ef2 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateResourceInner.java @@ -0,0 +1,120 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.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; + + /** + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get key Vault resource Id. + * + * @return the keyVaultId value + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Set key Vault resource Id. + * + * @param keyVaultId the keyVaultId value to set + * @return the AppServiceCertificateResourceInner object itself. + */ + public AppServiceCertificateResourceInner withKeyVaultId(String keyVaultId) { + this.keyVaultId = keyVaultId; + return this; + } + + /** + * Get key Vault secret name. + * + * @return the keyVaultSecretName value + */ + public String keyVaultSecretName() { + return this.keyVaultSecretName; + } + + /** + * Set key Vault secret name. + * + * @param keyVaultSecretName the keyVaultSecretName value to set + * @return the AppServiceCertificateResourceInner object itself. + */ + public AppServiceCertificateResourceInner withKeyVaultSecretName(String keyVaultSecretName) { + this.keyVaultSecretName = keyVaultSecretName; + return this; + } + + /** + * Get status of the Key Vault secret. Possible values include: 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', 'Unknown'. + * + * @return the provisioningState value + */ + public KeyVaultSecretStatus provisioningState() { + return this.provisioningState; + } + + /** + * Get kind of resource. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Set kind of resource. + * + * @param kind the kind value to set + * @return the AppServiceCertificateResourceInner object itself. + */ + public AppServiceCertificateResourceInner withKind(String kind) { + this.kind = kind; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceEnvironmentInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceEnvironmentInner.java new file mode 100644 index 0000000000000..98f2cf76d0315 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceEnvironmentInner.java @@ -0,0 +1,877 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ProvisioningState; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.VirtualNetworkProfile; +import com.microsoft.azure.management.appservice.v2019_08_01.InternalLoadBalancingMode; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.WorkerPool; +import com.microsoft.azure.management.appservice.v2019_08_01.VirtualIPMapping; +import com.microsoft.azure.management.appservice.v2019_08_01.NetworkAccessControlEntry; +import com.microsoft.azure.management.appservice.v2019_08_01.NameValuePair; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Description of an App Service Environment. + */ +public class AppServiceEnvironmentInner { + /** + * 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; + + /** + * Flag that displays whether an ASE has linux workers or not. + */ + @JsonProperty(value = "hasLinuxWorkers") + private Boolean hasLinuxWorkers; + + /** + * Key Vault ID for ILB App Service Environment default SSL certificate. + */ + @JsonProperty(value = "sslCertKeyVaultId") + private String sslCertKeyVaultId; + + /** + * Key Vault Secret Name for ILB App Service Environment default SSL + * certificate. + */ + @JsonProperty(value = "sslCertKeyVaultSecretName") + private String sslCertKeyVaultSecretName; + + /** + * Get name of the App Service Environment. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the App Service Environment. + * + * @param name the name value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get location of the App Service Environment, e.g. "West US". + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set location of the App Service Environment, e.g. "West US". + * + * @param location the location value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get provisioning state of the App Service Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get current status of the App Service Environment. Possible values include: 'Preparing', 'Ready', 'Scaling', 'Deleting'. + * + * @return the status value + */ + public HostingEnvironmentStatus status() { + return this.status; + } + + /** + * Get name of the Virtual Network for the App Service Environment. + * + * @return the vnetName value + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set name of the Virtual Network for the App Service Environment. + * + * @param vnetName the vnetName value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get resource group of the Virtual Network. + * + * @return the vnetResourceGroupName value + */ + public String vnetResourceGroupName() { + return this.vnetResourceGroupName; + } + + /** + * Set resource group of the Virtual Network. + * + * @param vnetResourceGroupName the vnetResourceGroupName value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withVnetResourceGroupName(String vnetResourceGroupName) { + this.vnetResourceGroupName = vnetResourceGroupName; + return this; + } + + /** + * Get subnet of the Virtual Network. + * + * @return the vnetSubnetName value + */ + public String vnetSubnetName() { + return this.vnetSubnetName; + } + + /** + * Set subnet of the Virtual Network. + * + * @param vnetSubnetName the vnetSubnetName value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withVnetSubnetName(String vnetSubnetName) { + this.vnetSubnetName = vnetSubnetName; + return this; + } + + /** + * Get description of the Virtual Network. + * + * @return the virtualNetwork value + */ + public VirtualNetworkProfile virtualNetwork() { + return this.virtualNetwork; + } + + /** + * Set description of the Virtual Network. + * + * @param virtualNetwork the virtualNetwork value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withVirtualNetwork(VirtualNetworkProfile virtualNetwork) { + this.virtualNetwork = virtualNetwork; + return this; + } + + /** + * Get specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values include: 'None', 'Web', 'Publishing'. + * + * @return the internalLoadBalancingMode value + */ + public InternalLoadBalancingMode internalLoadBalancingMode() { + return this.internalLoadBalancingMode; + } + + /** + * Set specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values include: 'None', 'Web', 'Publishing'. + * + * @param internalLoadBalancingMode the internalLoadBalancingMode value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withInternalLoadBalancingMode(InternalLoadBalancingMode internalLoadBalancingMode) { + this.internalLoadBalancingMode = internalLoadBalancingMode; + return this; + } + + /** + * Get front-end VM size, e.g. "Medium", "Large". + * + * @return the multiSize value + */ + public String multiSize() { + return this.multiSize; + } + + /** + * Set front-end VM size, e.g. "Medium", "Large". + * + * @param multiSize the multiSize value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withMultiSize(String multiSize) { + this.multiSize = multiSize; + return this; + } + + /** + * Get number of front-end instances. + * + * @return the multiRoleCount value + */ + public Integer multiRoleCount() { + return this.multiRoleCount; + } + + /** + * Set number of front-end instances. + * + * @param multiRoleCount the multiRoleCount value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withMultiRoleCount(Integer multiRoleCount) { + this.multiRoleCount = multiRoleCount; + return this; + } + + /** + * Get description of worker pools with worker size IDs, VM sizes, and number of workers in each pool. + * + * @return the workerPools value + */ + public List workerPools() { + return this.workerPools; + } + + /** + * Set description of worker pools with worker size IDs, VM sizes, and number of workers in each pool. + * + * @param workerPools the workerPools value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withWorkerPools(List workerPools) { + this.workerPools = workerPools; + return this; + } + + /** + * Get number of IP SSL addresses reserved for the App Service Environment. + * + * @return the ipsslAddressCount value + */ + public Integer ipsslAddressCount() { + return this.ipsslAddressCount; + } + + /** + * Set number of IP SSL addresses reserved for the App Service Environment. + * + * @param ipsslAddressCount the ipsslAddressCount value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withIpsslAddressCount(Integer ipsslAddressCount) { + this.ipsslAddressCount = ipsslAddressCount; + return this; + } + + /** + * Get edition of the metadata database for the App Service Environment, e.g. "Standard". + * + * @return the databaseEdition value + */ + public String databaseEdition() { + return this.databaseEdition; + } + + /** + * Get service objective of the metadata database for the App Service Environment, e.g. "S0". + * + * @return the databaseServiceObjective value + */ + public String databaseServiceObjective() { + return this.databaseServiceObjective; + } + + /** + * Get number of upgrade domains of the App Service Environment. + * + * @return the upgradeDomains value + */ + public Integer upgradeDomains() { + return this.upgradeDomains; + } + + /** + * Get subscription of the App Service Environment. + * + * @return the subscriptionId value + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Get dNS suffix of the App Service Environment. + * + * @return the dnsSuffix value + */ + public String dnsSuffix() { + return this.dnsSuffix; + } + + /** + * Set dNS suffix of the App Service Environment. + * + * @param dnsSuffix the dnsSuffix value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withDnsSuffix(String dnsSuffix) { + this.dnsSuffix = dnsSuffix; + return this; + } + + /** + * Get last deployment action on the App Service Environment. + * + * @return the lastAction value + */ + public String lastAction() { + return this.lastAction; + } + + /** + * Get result of the last deployment action on the App Service Environment. + * + * @return the lastActionResult value + */ + public String lastActionResult() { + return this.lastActionResult; + } + + /** + * Get list of comma separated strings describing which VM sizes are allowed for front-ends. + * + * @return the allowedMultiSizes value + */ + public String allowedMultiSizes() { + return this.allowedMultiSizes; + } + + /** + * Get list of comma separated strings describing which VM sizes are allowed for workers. + * + * @return the allowedWorkerSizes value + */ + public String allowedWorkerSizes() { + return this.allowedWorkerSizes; + } + + /** + * Get maximum number of VMs in the App Service Environment. + * + * @return the maximumNumberOfMachines value + */ + public Integer maximumNumberOfMachines() { + return this.maximumNumberOfMachines; + } + + /** + * Get description of IP SSL mapping for the App Service Environment. + * + * @return the vipMappings value + */ + public List vipMappings() { + return this.vipMappings; + } + + /** + * Get current total, used, and available worker capacities. + * + * @return the environmentCapacities value + */ + public List environmentCapacities() { + return this.environmentCapacities; + } + + /** + * Get access control list for controlling traffic to the App Service Environment. + * + * @return the networkAccessControlList value + */ + public List networkAccessControlList() { + return this.networkAccessControlList; + } + + /** + * Set access control list for controlling traffic to the App Service Environment. + * + * @param networkAccessControlList the networkAccessControlList value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withNetworkAccessControlList(List networkAccessControlList) { + this.networkAccessControlList = networkAccessControlList; + return this; + } + + /** + * Get true/false indicating whether the App Service Environment is healthy. + * + * @return the environmentIsHealthy value + */ + public Boolean environmentIsHealthy() { + return this.environmentIsHealthy; + } + + /** + * Get detailed message about with results of the last check of the App Service Environment. + * + * @return the environmentStatus value + */ + public String environmentStatus() { + return this.environmentStatus; + } + + /** + * Get resource group of the App Service Environment. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get scale factor for front-ends. + * + * @return the frontEndScaleFactor value + */ + public Integer frontEndScaleFactor() { + return this.frontEndScaleFactor; + } + + /** + * Set scale factor for front-ends. + * + * @param frontEndScaleFactor the frontEndScaleFactor value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withFrontEndScaleFactor(Integer frontEndScaleFactor) { + this.frontEndScaleFactor = frontEndScaleFactor; + return this; + } + + /** + * Get default Scale Factor for FrontEnds. + * + * @return the defaultFrontEndScaleFactor value + */ + public Integer defaultFrontEndScaleFactor() { + return this.defaultFrontEndScaleFactor; + } + + /** + * Get aPI Management Account associated with the App Service Environment. + * + * @return the apiManagementAccountId value + */ + public String apiManagementAccountId() { + return this.apiManagementAccountId; + } + + /** + * Set aPI Management Account associated with the App Service Environment. + * + * @param apiManagementAccountId the apiManagementAccountId value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withApiManagementAccountId(String apiManagementAccountId) { + this.apiManagementAccountId = apiManagementAccountId; + return this; + } + + /** + * Get <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). + * + * @return the suspended value + */ + public Boolean suspended() { + return this.suspended; + } + + /** + * Set <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). + * + * @param suspended the suspended value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withSuspended(Boolean suspended) { + this.suspended = suspended; + return this; + } + + /** + * Get 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). + * + * @return the dynamicCacheEnabled value + */ + public Boolean dynamicCacheEnabled() { + return this.dynamicCacheEnabled; + } + + /** + * Set 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). + * + * @param dynamicCacheEnabled the dynamicCacheEnabled value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withDynamicCacheEnabled(Boolean dynamicCacheEnabled) { + this.dynamicCacheEnabled = dynamicCacheEnabled; + return this; + } + + /** + * Get custom settings for changing the behavior of the App Service Environment. + * + * @return the clusterSettings value + */ + public List clusterSettings() { + return this.clusterSettings; + } + + /** + * Set custom settings for changing the behavior of the App Service Environment. + * + * @param clusterSettings the clusterSettings value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withClusterSettings(List clusterSettings) { + this.clusterSettings = clusterSettings; + return this; + } + + /** + * Get user added ip ranges to whitelist on ASE db. + * + * @return the userWhitelistedIpRanges value + */ + public List userWhitelistedIpRanges() { + return this.userWhitelistedIpRanges; + } + + /** + * Set user added ip ranges to whitelist on ASE db. + * + * @param userWhitelistedIpRanges the userWhitelistedIpRanges value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withUserWhitelistedIpRanges(List userWhitelistedIpRanges) { + this.userWhitelistedIpRanges = userWhitelistedIpRanges; + return this; + } + + /** + * Get flag that displays whether an ASE has linux workers or not. + * + * @return the hasLinuxWorkers value + */ + public Boolean hasLinuxWorkers() { + return this.hasLinuxWorkers; + } + + /** + * Set flag that displays whether an ASE has linux workers or not. + * + * @param hasLinuxWorkers the hasLinuxWorkers value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withHasLinuxWorkers(Boolean hasLinuxWorkers) { + this.hasLinuxWorkers = hasLinuxWorkers; + return this; + } + + /** + * Get key Vault ID for ILB App Service Environment default SSL certificate. + * + * @return the sslCertKeyVaultId value + */ + public String sslCertKeyVaultId() { + return this.sslCertKeyVaultId; + } + + /** + * Set key Vault ID for ILB App Service Environment default SSL certificate. + * + * @param sslCertKeyVaultId the sslCertKeyVaultId value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withSslCertKeyVaultId(String sslCertKeyVaultId) { + this.sslCertKeyVaultId = sslCertKeyVaultId; + return this; + } + + /** + * Get key Vault Secret Name for ILB App Service Environment default SSL certificate. + * + * @return the sslCertKeyVaultSecretName value + */ + public String sslCertKeyVaultSecretName() { + return this.sslCertKeyVaultSecretName; + } + + /** + * Set key Vault Secret Name for ILB App Service Environment default SSL certificate. + * + * @param sslCertKeyVaultSecretName the sslCertKeyVaultSecretName value to set + * @return the AppServiceEnvironmentInner object itself. + */ + public AppServiceEnvironmentInner withSslCertKeyVaultSecretName(String sslCertKeyVaultSecretName) { + this.sslCertKeyVaultSecretName = sslCertKeyVaultSecretName; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceEnvironmentResourceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceEnvironmentResourceImpl.java new file mode 100644 index 0000000000000..fa416b4d181ae --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceEnvironmentResourceImpl.java @@ -0,0 +1,498 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceEnvironmentResource; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceEnvironmentPatchResource; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.ProvisioningState; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.VirtualNetworkProfile; +import com.microsoft.azure.management.appservice.v2019_08_01.InternalLoadBalancingMode; +import com.microsoft.azure.management.appservice.v2019_08_01.WorkerPool; +import com.microsoft.azure.management.appservice.v2019_08_01.VirtualIPMapping; +import com.microsoft.azure.management.appservice.v2019_08_01.NetworkAccessControlEntry; +import com.microsoft.azure.management.appservice.v2019_08_01.NameValuePair; +import java.util.ArrayList; +import com.microsoft.azure.management.appservice.v2019_08_01.StampCapacity; +import rx.functions.Func1; + +class AppServiceEnvironmentResourceImpl extends GroupableResourceCoreImpl implements AppServiceEnvironmentResource, AppServiceEnvironmentResource.Definition, AppServiceEnvironmentResource.Update { + private AppServiceEnvironmentPatchResource updateParameter; + AppServiceEnvironmentResourceImpl(String name, AppServiceEnvironmentResourceInner inner, CertificateRegistrationManager manager) { + super(name, inner, manager); + this.updateParameter = new AppServiceEnvironmentPatchResource(); + } + + @Override + public Observable createResourceAsync() { + AppServiceEnvironmentsInner client = this.manager().inner().appServiceEnvironments(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(new Func1() { + @Override + public AppServiceEnvironmentResourceInner call(AppServiceEnvironmentResourceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + AppServiceEnvironmentsInner client = this.manager().inner().appServiceEnvironments(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter) + .map(new Func1() { + @Override + public AppServiceEnvironmentResourceInner call(AppServiceEnvironmentResourceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + AppServiceEnvironmentsInner client = this.manager().inner().appServiceEnvironments(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.updateParameter = new AppServiceEnvironmentPatchResource(); + } + + @Override + public String allowedMultiSizes() { + return this.inner().allowedMultiSizes(); + } + + @Override + public String allowedWorkerSizes() { + return this.inner().allowedWorkerSizes(); + } + + @Override + public String apiManagementAccountId() { + return this.inner().apiManagementAccountId(); + } + + @Override + public String appServiceEnvironmentResourceLocation() { + return this.inner().appServiceEnvironmentResourceLocation(); + } + + @Override + public String appServiceEnvironmentResourceName() { + return this.inner().appServiceEnvironmentResourceName(); + } + + @Override + public List clusterSettings() { + return this.inner().clusterSettings(); + } + + @Override + public String databaseEdition() { + return this.inner().databaseEdition(); + } + + @Override + public String databaseServiceObjective() { + return this.inner().databaseServiceObjective(); + } + + @Override + public Integer defaultFrontEndScaleFactor() { + return this.inner().defaultFrontEndScaleFactor(); + } + + @Override + public String dnsSuffix() { + return this.inner().dnsSuffix(); + } + + @Override + public Boolean dynamicCacheEnabled() { + return this.inner().dynamicCacheEnabled(); + } + + @Override + public List environmentCapacities() { + List lst = new ArrayList(); + if (this.inner().environmentCapacities() != null) { + for (StampCapacityInner inner : this.inner().environmentCapacities()) { + lst.add( new StampCapacityImpl(inner, manager())); + } + } + return lst; + } + + @Override + public Boolean environmentIsHealthy() { + return this.inner().environmentIsHealthy(); + } + + @Override + public String environmentStatus() { + return this.inner().environmentStatus(); + } + + @Override + public Integer frontEndScaleFactor() { + return this.inner().frontEndScaleFactor(); + } + + @Override + public Boolean hasLinuxWorkers() { + return this.inner().hasLinuxWorkers(); + } + + @Override + public InternalLoadBalancingMode internalLoadBalancingMode() { + return this.inner().internalLoadBalancingMode(); + } + + @Override + public Integer ipsslAddressCount() { + return this.inner().ipsslAddressCount(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String lastAction() { + return this.inner().lastAction(); + } + + @Override + public String lastActionResult() { + return this.inner().lastActionResult(); + } + + @Override + public Integer maximumNumberOfMachines() { + return this.inner().maximumNumberOfMachines(); + } + + @Override + public Integer multiRoleCount() { + return this.inner().multiRoleCount(); + } + + @Override + public String multiSize() { + return this.inner().multiSize(); + } + + @Override + public List networkAccessControlList() { + return this.inner().networkAccessControlList(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String resourceGroup() { + return this.inner().resourceGroup(); + } + + @Override + public String sslCertKeyVaultId() { + return this.inner().sslCertKeyVaultId(); + } + + @Override + public String sslCertKeyVaultSecretName() { + return this.inner().sslCertKeyVaultSecretName(); + } + + @Override + public HostingEnvironmentStatus status() { + return this.inner().status(); + } + + @Override + public String subscriptionId() { + return this.inner().subscriptionId(); + } + + @Override + public Boolean suspended() { + return this.inner().suspended(); + } + + @Override + public Integer upgradeDomains() { + return this.inner().upgradeDomains(); + } + + @Override + public List userWhitelistedIpRanges() { + return this.inner().userWhitelistedIpRanges(); + } + + @Override + public List vipMappings() { + return this.inner().vipMappings(); + } + + @Override + public VirtualNetworkProfile virtualNetwork() { + return this.inner().virtualNetwork(); + } + + @Override + public String vnetName() { + return this.inner().vnetName(); + } + + @Override + public String vnetResourceGroupName() { + return this.inner().vnetResourceGroupName(); + } + + @Override + public String vnetSubnetName() { + return this.inner().vnetSubnetName(); + } + + @Override + public List workerPools() { + return this.inner().workerPools(); + } + + @Override + public AppServiceEnvironmentResourceImpl withAppServiceEnvironmentResourceLocation(String appServiceEnvironmentResourceLocation) { + this.inner().withAppServiceEnvironmentResourceLocation(appServiceEnvironmentResourceLocation); + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withAppServiceEnvironmentResourceName(String appServiceEnvironmentResourceName) { + this.inner().withAppServiceEnvironmentResourceName(appServiceEnvironmentResourceName); + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withVirtualNetwork(VirtualNetworkProfile virtualNetwork) { + this.inner().withVirtualNetwork(virtualNetwork); + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withWorkerPools(List workerPools) { + this.inner().withWorkerPools(workerPools); + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withApiManagementAccountId(String apiManagementAccountId) { + if (isInCreateMode()) { + this.inner().withApiManagementAccountId(apiManagementAccountId); + } else { + this.updateParameter.withApiManagementAccountId(apiManagementAccountId); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withClusterSettings(List clusterSettings) { + if (isInCreateMode()) { + this.inner().withClusterSettings(clusterSettings); + } else { + this.updateParameter.withClusterSettings(clusterSettings); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withDnsSuffix(String dnsSuffix) { + if (isInCreateMode()) { + this.inner().withDnsSuffix(dnsSuffix); + } else { + this.updateParameter.withDnsSuffix(dnsSuffix); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withDynamicCacheEnabled(Boolean dynamicCacheEnabled) { + if (isInCreateMode()) { + this.inner().withDynamicCacheEnabled(dynamicCacheEnabled); + } else { + this.updateParameter.withDynamicCacheEnabled(dynamicCacheEnabled); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withFrontEndScaleFactor(Integer frontEndScaleFactor) { + if (isInCreateMode()) { + this.inner().withFrontEndScaleFactor(frontEndScaleFactor); + } else { + this.updateParameter.withFrontEndScaleFactor(frontEndScaleFactor); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withHasLinuxWorkers(Boolean hasLinuxWorkers) { + if (isInCreateMode()) { + this.inner().withHasLinuxWorkers(hasLinuxWorkers); + } else { + this.updateParameter.withHasLinuxWorkers(hasLinuxWorkers); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withInternalLoadBalancingMode(InternalLoadBalancingMode internalLoadBalancingMode) { + if (isInCreateMode()) { + this.inner().withInternalLoadBalancingMode(internalLoadBalancingMode); + } else { + this.updateParameter.withInternalLoadBalancingMode(internalLoadBalancingMode); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withIpsslAddressCount(Integer ipsslAddressCount) { + if (isInCreateMode()) { + this.inner().withIpsslAddressCount(ipsslAddressCount); + } else { + this.updateParameter.withIpsslAddressCount(ipsslAddressCount); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withKind(String kind) { + if (isInCreateMode()) { + this.inner().withKind(kind); + } else { + this.updateParameter.withKind(kind); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withMultiRoleCount(Integer multiRoleCount) { + if (isInCreateMode()) { + this.inner().withMultiRoleCount(multiRoleCount); + } else { + this.updateParameter.withMultiRoleCount(multiRoleCount); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withMultiSize(String multiSize) { + if (isInCreateMode()) { + this.inner().withMultiSize(multiSize); + } else { + this.updateParameter.withMultiSize(multiSize); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withNetworkAccessControlList(List networkAccessControlList) { + if (isInCreateMode()) { + this.inner().withNetworkAccessControlList(networkAccessControlList); + } else { + this.updateParameter.withNetworkAccessControlList(networkAccessControlList); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withSslCertKeyVaultId(String sslCertKeyVaultId) { + if (isInCreateMode()) { + this.inner().withSslCertKeyVaultId(sslCertKeyVaultId); + } else { + this.updateParameter.withSslCertKeyVaultId(sslCertKeyVaultId); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withSslCertKeyVaultSecretName(String sslCertKeyVaultSecretName) { + if (isInCreateMode()) { + this.inner().withSslCertKeyVaultSecretName(sslCertKeyVaultSecretName); + } else { + this.updateParameter.withSslCertKeyVaultSecretName(sslCertKeyVaultSecretName); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withSuspended(Boolean suspended) { + if (isInCreateMode()) { + this.inner().withSuspended(suspended); + } else { + this.updateParameter.withSuspended(suspended); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withUserWhitelistedIpRanges(List userWhitelistedIpRanges) { + if (isInCreateMode()) { + this.inner().withUserWhitelistedIpRanges(userWhitelistedIpRanges); + } else { + this.updateParameter.withUserWhitelistedIpRanges(userWhitelistedIpRanges); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withVnetName(String vnetName) { + if (isInCreateMode()) { + this.inner().withVnetName(vnetName); + } else { + this.updateParameter.withVnetName(vnetName); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withVnetResourceGroupName(String vnetResourceGroupName) { + if (isInCreateMode()) { + this.inner().withVnetResourceGroupName(vnetResourceGroupName); + } else { + this.updateParameter.withVnetResourceGroupName(vnetResourceGroupName); + } + return this; + } + + @Override + public AppServiceEnvironmentResourceImpl withVnetSubnetName(String vnetSubnetName) { + if (isInCreateMode()) { + this.inner().withVnetSubnetName(vnetSubnetName); + } else { + this.updateParameter.withVnetSubnetName(vnetSubnetName); + } + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceEnvironmentResourceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceEnvironmentResourceInner.java new file mode 100644 index 0000000000000..ed56e92cac9be --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceEnvironmentResourceInner.java @@ -0,0 +1,906 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ProvisioningState; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.VirtualNetworkProfile; +import com.microsoft.azure.management.appservice.v2019_08_01.InternalLoadBalancingMode; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.WorkerPool; +import com.microsoft.azure.management.appservice.v2019_08_01.VirtualIPMapping; +import com.microsoft.azure.management.appservice.v2019_08_01.NetworkAccessControlEntry; +import com.microsoft.azure.management.appservice.v2019_08_01.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; + + /** + * Flag that displays whether an ASE has linux workers or not. + */ + @JsonProperty(value = "properties.hasLinuxWorkers") + private Boolean hasLinuxWorkers; + + /** + * Key Vault ID for ILB App Service Environment default SSL certificate. + */ + @JsonProperty(value = "properties.sslCertKeyVaultId") + private String sslCertKeyVaultId; + + /** + * Key Vault Secret Name for ILB App Service Environment default SSL + * certificate. + */ + @JsonProperty(value = "properties.sslCertKeyVaultSecretName") + private String sslCertKeyVaultSecretName; + + /** + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get name of the App Service Environment. + * + * @return the appServiceEnvironmentResourceName value + */ + public String appServiceEnvironmentResourceName() { + return this.appServiceEnvironmentResourceName; + } + + /** + * Set name of the App Service Environment. + * + * @param appServiceEnvironmentResourceName the appServiceEnvironmentResourceName value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withAppServiceEnvironmentResourceName(String appServiceEnvironmentResourceName) { + this.appServiceEnvironmentResourceName = appServiceEnvironmentResourceName; + return this; + } + + /** + * Get location of the App Service Environment, e.g. "West US". + * + * @return the appServiceEnvironmentResourceLocation value + */ + public String appServiceEnvironmentResourceLocation() { + return this.appServiceEnvironmentResourceLocation; + } + + /** + * Set location of the App Service Environment, e.g. "West US". + * + * @param appServiceEnvironmentResourceLocation the appServiceEnvironmentResourceLocation value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withAppServiceEnvironmentResourceLocation(String appServiceEnvironmentResourceLocation) { + this.appServiceEnvironmentResourceLocation = appServiceEnvironmentResourceLocation; + return this; + } + + /** + * Get provisioning state of the App Service Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get current status of the App Service Environment. Possible values include: 'Preparing', 'Ready', 'Scaling', 'Deleting'. + * + * @return the status value + */ + public HostingEnvironmentStatus status() { + return this.status; + } + + /** + * Get name of the Virtual Network for the App Service Environment. + * + * @return the vnetName value + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set name of the Virtual Network for the App Service Environment. + * + * @param vnetName the vnetName value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get resource group of the Virtual Network. + * + * @return the vnetResourceGroupName value + */ + public String vnetResourceGroupName() { + return this.vnetResourceGroupName; + } + + /** + * Set resource group of the Virtual Network. + * + * @param vnetResourceGroupName the vnetResourceGroupName value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withVnetResourceGroupName(String vnetResourceGroupName) { + this.vnetResourceGroupName = vnetResourceGroupName; + return this; + } + + /** + * Get subnet of the Virtual Network. + * + * @return the vnetSubnetName value + */ + public String vnetSubnetName() { + return this.vnetSubnetName; + } + + /** + * Set subnet of the Virtual Network. + * + * @param vnetSubnetName the vnetSubnetName value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withVnetSubnetName(String vnetSubnetName) { + this.vnetSubnetName = vnetSubnetName; + return this; + } + + /** + * Get description of the Virtual Network. + * + * @return the virtualNetwork value + */ + public VirtualNetworkProfile virtualNetwork() { + return this.virtualNetwork; + } + + /** + * Set description of the Virtual Network. + * + * @param virtualNetwork the virtualNetwork value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withVirtualNetwork(VirtualNetworkProfile virtualNetwork) { + this.virtualNetwork = virtualNetwork; + return this; + } + + /** + * Get specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values include: 'None', 'Web', 'Publishing'. + * + * @return the internalLoadBalancingMode value + */ + public InternalLoadBalancingMode internalLoadBalancingMode() { + return this.internalLoadBalancingMode; + } + + /** + * Set specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values include: 'None', 'Web', 'Publishing'. + * + * @param internalLoadBalancingMode the internalLoadBalancingMode value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withInternalLoadBalancingMode(InternalLoadBalancingMode internalLoadBalancingMode) { + this.internalLoadBalancingMode = internalLoadBalancingMode; + return this; + } + + /** + * Get front-end VM size, e.g. "Medium", "Large". + * + * @return the multiSize value + */ + public String multiSize() { + return this.multiSize; + } + + /** + * Set front-end VM size, e.g. "Medium", "Large". + * + * @param multiSize the multiSize value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withMultiSize(String multiSize) { + this.multiSize = multiSize; + return this; + } + + /** + * Get number of front-end instances. + * + * @return the multiRoleCount value + */ + public Integer multiRoleCount() { + return this.multiRoleCount; + } + + /** + * Set number of front-end instances. + * + * @param multiRoleCount the multiRoleCount value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withMultiRoleCount(Integer multiRoleCount) { + this.multiRoleCount = multiRoleCount; + return this; + } + + /** + * Get description of worker pools with worker size IDs, VM sizes, and number of workers in each pool. + * + * @return the workerPools value + */ + public List workerPools() { + return this.workerPools; + } + + /** + * Set description of worker pools with worker size IDs, VM sizes, and number of workers in each pool. + * + * @param workerPools the workerPools value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withWorkerPools(List workerPools) { + this.workerPools = workerPools; + return this; + } + + /** + * Get number of IP SSL addresses reserved for the App Service Environment. + * + * @return the ipsslAddressCount value + */ + public Integer ipsslAddressCount() { + return this.ipsslAddressCount; + } + + /** + * Set number of IP SSL addresses reserved for the App Service Environment. + * + * @param ipsslAddressCount the ipsslAddressCount value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withIpsslAddressCount(Integer ipsslAddressCount) { + this.ipsslAddressCount = ipsslAddressCount; + return this; + } + + /** + * Get edition of the metadata database for the App Service Environment, e.g. "Standard". + * + * @return the databaseEdition value + */ + public String databaseEdition() { + return this.databaseEdition; + } + + /** + * Get service objective of the metadata database for the App Service Environment, e.g. "S0". + * + * @return the databaseServiceObjective value + */ + public String databaseServiceObjective() { + return this.databaseServiceObjective; + } + + /** + * Get number of upgrade domains of the App Service Environment. + * + * @return the upgradeDomains value + */ + public Integer upgradeDomains() { + return this.upgradeDomains; + } + + /** + * Get subscription of the App Service Environment. + * + * @return the subscriptionId value + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Get dNS suffix of the App Service Environment. + * + * @return the dnsSuffix value + */ + public String dnsSuffix() { + return this.dnsSuffix; + } + + /** + * Set dNS suffix of the App Service Environment. + * + * @param dnsSuffix the dnsSuffix value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withDnsSuffix(String dnsSuffix) { + this.dnsSuffix = dnsSuffix; + return this; + } + + /** + * Get last deployment action on the App Service Environment. + * + * @return the lastAction value + */ + public String lastAction() { + return this.lastAction; + } + + /** + * Get result of the last deployment action on the App Service Environment. + * + * @return the lastActionResult value + */ + public String lastActionResult() { + return this.lastActionResult; + } + + /** + * Get list of comma separated strings describing which VM sizes are allowed for front-ends. + * + * @return the allowedMultiSizes value + */ + public String allowedMultiSizes() { + return this.allowedMultiSizes; + } + + /** + * Get list of comma separated strings describing which VM sizes are allowed for workers. + * + * @return the allowedWorkerSizes value + */ + public String allowedWorkerSizes() { + return this.allowedWorkerSizes; + } + + /** + * Get maximum number of VMs in the App Service Environment. + * + * @return the maximumNumberOfMachines value + */ + public Integer maximumNumberOfMachines() { + return this.maximumNumberOfMachines; + } + + /** + * Get description of IP SSL mapping for the App Service Environment. + * + * @return the vipMappings value + */ + public List vipMappings() { + return this.vipMappings; + } + + /** + * Get current total, used, and available worker capacities. + * + * @return the environmentCapacities value + */ + public List environmentCapacities() { + return this.environmentCapacities; + } + + /** + * Get access control list for controlling traffic to the App Service Environment. + * + * @return the networkAccessControlList value + */ + public List networkAccessControlList() { + return this.networkAccessControlList; + } + + /** + * Set access control list for controlling traffic to the App Service Environment. + * + * @param networkAccessControlList the networkAccessControlList value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withNetworkAccessControlList(List networkAccessControlList) { + this.networkAccessControlList = networkAccessControlList; + return this; + } + + /** + * Get true/false indicating whether the App Service Environment is healthy. + * + * @return the environmentIsHealthy value + */ + public Boolean environmentIsHealthy() { + return this.environmentIsHealthy; + } + + /** + * Get detailed message about with results of the last check of the App Service Environment. + * + * @return the environmentStatus value + */ + public String environmentStatus() { + return this.environmentStatus; + } + + /** + * Get resource group of the App Service Environment. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get scale factor for front-ends. + * + * @return the frontEndScaleFactor value + */ + public Integer frontEndScaleFactor() { + return this.frontEndScaleFactor; + } + + /** + * Set scale factor for front-ends. + * + * @param frontEndScaleFactor the frontEndScaleFactor value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withFrontEndScaleFactor(Integer frontEndScaleFactor) { + this.frontEndScaleFactor = frontEndScaleFactor; + return this; + } + + /** + * Get default Scale Factor for FrontEnds. + * + * @return the defaultFrontEndScaleFactor value + */ + public Integer defaultFrontEndScaleFactor() { + return this.defaultFrontEndScaleFactor; + } + + /** + * Get aPI Management Account associated with the App Service Environment. + * + * @return the apiManagementAccountId value + */ + public String apiManagementAccountId() { + return this.apiManagementAccountId; + } + + /** + * Set aPI Management Account associated with the App Service Environment. + * + * @param apiManagementAccountId the apiManagementAccountId value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withApiManagementAccountId(String apiManagementAccountId) { + this.apiManagementAccountId = apiManagementAccountId; + return this; + } + + /** + * Get <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). + * + * @return the suspended value + */ + public Boolean suspended() { + return this.suspended; + } + + /** + * Set <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). + * + * @param suspended the suspended value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withSuspended(Boolean suspended) { + this.suspended = suspended; + return this; + } + + /** + * Get 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). + * + * @return the dynamicCacheEnabled value + */ + public Boolean dynamicCacheEnabled() { + return this.dynamicCacheEnabled; + } + + /** + * Set 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). + * + * @param dynamicCacheEnabled the dynamicCacheEnabled value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withDynamicCacheEnabled(Boolean dynamicCacheEnabled) { + this.dynamicCacheEnabled = dynamicCacheEnabled; + return this; + } + + /** + * Get custom settings for changing the behavior of the App Service Environment. + * + * @return the clusterSettings value + */ + public List clusterSettings() { + return this.clusterSettings; + } + + /** + * Set custom settings for changing the behavior of the App Service Environment. + * + * @param clusterSettings the clusterSettings value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withClusterSettings(List clusterSettings) { + this.clusterSettings = clusterSettings; + return this; + } + + /** + * Get user added ip ranges to whitelist on ASE db. + * + * @return the userWhitelistedIpRanges value + */ + public List userWhitelistedIpRanges() { + return this.userWhitelistedIpRanges; + } + + /** + * Set user added ip ranges to whitelist on ASE db. + * + * @param userWhitelistedIpRanges the userWhitelistedIpRanges value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withUserWhitelistedIpRanges(List userWhitelistedIpRanges) { + this.userWhitelistedIpRanges = userWhitelistedIpRanges; + return this; + } + + /** + * Get flag that displays whether an ASE has linux workers or not. + * + * @return the hasLinuxWorkers value + */ + public Boolean hasLinuxWorkers() { + return this.hasLinuxWorkers; + } + + /** + * Set flag that displays whether an ASE has linux workers or not. + * + * @param hasLinuxWorkers the hasLinuxWorkers value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withHasLinuxWorkers(Boolean hasLinuxWorkers) { + this.hasLinuxWorkers = hasLinuxWorkers; + return this; + } + + /** + * Get key Vault ID for ILB App Service Environment default SSL certificate. + * + * @return the sslCertKeyVaultId value + */ + public String sslCertKeyVaultId() { + return this.sslCertKeyVaultId; + } + + /** + * Set key Vault ID for ILB App Service Environment default SSL certificate. + * + * @param sslCertKeyVaultId the sslCertKeyVaultId value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withSslCertKeyVaultId(String sslCertKeyVaultId) { + this.sslCertKeyVaultId = sslCertKeyVaultId; + return this; + } + + /** + * Get key Vault Secret Name for ILB App Service Environment default SSL certificate. + * + * @return the sslCertKeyVaultSecretName value + */ + public String sslCertKeyVaultSecretName() { + return this.sslCertKeyVaultSecretName; + } + + /** + * Set key Vault Secret Name for ILB App Service Environment default SSL certificate. + * + * @param sslCertKeyVaultSecretName the sslCertKeyVaultSecretName value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withSslCertKeyVaultSecretName(String sslCertKeyVaultSecretName) { + this.sslCertKeyVaultSecretName = sslCertKeyVaultSecretName; + return this; + } + + /** + * Get kind of resource. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Set kind of resource. + * + * @param kind the kind value to set + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withKind(String kind) { + this.kind = kind; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceEnvironmentsImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceEnvironmentsImpl.java new file mode 100644 index 0000000000000..efcf2d36ffdcc --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceEnvironmentsImpl.java @@ -0,0 +1,647 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceEnvironments; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceEnvironmentResource; +import com.microsoft.azure.Page; +import rx.Completable; +import com.microsoft.azure.management.appservice.v2019_08_01.Sites; +import com.microsoft.azure.management.appservice.v2019_08_01.VirtualNetworkProfile; +import com.microsoft.azure.management.appservice.v2019_08_01.StampCapacity; +import com.microsoft.azure.management.appservice.v2019_08_01.AddressResponse; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentDiagnostics; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.InboundEnvironmentEndpoint; +import com.microsoft.azure.management.appservice.v2019_08_01.MultiRolePools; +import com.microsoft.azure.management.appservice.v2019_08_01.ResourceMetricDefinition; +import com.microsoft.azure.management.appservice.v2019_08_01.SkuInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.Usage; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteCsmUsageQuota; +import com.microsoft.azure.management.appservice.v2019_08_01.Operation; +import com.microsoft.azure.management.appservice.v2019_08_01.OutboundEnvironmentEndpoint; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentAppServicePlan; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentSite; +import com.microsoft.azure.management.appservice.v2019_08_01.WorkerPools; + +class AppServiceEnvironmentsImpl extends WrapperImpl implements AppServiceEnvironments { + private final CertificateRegistrationManager manager; + + AppServiceEnvironmentsImpl(CertificateRegistrationManager manager) { + super(manager.inner().appServiceEnvironments()); + this.manager = manager; + } + + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public AppServiceEnvironmentResourceImpl defineHostingEnvironment(String name) { + return wrapHostingEnvironmentModel(name); + } + + @Override + public WorkerPoolsImpl defineWorkerPool(String name) { + return wrapWorkerPoolModel(name); + } + + private AppServiceEnvironmentResourceImpl wrapHostingEnvironmentModel(String name) { + return new AppServiceEnvironmentResourceImpl(name, new AppServiceEnvironmentResourceInner(), this.manager()); + } + + private WorkerPoolsImpl wrapWorkerPoolModel(String name) { + return new WorkerPoolsImpl(name, this.manager()); + } + + private AppServiceEnvironmentResourceImpl wrapAppServiceEnvironmentResourceModel(AppServiceEnvironmentResourceInner inner) { + return new AppServiceEnvironmentResourceImpl(inner.name(), inner, manager()); + } + + private HostingEnvironmentDiagnosticsImpl wrapHostingEnvironmentDiagnosticsModel(HostingEnvironmentDiagnosticsInner inner) { + return new HostingEnvironmentDiagnosticsImpl(inner, manager()); + } + + private InboundEnvironmentEndpointImpl wrapInboundEnvironmentEndpointModel(InboundEnvironmentEndpointInner inner) { + return new InboundEnvironmentEndpointImpl(inner, manager()); + } + + private MultiRolePoolsImpl wrapMultiRolePoolsModel(WorkerPoolResourceInner inner) { + return new MultiRolePoolsImpl(inner, manager()); + } + + private ResourceMetricDefinitionImpl wrapResourceMetricDefinitionModel(ResourceMetricDefinitionInner inner) { + return new ResourceMetricDefinitionImpl(inner, manager()); + } + + private OperationImpl wrapOperationModel(OperationInner inner) { + return new OperationImpl(inner, manager()); + } + + private OutboundEnvironmentEndpointImpl wrapOutboundEnvironmentEndpointModel(OutboundEnvironmentEndpointInner inner) { + return new OutboundEnvironmentEndpointImpl(inner, manager()); + } + + private HostingEnvironmentAppServicePlanImpl wrapHostingEnvironmentAppServicePlanModel(AppServicePlanInner inner) { + return new HostingEnvironmentAppServicePlanImpl(inner, manager()); + } + + private HostingEnvironmentSiteImpl wrapHostingEnvironmentSiteModel(SiteInner inner) { + return new HostingEnvironmentSiteImpl(inner, manager()); + } + + private WorkerPoolsImpl wrapWorkerPoolsModel(WorkerPoolResourceInner inner) { + return new WorkerPoolsImpl(inner, manager()); + } + + private Observable getAppServiceEnvironmentResourceInnerUsingAppServiceEnvironmentsInnerAsync(String resourceGroupName, String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + private Observable getHostingEnvironmentDiagnosticsInnerUsingAppServiceEnvironmentsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "hostingEnvironments"); + String diagnosticsName = IdParsingUtils.getValueFromIdByName(id, "diagnostics"); + AppServiceEnvironmentsInner client = this.inner(); + return client.getDiagnosticsItemAsync(resourceGroupName, name, diagnosticsName); + } + + private Observable getWorkerPoolResourceInnerUsingAppServiceEnvironmentsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "hostingEnvironments"); + String workerPoolName = IdParsingUtils.getValueFromIdByName(id, "workerPools"); + AppServiceEnvironmentsInner client = this.inner(); + return client.getWorkerPoolAsync(resourceGroupName, name, workerPoolName); + } + + @Override + public Observable getByResourceGroupAsync(String resourceGroupName, String name) { + return this.getAppServiceEnvironmentResourceInnerUsingAppServiceEnvironmentsInnerAsync(resourceGroupName, name).flatMap(new Func1> () { + @Override + public Observable call(AppServiceEnvironmentResourceInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((AppServiceEnvironmentResource)wrapAppServiceEnvironmentResourceModel(inner)); + } + } + }); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AppServiceEnvironmentResource call(AppServiceEnvironmentResourceInner inner) { + return wrapAppServiceEnvironmentResourceModel(inner); + } + }); + } + + @Override + public Observable listAsync() { + AppServiceEnvironmentsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AppServiceEnvironmentResource call(AppServiceEnvironmentResourceInner inner) { + return wrapAppServiceEnvironmentResourceModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String name) { + return this.inner().deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable changeVnetAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo) { + AppServiceEnvironmentsInner client = this.inner(); + return client.changeVnetAsync(resourceGroupName, name, vnetInfo) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Sites call(SiteInner inner) { + return new SitesImpl(inner.name(), inner, manager()); + } + }); + } + + @Override + public Completable rebootAsync(String resourceGroupName, String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.rebootAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable resumeAsync(final String resourceGroupName, final String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.resumeAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Sites call(SiteInner inner) { + return new SitesImpl(inner.name(), inner, manager()); + } + }); + } + + @Override + public Observable suspendAsync(final String resourceGroupName, final String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.suspendAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Sites call(SiteInner inner) { + return new SitesImpl(inner.name(), inner, manager()); + } + }); + } + + @Override + public Observable listCapacitiesAsync(final String resourceGroupName, final String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listCapacitiesAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StampCapacity call(StampCapacityInner inner) { + return new StampCapacityImpl(inner, manager()); + } + }); + } + + @Override + public Observable getVipInfoAsync(String resourceGroupName, String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.getVipInfoAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public AddressResponse call(AddressResponseInner inner) { + return new AddressResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable getDiagnosticsItemAsync(String resourceGroupName, String name, String diagnosticsName) { + AppServiceEnvironmentsInner client = this.inner(); + return client.getDiagnosticsItemAsync(resourceGroupName, name, diagnosticsName) + .flatMap(new Func1>() { + @Override + public Observable call(HostingEnvironmentDiagnosticsInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((HostingEnvironmentDiagnostics)wrapHostingEnvironmentDiagnosticsModel(inner)); + } + } + }); + } + + @Override + public Observable listDiagnosticsAsync(String resourceGroupName, String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listDiagnosticsAsync(resourceGroupName, name) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public HostingEnvironmentDiagnostics call(HostingEnvironmentDiagnosticsInner inner) { + return wrapHostingEnvironmentDiagnosticsModel(inner); + } + }); + } + + @Override + public Observable getInboundNetworkDependenciesEndpointsAsync(final String resourceGroupName, final String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.getInboundNetworkDependenciesEndpointsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public InboundEnvironmentEndpoint call(InboundEnvironmentEndpointInner inner) { + return wrapInboundEnvironmentEndpointModel(inner); + } + }); + } + + @Override + public Observable listMultiRolePoolsAsync(final String resourceGroupName, final String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listMultiRolePoolsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public MultiRolePools call(WorkerPoolResourceInner inner) { + return wrapMultiRolePoolsModel(inner); + } + }); + } + + @Override + public Observable getMultiRolePoolAsync(String resourceGroupName, String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.getMultiRolePoolAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public MultiRolePools call(WorkerPoolResourceInner inner) { + return new MultiRolePoolsImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + AppServiceEnvironmentsInner client = this.inner(); + return client.createOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope) + .map(new Func1() { + @Override + public MultiRolePools call(WorkerPoolResourceInner inner) { + return new MultiRolePoolsImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateMultiRolePoolAsync(String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + AppServiceEnvironmentsInner client = this.inner(); + return client.updateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope) + .map(new Func1() { + @Override + public MultiRolePools call(WorkerPoolResourceInner inner) { + return new MultiRolePoolsImpl(inner, manager()); + } + }); + } + + @Override + public Observable listMultiRolePoolInstanceMetricDefinitionsAsync(final String resourceGroupName, final String name, final String instance) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listMultiRolePoolInstanceMetricDefinitionsAsync(resourceGroupName, name, instance) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ResourceMetricDefinition call(ResourceMetricDefinitionInner inner) { + return wrapResourceMetricDefinitionModel(inner); + } + }); + } + + @Override + public Observable listMultiRoleMetricDefinitionsAsync(final String resourceGroupName, final String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listMultiRoleMetricDefinitionsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ResourceMetricDefinition call(ResourceMetricDefinitionInner inner) { + return new ResourceMetricDefinitionImpl(inner, manager()); + } + }); + } + + @Override + public Observable listWorkerPoolInstanceMetricDefinitionsAsync(final String resourceGroupName, final String name, final String workerPoolName, final String instance) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listWorkerPoolInstanceMetricDefinitionsAsync(resourceGroupName, name, workerPoolName, instance) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ResourceMetricDefinition call(ResourceMetricDefinitionInner inner) { + return new ResourceMetricDefinitionImpl(inner, manager()); + } + }); + } + + @Override + public Observable listWebWorkerMetricDefinitionsAsync(final String resourceGroupName, final String name, final String workerPoolName) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listWebWorkerMetricDefinitionsAsync(resourceGroupName, name, workerPoolName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ResourceMetricDefinition call(ResourceMetricDefinitionInner inner) { + return new ResourceMetricDefinitionImpl(inner, manager()); + } + }); + } + + @Override + public Observable listMultiRolePoolSkusAsync(final String resourceGroupName, final String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listMultiRolePoolSkusAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SkuInfo call(SkuInfoInner inner) { + return new SkuInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable listWorkerPoolSkusAsync(final String resourceGroupName, final String name, final String workerPoolName) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listWorkerPoolSkusAsync(resourceGroupName, name, workerPoolName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SkuInfo call(SkuInfoInner inner) { + return new SkuInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable listMultiRoleUsagesAsync(final String resourceGroupName, final String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listMultiRoleUsagesAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Usage call(UsageInner inner) { + return new UsageImpl(inner, manager()); + } + }); + } + + @Override + public Observable listUsagesAsync(final String resourceGroupName, final String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listUsagesAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SiteCsmUsageQuota call(CsmUsageQuotaInner inner) { + return new SiteCsmUsageQuotaImpl(inner, manager()); + } + }); + } + + @Override + public Observable listWebWorkerUsagesAsync(final String resourceGroupName, final String name, final String workerPoolName) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listWebWorkerUsagesAsync(resourceGroupName, name, workerPoolName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Usage call(UsageInner inner) { + return new UsageImpl(inner, manager()); + } + }); + } + + @Override + public Observable listOperationsAsync(String resourceGroupName, String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listOperationsAsync(resourceGroupName, name) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public Operation call(OperationInner inner) { + return wrapOperationModel(inner); + } + }); + } + + @Override + public Observable getOutboundNetworkDependenciesEndpointsAsync(final String resourceGroupName, final String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.getOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public OutboundEnvironmentEndpoint call(OutboundEnvironmentEndpointInner inner) { + return wrapOutboundEnvironmentEndpointModel(inner); + } + }); + } + + @Override + public Observable listAppServicePlansAsync(final String resourceGroupName, final String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listAppServicePlansAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public HostingEnvironmentAppServicePlan call(AppServicePlanInner inner) { + return wrapHostingEnvironmentAppServicePlanModel(inner); + } + }); + } + + @Override + public Observable listWebAppsAsync(final String resourceGroupName, final String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listWebAppsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public HostingEnvironmentSite call(SiteInner inner) { + return wrapHostingEnvironmentSiteModel(inner); + } + }); + } + + @Override + public Observable getWorkerPoolAsync(String resourceGroupName, String name, String workerPoolName) { + AppServiceEnvironmentsInner client = this.inner(); + return client.getWorkerPoolAsync(resourceGroupName, name, workerPoolName) + .flatMap(new Func1>() { + @Override + public Observable call(WorkerPoolResourceInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((WorkerPools)wrapWorkerPoolsModel(inner)); + } + } + }); + } + + @Override + public Observable listWorkerPoolsAsync(final String resourceGroupName, final String name) { + AppServiceEnvironmentsInner client = this.inner(); + return client.listWorkerPoolsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public WorkerPools call(WorkerPoolResourceInner inner) { + return wrapWorkerPoolsModel(inner); + } + }); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceEnvironmentsInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceEnvironmentsInner.java new file mode 100644 index 0000000000000..a52d959231f0f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceEnvironmentsInner.java @@ -0,0 +1,8423 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceEnvironmentPatchResource; +import com.microsoft.azure.management.appservice.v2019_08_01.DefaultErrorResponseException; +import com.microsoft.azure.management.appservice.v2019_08_01.VirtualNetworkProfile; +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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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 AppServiceEnvironmentPatchResource 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.appservice.v2019_08_01.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.appservice.v2019_08_01.AppServiceEnvironments getVipInfo" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip") + Observable> getVipInfo(@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.appservice.v2019_08_01.AppServiceEnvironments changeVnet" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork") + Observable> changeVnet(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body VirtualNetworkProfile vnetInfo, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.AppServiceEnvironments beginChangeVnet" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork") + Observable> beginChangeVnet(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body VirtualNetworkProfile vnetInfo, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.AppServiceEnvironments getInboundNetworkDependenciesEndpoints" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints") + Observable> getInboundNetworkDependenciesEndpoints(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.AppServiceEnvironments getOutboundNetworkDependenciesEndpoints" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints") + Observable> getOutboundNetworkDependenciesEndpoints(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.AppServiceEnvironments changeVnetNext" }) + @GET + Observable> changeVnetNext(@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.appservice.v2019_08_01.AppServiceEnvironments beginChangeVnetNext" }) + @GET + Observable> beginChangeVnetNext(@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.appservice.v2019_08_01.AppServiceEnvironments getInboundNetworkDependenciesEndpointsNext" }) + @GET + Observable> getInboundNetworkDependenciesEndpointsNext(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.AppServiceEnvironments getOutboundNetworkDependenciesEndpointsNext" }) + @GET + Observable> getOutboundNetworkDependenciesEndpointsNext(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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. + * Description for Get all App Service Environments for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all App Service Environments in a resource group. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the properties of an App Service Environment. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Create or update an App Service Environment. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(hostingEnvironmentEnvelope); + Observable> observable = service.createOrUpdate(resourceGroupName, name, this.client.subscriptionId(), hostingEnvironmentEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update an App Service Environment. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(hostingEnvironmentEnvelope); + return service.beginCreateOrUpdate(resourceGroupName, name, this.client.subscriptionId(), hostingEnvironmentEnvelope, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete an App Service Environment. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean forceDelete = null; + Observable> observable = service.delete(resourceGroupName, name, this.client.subscriptionId(), forceDelete, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Delete an App Service Environment. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(resourceGroupName, name, this.client.subscriptionId(), forceDelete, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete an App Service Environment. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean forceDelete = null; + return service.beginDelete(resourceGroupName, name, this.client.subscriptionId(), forceDelete, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Delete an App Service Environment. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(resourceGroupName, name, this.client.subscriptionId(), forceDelete, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Create or update an App Service Environment. + * Description for 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 DefaultErrorResponseException 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, AppServiceEnvironmentPatchResource hostingEnvironmentEnvelope) { + return updateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).toBlocking().single().body(); + } + + /** + * Create or update an App Service Environment. + * Description for 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, AppServiceEnvironmentPatchResource hostingEnvironmentEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope), serviceCallback); + } + + /** + * Create or update an App Service Environment. + * Description for 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, AppServiceEnvironmentPatchResource 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. + * Description for 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, AppServiceEnvironmentPatchResource 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(hostingEnvironmentEnvelope); + return service.update(resourceGroupName, name, this.client.subscriptionId(), hostingEnvironmentEnvelope, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the used, available, and total worker capacity an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listCapacities(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listCapacitiesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listCapacitiesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get IP addresses assigned to an App Service Environment. + * Description for 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 DefaultErrorResponseException 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 getVipInfo(String resourceGroupName, String name) { + return getVipInfoWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Get IP addresses assigned to an App Service Environment. + * Description for 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 getVipInfoAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVipInfoWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Get IP addresses assigned to an App Service Environment. + * Description for 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 getVipInfoAsync(String resourceGroupName, String name) { + return getVipInfoWithServiceResponseAsync(resourceGroupName, name).map(new Func1, AddressResponseInner>() { + @Override + public AddressResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get IP addresses assigned to an App Service Environment. + * Description for 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> getVipInfoWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getVipInfo(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVipInfoDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVipInfoDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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 changeVnet(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo) { + ServiceResponse> response = changeVnetSinglePageAsync(resourceGroupName, name, vnetInfo).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return changeVnetNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new 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> changeVnetAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + changeVnetSinglePageAsync(resourceGroupName, name, vnetInfo), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return changeVnetNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> changeVnetAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo) { + return changeVnetWithServiceResponseAsync(resourceGroupName, name, vnetInfo) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> changeVnetWithServiceResponseAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo) { + return changeVnetSinglePageAsync(resourceGroupName, name, vnetInfo) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(changeVnetNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + ServiceResponse> * @param vnetInfo Details for the new virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> changeVnetSinglePageAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo) { + if (resourceGroupName == null) { + throw new 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 (vnetInfo == null) { + throw new IllegalArgumentException("Parameter vnetInfo is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(vnetInfo); + return service.changeVnet(resourceGroupName, name, this.client.subscriptionId(), vnetInfo, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = changeVnetDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> changeVnetDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException, InterruptedException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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 beginChangeVnet(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo) { + ServiceResponse> response = beginChangeVnetSinglePageAsync(resourceGroupName, name, vnetInfo).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return beginChangeVnetNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new 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> beginChangeVnetAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + beginChangeVnetSinglePageAsync(resourceGroupName, name, vnetInfo), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return beginChangeVnetNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable> beginChangeVnetAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo) { + return beginChangeVnetWithServiceResponseAsync(resourceGroupName, name, vnetInfo) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SiteInner> object + */ + public Observable>> beginChangeVnetWithServiceResponseAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo) { + return beginChangeVnetSinglePageAsync(resourceGroupName, name, vnetInfo) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(beginChangeVnetNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the App Service Environment. + ServiceResponse> * @param vnetInfo Details for the new virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> beginChangeVnetSinglePageAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo) { + if (resourceGroupName == null) { + throw new 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 (vnetInfo == null) { + throw new IllegalArgumentException("Parameter vnetInfo is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(vnetInfo); + return service.beginChangeVnet(resourceGroupName, name, this.client.subscriptionId(), vnetInfo, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = beginChangeVnetDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> beginChangeVnetDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get diagnostic information for an App Service Environment. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listDiagnostics(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listDiagnosticsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDiagnosticsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a diagnostics item for an App Service Environment. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getDiagnosticsItem(resourceGroupName, name, diagnosticsName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDiagnosticsItemDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDiagnosticsItemDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the network endpoints of all inbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all inbound dependencies 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<InboundEnvironmentEndpointInner> object if successful. + */ + public PagedList getInboundNetworkDependenciesEndpoints(final String resourceGroupName, final String name) { + ServiceResponse> response = getInboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getInboundNetworkDependenciesEndpointsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get the network endpoints of all inbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all inbound dependencies 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> getInboundNetworkDependenciesEndpointsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getInboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getInboundNetworkDependenciesEndpointsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get the network endpoints of all inbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all inbound dependencies 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<InboundEnvironmentEndpointInner> object + */ + public Observable> getInboundNetworkDependenciesEndpointsAsync(final String resourceGroupName, final String name) { + return getInboundNetworkDependenciesEndpointsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get the network endpoints of all inbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all inbound dependencies 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<InboundEnvironmentEndpointInner> object + */ + public Observable>> getInboundNetworkDependenciesEndpointsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return getInboundNetworkDependenciesEndpointsSinglePageAsync(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(getInboundNetworkDependenciesEndpointsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get the network endpoints of all inbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all inbound dependencies 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<InboundEnvironmentEndpointInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getInboundNetworkDependenciesEndpointsSinglePageAsync(final String resourceGroupName, final String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getInboundNetworkDependenciesEndpoints(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getInboundNetworkDependenciesEndpointsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getInboundNetworkDependenciesEndpointsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all multi-role pools. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listMultiRolePools(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMultiRolePoolsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRolePoolsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get properties of a multi-role pool. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getMultiRolePool(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Create or update a multi-role pool. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(multiRolePoolEnvelope); + Observable> observable = service.createOrUpdateMultiRolePool(resourceGroupName, name, this.client.subscriptionId(), multiRolePoolEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a multi-role pool. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(multiRolePoolEnvelope); + return service.beginCreateOrUpdateMultiRolePool(resourceGroupName, name, this.client.subscriptionId(), multiRolePoolEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Create or update a multi-role pool. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(multiRolePoolEnvelope); + return service.updateMultiRolePool(resourceGroupName, name, this.client.subscriptionId(), multiRolePoolEnvelope, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listMultiRolePoolInstanceMetricDefinitions(resourceGroupName, name, instance, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMultiRolePoolInstanceMetricDefinitionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRolePoolInstanceMetricDefinitionsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get metric definitions for a multi-role pool of an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listMultiRoleMetricDefinitions(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMultiRoleMetricDefinitionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRoleMetricDefinitionsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get available SKUs for scaling a multi-role pool. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listMultiRolePoolSkus(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMultiRolePoolSkusDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRolePoolSkusDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get usage metrics for a multi-role pool of an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listMultiRoleUsages(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMultiRoleUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMultiRoleUsagesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List all currently running operations on the App Service Environment. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listOperations(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listOperationsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listOperationsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the network endpoints of all outbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all outbound dependencies 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OutboundEnvironmentEndpointInner> object if successful. + */ + public PagedList getOutboundNetworkDependenciesEndpoints(final String resourceGroupName, final String name) { + ServiceResponse> response = getOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get the network endpoints of all outbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all outbound dependencies 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> getOutboundNetworkDependenciesEndpointsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get the network endpoints of all outbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all outbound dependencies 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<OutboundEnvironmentEndpointInner> object + */ + public Observable> getOutboundNetworkDependenciesEndpointsAsync(final String resourceGroupName, final String name) { + return getOutboundNetworkDependenciesEndpointsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get the network endpoints of all outbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all outbound dependencies 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<OutboundEnvironmentEndpointInner> object + */ + public Observable>> getOutboundNetworkDependenciesEndpointsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return getOutboundNetworkDependenciesEndpointsSinglePageAsync(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(getOutboundNetworkDependenciesEndpointsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get the network endpoints of all outbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all outbound dependencies 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<OutboundEnvironmentEndpointInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getOutboundNetworkDependenciesEndpointsSinglePageAsync(final String resourceGroupName, final String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getOutboundNetworkDependenciesEndpoints(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getOutboundNetworkDependenciesEndpointsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getOutboundNetworkDependenciesEndpointsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Reboot all machines in an App Service Environment. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.reboot(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = rebootDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse rebootDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Resume an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.resume(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = resumeDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> resumeDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException, InterruptedException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Resume an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginResume(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = beginResumeDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> beginResumeDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all App Service plans in an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listAppServicePlans(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAppServicePlansDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAppServicePlansDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all apps in an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String propertiesToInclude = null; + return service.listWebApps(resourceGroupName, name, this.client.subscriptionId(), propertiesToInclude, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listWebApps(resourceGroupName, name, this.client.subscriptionId(), propertiesToInclude, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWebAppsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebAppsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Suspend an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.suspend(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = suspendDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> suspendDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException, InterruptedException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Suspend an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginSuspend(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = beginSuspendDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> beginSuspendDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get global usage metrics of an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + return service.listUsages(resourceGroupName, name, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listUsages(resourceGroupName, name, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUsagesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all worker pools of an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listWorkerPools(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWorkerPoolsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWorkerPoolsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get properties of a worker pool. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getWorkerPool(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Create or update a worker pool. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(workerPoolEnvelope); + Observable> observable = service.createOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), workerPoolEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create or update a worker pool. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(workerPoolEnvelope); + return service.beginCreateOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), workerPoolEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Create or update a worker pool. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(workerPoolEnvelope); + return service.updateWorkerPool(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), workerPoolEnvelope, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listWorkerPoolInstanceMetricDefinitions(resourceGroupName, name, workerPoolName, instance, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWorkerPoolInstanceMetricDefinitionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWorkerPoolInstanceMetricDefinitionsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get metric definitions for a worker pool of an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listWebWorkerMetricDefinitions(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWebWorkerMetricDefinitionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebWorkerMetricDefinitionsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get available SKUs for scaling a worker pool. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listWorkerPoolSkus(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWorkerPoolSkusDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWorkerPoolSkusDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get usage metrics for a worker pool of an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listWebWorkerUsages(resourceGroupName, name, workerPoolName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWebWorkerUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebWorkerUsagesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all App Service Environments for a subscription. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all App Service Environments in a resource group. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the used, available, and total worker capacity an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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 changeVnetNext(final String nextPageLink) { + ServiceResponse> response = changeVnetNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return changeVnetNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @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> changeVnetNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + changeVnetNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return changeVnetNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @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> changeVnetNextAsync(final String nextPageLink) { + return changeVnetNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @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>> changeVnetNextWithServiceResponseAsync(final String nextPageLink) { + return changeVnetNextSinglePageAsync(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(changeVnetNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + 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>> changeVnetNextSinglePageAsync(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.changeVnetNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = changeVnetNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> changeVnetNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException, InterruptedException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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 beginChangeVnetNext(final String nextPageLink) { + ServiceResponse> response = beginChangeVnetNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return beginChangeVnetNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @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> beginChangeVnetNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + beginChangeVnetNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return beginChangeVnetNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @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> beginChangeVnetNextAsync(final String nextPageLink) { + return beginChangeVnetNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + * @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>> beginChangeVnetNextWithServiceResponseAsync(final String nextPageLink) { + return beginChangeVnetNextSinglePageAsync(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(beginChangeVnetNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Move an App Service Environment to a different VNET. + * Description for Move an App Service Environment to a different VNET. + * + 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>> beginChangeVnetNextSinglePageAsync(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.beginChangeVnetNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = beginChangeVnetNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> beginChangeVnetNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the network endpoints of all inbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all inbound dependencies 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<InboundEnvironmentEndpointInner> object if successful. + */ + public PagedList getInboundNetworkDependenciesEndpointsNext(final String nextPageLink) { + ServiceResponse> response = getInboundNetworkDependenciesEndpointsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getInboundNetworkDependenciesEndpointsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get the network endpoints of all inbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all inbound dependencies 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> getInboundNetworkDependenciesEndpointsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getInboundNetworkDependenciesEndpointsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getInboundNetworkDependenciesEndpointsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get the network endpoints of all inbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all inbound dependencies 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<InboundEnvironmentEndpointInner> object + */ + public Observable> getInboundNetworkDependenciesEndpointsNextAsync(final String nextPageLink) { + return getInboundNetworkDependenciesEndpointsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get the network endpoints of all inbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all inbound dependencies 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<InboundEnvironmentEndpointInner> object + */ + public Observable>> getInboundNetworkDependenciesEndpointsNextWithServiceResponseAsync(final String nextPageLink) { + return getInboundNetworkDependenciesEndpointsNextSinglePageAsync(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(getInboundNetworkDependenciesEndpointsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get the network endpoints of all inbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all inbound dependencies 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<InboundEnvironmentEndpointInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getInboundNetworkDependenciesEndpointsNextSinglePageAsync(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.getInboundNetworkDependenciesEndpointsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getInboundNetworkDependenciesEndpointsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getInboundNetworkDependenciesEndpointsNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all multi-role pools. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get metric definitions for a multi-role pool of an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get available SKUs for scaling a multi-role pool. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get usage metrics for a multi-role pool of an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the network endpoints of all outbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all outbound dependencies 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OutboundEnvironmentEndpointInner> object if successful. + */ + public PagedList getOutboundNetworkDependenciesEndpointsNext(final String nextPageLink) { + ServiceResponse> response = getOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get the network endpoints of all outbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all outbound dependencies 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> getOutboundNetworkDependenciesEndpointsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get the network endpoints of all outbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all outbound dependencies 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<OutboundEnvironmentEndpointInner> object + */ + public Observable> getOutboundNetworkDependenciesEndpointsNextAsync(final String nextPageLink) { + return getOutboundNetworkDependenciesEndpointsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get the network endpoints of all outbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all outbound dependencies 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<OutboundEnvironmentEndpointInner> object + */ + public Observable>> getOutboundNetworkDependenciesEndpointsNextWithServiceResponseAsync(final String nextPageLink) { + return getOutboundNetworkDependenciesEndpointsNextSinglePageAsync(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(getOutboundNetworkDependenciesEndpointsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get the network endpoints of all outbound dependencies of an App Service Environment. + * Description for Get the network endpoints of all outbound dependencies 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<OutboundEnvironmentEndpointInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getOutboundNetworkDependenciesEndpointsNextSinglePageAsync(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.getOutboundNetworkDependenciesEndpointsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getOutboundNetworkDependenciesEndpointsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getOutboundNetworkDependenciesEndpointsNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Resume an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException, InterruptedException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Resume an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all App Service plans in an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all apps in an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Suspend an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException, InterruptedException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Suspend an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get global usage metrics of an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all worker pools of an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get metric definitions for a worker pool of an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get available SKUs for scaling a worker pool. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get usage metrics for a worker pool of an App Service Environment. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServicePlanImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServicePlanImpl.java new file mode 100644 index 0000000000000..693ff6dcaabc6 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServicePlanImpl.java @@ -0,0 +1,313 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServicePlan; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServicePlanPatchResource; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.StatusOptions; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentProfile; +import com.microsoft.azure.management.appservice.v2019_08_01.ProvisioningState; +import com.microsoft.azure.management.appservice.v2019_08_01.SkuDescription; +import rx.functions.Func1; + +class AppServicePlanImpl extends GroupableResourceCoreImpl implements AppServicePlan, AppServicePlan.Definition, AppServicePlan.Update { + private AppServicePlanPatchResource updateParameter; + AppServicePlanImpl(String name, AppServicePlanInner inner, CertificateRegistrationManager manager) { + super(name, inner, manager); + this.updateParameter = new AppServicePlanPatchResource(); + } + + @Override + public Observable createResourceAsync() { + AppServicePlansInner client = this.manager().inner().appServicePlans(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(new Func1() { + @Override + public AppServicePlanInner call(AppServicePlanInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + AppServicePlansInner client = this.manager().inner().appServicePlans(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter) + .map(new Func1() { + @Override + public AppServicePlanInner call(AppServicePlanInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + AppServicePlansInner client = this.manager().inner().appServicePlans(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.updateParameter = new AppServicePlanPatchResource(); + } + + @Override + public DateTime freeOfferExpirationTime() { + return this.inner().freeOfferExpirationTime(); + } + + @Override + public String geoRegion() { + return this.inner().geoRegion(); + } + + @Override + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.inner().hostingEnvironmentProfile(); + } + + @Override + public Boolean hyperV() { + return this.inner().hyperV(); + } + + @Override + public Boolean isSpot() { + return this.inner().isSpot(); + } + + @Override + public Boolean isXenon() { + return this.inner().isXenon(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public Integer maximumElasticWorkerCount() { + return this.inner().maximumElasticWorkerCount(); + } + + @Override + public Integer maximumNumberOfWorkers() { + return this.inner().maximumNumberOfWorkers(); + } + + @Override + public Integer numberOfSites() { + return this.inner().numberOfSites(); + } + + @Override + public Boolean perSiteScaling() { + return this.inner().perSiteScaling(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public Boolean reserved() { + return this.inner().reserved(); + } + + @Override + public String resourceGroup() { + return this.inner().resourceGroup(); + } + + @Override + public SkuDescription sku() { + return this.inner().sku(); + } + + @Override + public DateTime spotExpirationTime() { + return this.inner().spotExpirationTime(); + } + + @Override + public StatusOptions status() { + return this.inner().status(); + } + + @Override + public String subscription() { + return this.inner().subscription(); + } + + @Override + public Integer targetWorkerCount() { + return this.inner().targetWorkerCount(); + } + + @Override + public Integer targetWorkerSizeId() { + return this.inner().targetWorkerSizeId(); + } + + @Override + public String workerTierName() { + return this.inner().workerTierName(); + } + + @Override + public AppServicePlanImpl withSku(SkuDescription sku) { + this.inner().withSku(sku); + return this; + } + + @Override + public AppServicePlanImpl withFreeOfferExpirationTime(DateTime freeOfferExpirationTime) { + if (isInCreateMode()) { + this.inner().withFreeOfferExpirationTime(freeOfferExpirationTime); + } else { + this.updateParameter.withFreeOfferExpirationTime(freeOfferExpirationTime); + } + return this; + } + + @Override + public AppServicePlanImpl withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + if (isInCreateMode()) { + this.inner().withHostingEnvironmentProfile(hostingEnvironmentProfile); + } else { + this.updateParameter.withHostingEnvironmentProfile(hostingEnvironmentProfile); + } + return this; + } + + @Override + public AppServicePlanImpl withHyperV(Boolean hyperV) { + if (isInCreateMode()) { + this.inner().withHyperV(hyperV); + } else { + this.updateParameter.withHyperV(hyperV); + } + return this; + } + + @Override + public AppServicePlanImpl withIsSpot(Boolean isSpot) { + if (isInCreateMode()) { + this.inner().withIsSpot(isSpot); + } else { + this.updateParameter.withIsSpot(isSpot); + } + return this; + } + + @Override + public AppServicePlanImpl withIsXenon(Boolean isXenon) { + if (isInCreateMode()) { + this.inner().withIsXenon(isXenon); + } else { + this.updateParameter.withIsXenon(isXenon); + } + return this; + } + + @Override + public AppServicePlanImpl withKind(String kind) { + if (isInCreateMode()) { + this.inner().withKind(kind); + } else { + this.updateParameter.withKind(kind); + } + return this; + } + + @Override + public AppServicePlanImpl withMaximumElasticWorkerCount(Integer maximumElasticWorkerCount) { + if (isInCreateMode()) { + this.inner().withMaximumElasticWorkerCount(maximumElasticWorkerCount); + } else { + this.updateParameter.withMaximumElasticWorkerCount(maximumElasticWorkerCount); + } + return this; + } + + @Override + public AppServicePlanImpl withPerSiteScaling(Boolean perSiteScaling) { + if (isInCreateMode()) { + this.inner().withPerSiteScaling(perSiteScaling); + } else { + this.updateParameter.withPerSiteScaling(perSiteScaling); + } + return this; + } + + @Override + public AppServicePlanImpl withReserved(Boolean reserved) { + if (isInCreateMode()) { + this.inner().withReserved(reserved); + } else { + this.updateParameter.withReserved(reserved); + } + return this; + } + + @Override + public AppServicePlanImpl withSpotExpirationTime(DateTime spotExpirationTime) { + if (isInCreateMode()) { + this.inner().withSpotExpirationTime(spotExpirationTime); + } else { + this.updateParameter.withSpotExpirationTime(spotExpirationTime); + } + return this; + } + + @Override + public AppServicePlanImpl withTargetWorkerCount(Integer targetWorkerCount) { + if (isInCreateMode()) { + this.inner().withTargetWorkerCount(targetWorkerCount); + } else { + this.updateParameter.withTargetWorkerCount(targetWorkerCount); + } + return this; + } + + @Override + public AppServicePlanImpl withTargetWorkerSizeId(Integer targetWorkerSizeId) { + if (isInCreateMode()) { + this.inner().withTargetWorkerSizeId(targetWorkerSizeId); + } else { + this.updateParameter.withTargetWorkerSizeId(targetWorkerSizeId); + } + return this; + } + + @Override + public AppServicePlanImpl withWorkerTierName(String workerTierName) { + if (isInCreateMode()) { + this.inner().withWorkerTierName(workerTierName); + } else { + this.updateParameter.withWorkerTierName(workerTierName); + } + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServicePlanInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServicePlanInner.java new file mode 100644 index 0000000000000..29e3c9cebb6bf --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServicePlanInner.java @@ -0,0 +1,509 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.StatusOptions; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentProfile; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.ProvisioningState; +import com.microsoft.azure.management.appservice.v2019_08_01.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 { + /** + * 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; + + /** + * 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; + + /** + * Maximum number of total workers allowed for this ElasticScaleEnabled App + * Service Plan. + */ + @JsonProperty(value = "properties.maximumElasticWorkerCount") + private Integer maximumElasticWorkerCount; + + /** + * 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; + + /** + * The time when the server farm free offer expires. + */ + @JsonProperty(value = "properties.freeOfferExpirationTime") + private DateTime freeOfferExpirationTime; + + /** + * 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; + + /** + * Obsolete: If Hyper-V container app service plan + * <code>true</code>, <code>false</code> otherwise. + */ + @JsonProperty(value = "properties.isXenon") + private Boolean isXenon; + + /** + * If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + */ + @JsonProperty(value = "properties.hyperV") + private Boolean hyperV; + + /** + * 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; + + /** + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get target worker tier assigned to the App Service plan. + * + * @return the workerTierName value + */ + public String workerTierName() { + return this.workerTierName; + } + + /** + * Set target worker tier assigned to the App Service plan. + * + * @param workerTierName the workerTierName value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withWorkerTierName(String workerTierName) { + this.workerTierName = workerTierName; + return this; + } + + /** + * Get app Service plan status. Possible values include: 'Ready', 'Pending', 'Creating'. + * + * @return the status value + */ + public StatusOptions status() { + return this.status; + } + + /** + * Get app Service plan subscription. + * + * @return the subscription value + */ + public String subscription() { + return this.subscription; + } + + /** + * Get specification for the App Service Environment to use for the App Service plan. + * + * @return the hostingEnvironmentProfile value + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Set specification for the App Service Environment to use for the App Service plan. + * + * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + this.hostingEnvironmentProfile = hostingEnvironmentProfile; + return this; + } + + /** + * Get maximum number of instances that can be assigned to this App Service plan. + * + * @return the maximumNumberOfWorkers value + */ + public Integer maximumNumberOfWorkers() { + return this.maximumNumberOfWorkers; + } + + /** + * Get geographical location for the App Service plan. + * + * @return the geoRegion value + */ + public String geoRegion() { + return this.geoRegion; + } + + /** + * Get 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. + * + * @return the perSiteScaling value + */ + public Boolean perSiteScaling() { + return this.perSiteScaling; + } + + /** + * Set 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. + * + * @param perSiteScaling the perSiteScaling value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withPerSiteScaling(Boolean perSiteScaling) { + this.perSiteScaling = perSiteScaling; + return this; + } + + /** + * Get maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan. + * + * @return the maximumElasticWorkerCount value + */ + public Integer maximumElasticWorkerCount() { + return this.maximumElasticWorkerCount; + } + + /** + * Set maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan. + * + * @param maximumElasticWorkerCount the maximumElasticWorkerCount value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withMaximumElasticWorkerCount(Integer maximumElasticWorkerCount) { + this.maximumElasticWorkerCount = maximumElasticWorkerCount; + return this; + } + + /** + * Get number of apps assigned to this App Service plan. + * + * @return the numberOfSites value + */ + public Integer numberOfSites() { + return this.numberOfSites; + } + + /** + * Get if <code>true</code>, this App Service Plan owns spot instances. + * + * @return the isSpot value + */ + public Boolean isSpot() { + return this.isSpot; + } + + /** + * Set if <code>true</code>, this App Service Plan owns spot instances. + * + * @param isSpot the isSpot value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withIsSpot(Boolean isSpot) { + this.isSpot = isSpot; + return this; + } + + /** + * Get the time when the server farm expires. Valid only if it is a spot server farm. + * + * @return the spotExpirationTime value + */ + public DateTime spotExpirationTime() { + return this.spotExpirationTime; + } + + /** + * Set the time when the server farm expires. Valid only if it is a spot server farm. + * + * @param spotExpirationTime the spotExpirationTime value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withSpotExpirationTime(DateTime spotExpirationTime) { + this.spotExpirationTime = spotExpirationTime; + return this; + } + + /** + * Get the time when the server farm free offer expires. + * + * @return the freeOfferExpirationTime value + */ + public DateTime freeOfferExpirationTime() { + return this.freeOfferExpirationTime; + } + + /** + * Set the time when the server farm free offer expires. + * + * @param freeOfferExpirationTime the freeOfferExpirationTime value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withFreeOfferExpirationTime(DateTime freeOfferExpirationTime) { + this.freeOfferExpirationTime = freeOfferExpirationTime; + return this; + } + + /** + * Get resource group of the App Service plan. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get if Linux app service plan <code>true</code>, <code>false</code> otherwise. + * + * @return the reserved value + */ + public Boolean reserved() { + return this.reserved; + } + + /** + * Set if Linux app service plan <code>true</code>, <code>false</code> otherwise. + * + * @param reserved the reserved value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withReserved(Boolean reserved) { + this.reserved = reserved; + return this; + } + + /** + * Get obsolete: If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. + * + * @return the isXenon value + */ + public Boolean isXenon() { + return this.isXenon; + } + + /** + * Set obsolete: If Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. + * + * @param isXenon the isXenon value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withIsXenon(Boolean isXenon) { + this.isXenon = isXenon; + return this; + } + + /** + * Get if Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. + * + * @return the hyperV value + */ + public Boolean hyperV() { + return this.hyperV; + } + + /** + * Set if Hyper-V container app service plan <code>true</code>, <code>false</code> otherwise. + * + * @param hyperV the hyperV value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withHyperV(Boolean hyperV) { + this.hyperV = hyperV; + return this; + } + + /** + * Get scaling worker count. + * + * @return the targetWorkerCount value + */ + public Integer targetWorkerCount() { + return this.targetWorkerCount; + } + + /** + * Set scaling worker count. + * + * @param targetWorkerCount the targetWorkerCount value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withTargetWorkerCount(Integer targetWorkerCount) { + this.targetWorkerCount = targetWorkerCount; + return this; + } + + /** + * Get scaling worker size ID. + * + * @return the targetWorkerSizeId value + */ + public Integer targetWorkerSizeId() { + return this.targetWorkerSizeId; + } + + /** + * Set scaling worker size ID. + * + * @param targetWorkerSizeId the targetWorkerSizeId value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withTargetWorkerSizeId(Integer targetWorkerSizeId) { + this.targetWorkerSizeId = targetWorkerSizeId; + return this; + } + + /** + * Get provisioning state of the App Service Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'. + * + * @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; + } + + /** + * Get kind of resource. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Set kind of resource. + * + * @param kind the kind value to set + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withKind(String kind) { + this.kind = kind; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServicePlansImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServicePlansImpl.java new file mode 100644 index 0000000000000..d93c0a58d049a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServicePlansImpl.java @@ -0,0 +1,423 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServicePlans; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServicePlan; +import com.microsoft.azure.Page; +import rx.Completable; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.Capability; +import com.microsoft.azure.management.appservice.v2019_08_01.ServerfarmHybridConnection; +import com.microsoft.azure.management.appservice.v2019_08_01.HybridConnectionKey; +import com.microsoft.azure.management.appservice.v2019_08_01.HybridConnectionLimits; +import com.microsoft.azure.management.appservice.v2019_08_01.HybridConnection; +import com.microsoft.azure.management.appservice.v2019_08_01.ServerfarmSite; +import com.microsoft.azure.management.appservice.v2019_08_01.ServerfarmCsmUsageQuota; +import com.microsoft.azure.management.appservice.v2019_08_01.ServerfarmVnetInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.ServerfarmVnetGateway; +import com.microsoft.azure.management.appservice.v2019_08_01.VnetRoute; + +class AppServicePlansImpl extends WrapperImpl implements AppServicePlans { + private final CertificateRegistrationManager manager; + + AppServicePlansImpl(CertificateRegistrationManager manager) { + super(manager.inner().appServicePlans()); + this.manager = manager; + } + + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public AppServicePlanImpl defineServerfarm(String name) { + return wrapServerfarmModel(name); + } + + @Override + public VnetRouteImpl defineRoute(String name) { + return wrapRouteModel(name); + } + + private AppServicePlanImpl wrapServerfarmModel(String name) { + return new AppServicePlanImpl(name, new AppServicePlanInner(), this.manager()); + } + + private VnetRouteImpl wrapRouteModel(String name) { + return new VnetRouteImpl(name, this.manager()); + } + + private AppServicePlanImpl wrapAppServicePlanModel(AppServicePlanInner inner) { + return new AppServicePlanImpl(inner.name(), inner, manager()); + } + + private CapabilityImpl wrapCapabilityModel(CapabilityInner inner) { + return new CapabilityImpl(inner, manager()); + } + + private ServerfarmHybridConnectionImpl wrapServerfarmHybridConnectionModel(HybridConnectionInner inner) { + return new ServerfarmHybridConnectionImpl(inner, manager()); + } + + private HybridConnectionImpl wrapHybridConnectionModel(HybridConnectionInner inner) { + return new HybridConnectionImpl(inner, manager()); + } + + private ServerfarmSiteImpl wrapServerfarmSiteModel(SiteInner inner) { + return new ServerfarmSiteImpl(inner, manager()); + } + + private ServerfarmCsmUsageQuotaImpl wrapServerfarmCsmUsageQuotaModel(CsmUsageQuotaInner inner) { + return new ServerfarmCsmUsageQuotaImpl(inner, manager()); + } + + private ServerfarmVnetInfoImpl wrapServerfarmVnetInfoModel(VnetInfoInner inner) { + return new ServerfarmVnetInfoImpl(inner, manager()); + } + + private ServerfarmVnetGatewayImpl wrapServerfarmVnetGatewayModel(VnetGatewayInner inner) { + return new ServerfarmVnetGatewayImpl(inner, manager()); + } + + private VnetRouteImpl wrapVnetRouteModel(VnetRouteInner inner) { + return new VnetRouteImpl(inner, manager()); + } + + private Observable getAppServicePlanInnerUsingAppServicePlansInnerAsync(String resourceGroupName, String name) { + AppServicePlansInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + private Observable getHybridConnectionInnerUsingAppServicePlansInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "serverfarms"); + String namespaceName = IdParsingUtils.getValueFromIdByName(id, "hybridConnectionNamespaces"); + String relayName = IdParsingUtils.getValueFromIdByName(id, "relays"); + AppServicePlansInner client = this.inner(); + return client.getHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName); + } + + private Observable getVnetInfoInnerUsingAppServicePlansInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "serverfarms"); + String vnetName = IdParsingUtils.getValueFromIdByName(id, "virtualNetworkConnections"); + AppServicePlansInner client = this.inner(); + return client.getVnetFromServerFarmAsync(resourceGroupName, name, vnetName); + } + + private Observable getVnetGatewayInnerUsingAppServicePlansInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "serverfarms"); + String vnetName = IdParsingUtils.getValueFromIdByName(id, "virtualNetworkConnections"); + String gatewayName = IdParsingUtils.getValueFromIdByName(id, "gateways"); + AppServicePlansInner client = this.inner(); + return client.getVnetGatewayAsync(resourceGroupName, name, vnetName, gatewayName); + } + + @Override + public Observable getByResourceGroupAsync(String resourceGroupName, String name) { + return this.getAppServicePlanInnerUsingAppServicePlansInnerAsync(resourceGroupName, name).flatMap(new Func1> () { + @Override + public Observable call(AppServicePlanInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((AppServicePlan)wrapAppServicePlanModel(inner)); + } + } + }); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + AppServicePlansInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AppServicePlan call(AppServicePlanInner inner) { + return wrapAppServicePlanModel(inner); + } + }); + } + + @Override + public Observable listAsync() { + AppServicePlansInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AppServicePlan call(AppServicePlanInner inner) { + return wrapAppServicePlanModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String name) { + return this.inner().deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Completable restartWebAppsAsync(String resourceGroupName, String name) { + AppServicePlansInner client = this.inner(); + return client.restartWebAppsAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable getServerFarmSkusAsync(String resourceGroupName, String name) { + AppServicePlansInner client = this.inner(); + return client.getServerFarmSkusAsync(resourceGroupName, name) + ;} + + @Override + public Observable listCapabilitiesAsync(String resourceGroupName, String name) { + AppServicePlansInner client = this.inner(); + return client.listCapabilitiesAsync(resourceGroupName, name) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public Capability call(CapabilityInner inner) { + return wrapCapabilityModel(inner); + } + }); + } + + @Override + public Observable getHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + AppServicePlansInner client = this.inner(); + return client.getHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName) + .flatMap(new Func1>() { + @Override + public Observable call(HybridConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ServerfarmHybridConnection)wrapServerfarmHybridConnectionModel(inner)); + } + } + }); + } + + @Override + public Completable deleteHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + AppServicePlansInner client = this.inner(); + return client.deleteHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName).toCompletable(); + } + + @Override + public Observable listHybridConnectionKeysAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + AppServicePlansInner client = this.inner(); + return client.listHybridConnectionKeysAsync(resourceGroupName, name, namespaceName, relayName) + .map(new Func1() { + @Override + public HybridConnectionKey call(HybridConnectionKeyInner inner) { + return new HybridConnectionKeyImpl(inner, manager()); + } + }); + } + + @Override + public Observable listWebAppsByHybridConnectionAsync(final String resourceGroupName, final String name, final String namespaceName, final String relayName) { + AppServicePlansInner client = this.inner(); + return client.listWebAppsByHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }); + } + + @Override + public Observable getHybridConnectionPlanLimitAsync(String resourceGroupName, String name) { + AppServicePlansInner client = this.inner(); + return client.getHybridConnectionPlanLimitAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public HybridConnectionLimits call(HybridConnectionLimitsInner inner) { + return new HybridConnectionLimitsImpl(inner, manager()); + } + }); + } + + @Override + public Observable listHybridConnectionsAsync(final String resourceGroupName, final String name) { + AppServicePlansInner client = this.inner(); + return client.listHybridConnectionsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public HybridConnection call(HybridConnectionInner inner) { + return wrapHybridConnectionModel(inner); + } + }); + } + + @Override + public Observable listWebAppsAsync(final String resourceGroupName, final String name) { + AppServicePlansInner client = this.inner(); + return client.listWebAppsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServerfarmSite call(SiteInner inner) { + return wrapServerfarmSiteModel(inner); + } + }); + } + + @Override + public Observable listUsagesAsync(final String resourceGroupName, final String name) { + AppServicePlansInner client = this.inner(); + return client.listUsagesAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServerfarmCsmUsageQuota call(CsmUsageQuotaInner inner) { + return wrapServerfarmCsmUsageQuotaModel(inner); + } + }); + } + + @Override + public Observable getVnetFromServerFarmAsync(String resourceGroupName, String name, String vnetName) { + AppServicePlansInner client = this.inner(); + return client.getVnetFromServerFarmAsync(resourceGroupName, name, vnetName) + .flatMap(new Func1>() { + @Override + public Observable call(VnetInfoInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ServerfarmVnetInfo)wrapServerfarmVnetInfoModel(inner)); + } + } + }); + } + + @Override + public Observable listVnetsAsync(String resourceGroupName, String name) { + AppServicePlansInner client = this.inner(); + return client.listVnetsAsync(resourceGroupName, name) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public ServerfarmVnetInfo call(VnetInfoInner inner) { + return wrapServerfarmVnetInfoModel(inner); + } + }); + } + + @Override + public Observable getVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName) { + AppServicePlansInner client = this.inner(); + return client.getVnetGatewayAsync(resourceGroupName, name, vnetName, gatewayName) + .flatMap(new Func1>() { + @Override + public Observable call(VnetGatewayInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ServerfarmVnetGateway)wrapServerfarmVnetGatewayModel(inner)); + } + } + }); + } + + @Override + public Observable listRoutesForVnetAsync(String resourceGroupName, String name, String vnetName) { + AppServicePlansInner client = this.inner(); + return client.listRoutesForVnetAsync(resourceGroupName, name, vnetName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public VnetRoute call(VnetRouteInner inner) { + return wrapVnetRouteModel(inner); + } + }); + } + + @Override + public Completable deleteVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName) { + AppServicePlansInner client = this.inner(); + return client.deleteVnetRouteAsync(resourceGroupName, name, vnetName, routeName).toCompletable(); + } + + @Override + public Observable getRouteForVnetAsync(String resourceGroupName, String name, String vnetName, String routeName) { + AppServicePlansInner client = this.inner(); + return client.getRouteForVnetAsync(resourceGroupName, name, vnetName, routeName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public VnetRoute call(VnetRouteInner inner) { + return new VnetRouteImpl(inner, manager()); + } + }); + } + + @Override + public Completable rebootWorkerAsync(String resourceGroupName, String name, String workerName) { + AppServicePlansInner client = this.inner(); + return client.rebootWorkerAsync(resourceGroupName, name, workerName).toCompletable(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServicePlansInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServicePlansInner.java new file mode 100644 index 0000000000000..71a7da81f6f0c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServicePlansInner.java @@ -0,0 +1,4298 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServicePlanPatchResource; +import com.microsoft.azure.management.appservice.v2019_08_01.DefaultErrorResponseException; +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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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 AppServicePlanPatchResource 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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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 subscription. + * Description for Get all App Service plans for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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 subscription. + * Description for Get all App Service plans 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 plans for a subscription. + * Description for Get all App Service plans for a subscription. + * + * @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 subscription. + * Description for Get all App Service plans for a subscription. + * + * @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 subscription. + * Description for Get all App Service plans for a subscription. + * + * @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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean detailed = null; + return service.list(this.client.subscriptionId(), detailed, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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 subscription. + * Description for Get all App Service plans for a subscription. + * + * @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 DefaultErrorResponseException thrown 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 subscription. + * Description for Get all App Service plans for a subscription. + * + * @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 subscription. + * Description for Get all App Service plans for a subscription. + * + * @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 subscription. + * Description for Get all App Service plans for a subscription. + * + * @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 subscription. + * Description for Get all App Service plans for a subscription. + * + 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), detailed, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all App Service plans in a resource group. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get an App Service plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates or updates an App Service Plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(appServicePlan); + Observable> observable = service.createOrUpdate(resourceGroupName, name, this.client.subscriptionId(), appServicePlan, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates an App Service Plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(appServicePlan); + return service.beginCreateOrUpdate(resourceGroupName, name, this.client.subscriptionId(), appServicePlan, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete an App Service plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates or updates an App Service Plan. + * Description for 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 DefaultErrorResponseException 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, AppServicePlanPatchResource appServicePlan) { + return updateWithServiceResponseAsync(resourceGroupName, name, appServicePlan).toBlocking().single().body(); + } + + /** + * Creates or updates an App Service Plan. + * Description for 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, AppServicePlanPatchResource appServicePlan, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, name, appServicePlan), serviceCallback); + } + + /** + * Creates or updates an App Service Plan. + * Description for 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, AppServicePlanPatchResource 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. + * Description for 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, AppServicePlanPatchResource 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(appServicePlan); + return service.update(resourceGroupName, name, this.client.subscriptionId(), appServicePlan, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List all capabilities of an App Service plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listCapabilities(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listCapabilitiesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listCapabilitiesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Retrieve a Hybrid Connection in use in an App Service plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getHybridConnection(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getHybridConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getHybridConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a Hybrid Connection in use in an App Service plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteHybridConnection(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteHybridConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteHybridConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the send key name and value of a Hybrid Connection. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listHybridConnectionKeys(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listHybridConnectionKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listHybridConnectionKeysDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all apps that use a Hybrid Connection in an App Service Plan. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listWebAppsByHybridConnection(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWebAppsByHybridConnectionDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebAppsByHybridConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the maximum number of Hybrid Connections allowed in an App Service plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getHybridConnectionPlanLimit(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getHybridConnectionPlanLimitDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getHybridConnectionPlanLimitDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Retrieve all Hybrid Connections in use in an App Service plan. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listHybridConnections(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listHybridConnectionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listHybridConnectionsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Restart all apps in an App Service plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean softRestart = null; + return service.restartWebApps(resourceGroupName, name, this.client.subscriptionId(), softRestart, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = restartWebAppsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Restart all apps in an App Service plan. + * Description for 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 perform 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 DefaultErrorResponseException 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. + * Description for 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 perform 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. + * Description for 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 perform 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. + * Description for 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 perform 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.restartWebApps(resourceGroupName, name, this.client.subscriptionId(), softRestart, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = restartWebAppsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse restartWebAppsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all apps associated with an App Service plan. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String skipToken = null; + final String filter = null; + final String top = null; + return service.listWebApps(resourceGroupName, name, this.client.subscriptionId(), skipToken, filter, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listWebApps(resourceGroupName, name, this.client.subscriptionId(), skipToken, filter, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWebAppsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebAppsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all selectable SKUs for a given App Service Plan. + * Description for Gets all selectable SKUs 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 DefaultErrorResponseException 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 SKUs for a given App Service Plan. + * Description for Gets all selectable SKUs 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 SKUs for a given App Service Plan. + * Description for Gets all selectable SKUs 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 SKUs for a given App Service Plan. + * Description for Gets all selectable SKUs 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getServerFarmSkus(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getServerFarmSkusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getServerFarmSkusDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets server farm usage information. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + return service.listUsages(resourceGroupName, name, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets server farm usage information. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listUsages(resourceGroupName, name, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUsagesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all Virtual Networks associated with an App Service plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listVnets(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listVnetsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVnetsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a Virtual Network associated with an App Service plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getVnetFromServerFarm(resourceGroupName, name, vnetName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVnetFromServerFarmDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVnetFromServerFarmDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a Virtual Network gateway. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getVnetGateway(resourceGroupName, name, vnetName, gatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVnetGatewayDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVnetGatewayDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Update a Virtual Network gateway. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.updateVnetGateway(resourceGroupName, name, vnetName, gatewayName, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateVnetGatewayDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateVnetGatewayDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all routes that are associated with a Virtual Network in an App Service plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listRoutesForVnet(resourceGroupName, name, vnetName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listRoutesForVnetDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRoutesForVnetDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a Virtual Network route in an App Service plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getRouteForVnet(resourceGroupName, name, vnetName, routeName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = getRouteForVnetDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getRouteForVnetDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Create or update a Virtual Network route in an App Service plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(route); + return service.createOrUpdateVnetRoute(resourceGroupName, name, vnetName, routeName, this.client.subscriptionId(), route, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateVnetRouteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateVnetRouteDelegate(Response response) throws DefaultErrorResponseException, 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(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a Virtual Network route in an App Service plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteVnetRoute(resourceGroupName, name, vnetName, routeName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteVnetRouteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteVnetRouteDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Create or update a Virtual Network route in an App Service plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(route); + return service.updateVnetRoute(resourceGroupName, name, vnetName, routeName, this.client.subscriptionId(), route, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateVnetRouteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateVnetRouteDelegate(Response response) throws DefaultErrorResponseException, 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(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Reboot a worker machine in an App Service plan. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.rebootWorker(resourceGroupName, name, workerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = rebootWorkerDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse rebootWorkerDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all App Service plans for a subscription. + * Description for Get all App Service plans for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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 subscription. + * Description for Get all App Service plans 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 plans for a subscription. + * Description for Get all App Service plans 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<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 subscription. + * Description for Get all App Service plans 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<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 subscription. + * Description for Get all App Service plans 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<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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all App Service plans in a resource group. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all apps that use a Hybrid Connection in an App Service Plan. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Retrieve all Hybrid Connections in use in an App Service plan. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all apps associated with an App Service plan. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets server farm usage information. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ApplicationStackResourceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ApplicationStackResourceImpl.java new file mode 100644 index 0000000000000..7f8c1776f4f39 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ApplicationStackResourceImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ApplicationStackResource; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.ApplicationStack; +import com.microsoft.azure.management.appservice.v2019_08_01.StackMajorVersion; + +class ApplicationStackResourceImpl extends WrapperImpl implements ApplicationStackResource { + private final CertificateRegistrationManager manager; + ApplicationStackResourceImpl(ApplicationStackResourceInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String applicationStackResourceName() { + return this.inner().applicationStackResourceName(); + } + + @Override + public String dependency() { + return this.inner().dependency(); + } + + @Override + public String display() { + return this.inner().display(); + } + + @Override + public List frameworks() { + return this.inner().frameworks(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public List majorVersions() { + return this.inner().majorVersions(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ApplicationStackResourceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ApplicationStackResourceInner.java new file mode 100644 index 0000000000000..a67f378373a55 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ApplicationStackResourceInner.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.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.StackMajorVersion; +import com.microsoft.azure.management.appservice.v2019_08_01.ApplicationStack; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * ARM resource for a ApplicationStack. + */ +@JsonFlatten +public class ApplicationStackResourceInner extends ProxyOnlyResource { + /** + * Application stack name. + */ + @JsonProperty(value = "properties.name") + private String applicationStackResourceName; + + /** + * Application stack display name. + */ + @JsonProperty(value = "properties.display") + private String display; + + /** + * Application stack dependency. + */ + @JsonProperty(value = "properties.dependency") + private String dependency; + + /** + * List of major versions available. + */ + @JsonProperty(value = "properties.majorVersions") + private List majorVersions; + + /** + * List of frameworks associated with application stack. + */ + @JsonProperty(value = "properties.frameworks") + private List frameworks; + + /** + * Get application stack name. + * + * @return the applicationStackResourceName value + */ + public String applicationStackResourceName() { + return this.applicationStackResourceName; + } + + /** + * Set application stack name. + * + * @param applicationStackResourceName the applicationStackResourceName value to set + * @return the ApplicationStackResourceInner object itself. + */ + public ApplicationStackResourceInner withApplicationStackResourceName(String applicationStackResourceName) { + this.applicationStackResourceName = applicationStackResourceName; + return this; + } + + /** + * Get application stack display name. + * + * @return the display value + */ + public String display() { + return this.display; + } + + /** + * Set application stack display name. + * + * @param display the display value to set + * @return the ApplicationStackResourceInner object itself. + */ + public ApplicationStackResourceInner withDisplay(String display) { + this.display = display; + return this; + } + + /** + * Get application stack dependency. + * + * @return the dependency value + */ + public String dependency() { + return this.dependency; + } + + /** + * Set application stack dependency. + * + * @param dependency the dependency value to set + * @return the ApplicationStackResourceInner object itself. + */ + public ApplicationStackResourceInner withDependency(String dependency) { + this.dependency = dependency; + return this; + } + + /** + * Get list of major versions available. + * + * @return the majorVersions value + */ + public List majorVersions() { + return this.majorVersions; + } + + /** + * Set list of major versions available. + * + * @param majorVersions the majorVersions value to set + * @return the ApplicationStackResourceInner object itself. + */ + public ApplicationStackResourceInner withMajorVersions(List majorVersions) { + this.majorVersions = majorVersions; + return this; + } + + /** + * Get list of frameworks associated with application stack. + * + * @return the frameworks value + */ + public List frameworks() { + return this.frameworks; + } + + /** + * Set list of frameworks associated with application stack. + * + * @param frameworks the frameworks value to set + * @return the ApplicationStackResourceInner object itself. + */ + public ApplicationStackResourceInner withFrameworks(List frameworks) { + this.frameworks = frameworks; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AzureStoragePropertyDictionaryResourceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AzureStoragePropertyDictionaryResourceImpl.java new file mode 100644 index 0000000000000..c48d12c6bdb8c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AzureStoragePropertyDictionaryResourceImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.AzureStoragePropertyDictionaryResource; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.Map; +import com.microsoft.azure.management.appservice.v2019_08_01.AzureStorageInfoValue; + +class AzureStoragePropertyDictionaryResourceImpl extends WrapperImpl implements AzureStoragePropertyDictionaryResource { + private final CertificateRegistrationManager manager; + AzureStoragePropertyDictionaryResourceImpl(AzureStoragePropertyDictionaryResourceInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Map properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AzureStoragePropertyDictionaryResourceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AzureStoragePropertyDictionaryResourceInner.java new file mode 100644 index 0000000000000..adf9fdb4ffc37 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AzureStoragePropertyDictionaryResourceInner.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.appservice.v2019_08_01.implementation; + +import java.util.Map; +import com.microsoft.azure.management.appservice.v2019_08_01.AzureStorageInfoValue; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * AzureStorageInfo dictionary resource. + */ +public class AzureStoragePropertyDictionaryResourceInner extends ProxyOnlyResource { + /** + * Azure storage accounts. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get azure storage accounts. + * + * @return the properties value + */ + public Map properties() { + return this.properties; + } + + /** + * Set azure storage accounts. + * + * @param properties the properties value to set + * @return the AzureStoragePropertyDictionaryResourceInner object itself. + */ + public AzureStoragePropertyDictionaryResourceInner withProperties(Map properties) { + this.properties = properties; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/BackupItemImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/BackupItemImpl.java new file mode 100644 index 0000000000000..dce7f758ad941 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/BackupItemImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.BackupItem; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.DatabaseBackupSetting; +import com.microsoft.azure.management.appservice.v2019_08_01.BackupItemStatus; + +class BackupItemImpl extends IndexableRefreshableWrapperImpl implements BackupItem { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String backupId; + + BackupItemImpl(BackupItemInner inner, CertificateRegistrationManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.backupId = IdParsingUtils.getValueFromIdByName(inner.id(), "backups"); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getBackupStatusAsync(this.resourceGroupName, this.name, this.backupId); + } + + + + @Override + public Integer backupId() { + return this.inner().backupId(); + } + + @Override + public String backupItemName() { + return this.inner().backupItemName(); + } + + @Override + public String blobName() { + return this.inner().blobName(); + } + + @Override + public String correlationId() { + return this.inner().correlationId(); + } + + @Override + public DateTime created() { + return this.inner().created(); + } + + @Override + public List databases() { + return this.inner().databases(); + } + + @Override + public DateTime finishedTimeStamp() { + return this.inner().finishedTimeStamp(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public DateTime lastRestoreTimeStamp() { + return this.inner().lastRestoreTimeStamp(); + } + + @Override + public String log() { + return this.inner().log(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Boolean scheduled() { + return this.inner().scheduled(); + } + + @Override + public Long sizeInBytes() { + return this.inner().sizeInBytes(); + } + + @Override + public BackupItemStatus status() { + return this.inner().status(); + } + + @Override + public String storageAccountUrl() { + return this.inner().storageAccountUrl(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public Long websiteSizeInBytes() { + return this.inner().websiteSizeInBytes(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/BackupItemInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/BackupItemInner.java new file mode 100644 index 0000000000000..ce18471beff82 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.BackupItemStatus; +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.DatabaseBackupSetting; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 id of the backup. + * + * @return the backupId value + */ + public Integer backupId() { + return this.backupId; + } + + /** + * Get sAS URL for the storage account container which contains this backup. + * + * @return the storageAccountUrl value + */ + public String storageAccountUrl() { + return this.storageAccountUrl; + } + + /** + * Get name of the blob which contains data for this backup. + * + * @return the blobName value + */ + public String blobName() { + return this.blobName; + } + + /** + * Get name of this backup. + * + * @return the backupItemName value + */ + public String backupItemName() { + return this.backupItemName; + } + + /** + * Get backup status. Possible values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created', 'Skipped', 'PartiallySucceeded', 'DeleteInProgress', 'DeleteFailed', 'Deleted'. + * + * @return the status value + */ + public BackupItemStatus status() { + return this.status; + } + + /** + * Get size of the backup in bytes. + * + * @return the sizeInBytes value + */ + public Long sizeInBytes() { + return this.sizeInBytes; + } + + /** + * Get timestamp of the backup creation. + * + * @return the created value + */ + public DateTime created() { + return this.created; + } + + /** + * Get details regarding this backup. Might contain an error message. + * + * @return the log value + */ + public String log() { + return this.log; + } + + /** + * Get list of databases included in the backup. + * + * @return the databases value + */ + public List databases() { + return this.databases; + } + + /** + * Get true if this backup has been created due to a schedule being triggered. + * + * @return the scheduled value + */ + public Boolean scheduled() { + return this.scheduled; + } + + /** + * Get timestamp of a last restore operation which used this backup. + * + * @return the lastRestoreTimeStamp value + */ + public DateTime lastRestoreTimeStamp() { + return this.lastRestoreTimeStamp; + } + + /** + * Get timestamp when this backup finished. + * + * @return the finishedTimeStamp value + */ + public DateTime finishedTimeStamp() { + return this.finishedTimeStamp; + } + + /** + * Get unique correlation identifier. Please use this along with the timestamp while communicating with Azure support. + * + * @return the correlationId value + */ + public String correlationId() { + return this.correlationId; + } + + /** + * Get size of the original web app which has been backed up. + * + * @return the websiteSizeInBytes value + */ + public Long websiteSizeInBytes() { + return this.websiteSizeInBytes; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/BackupRequestImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/BackupRequestImpl.java new file mode 100644 index 0000000000000..85e08462e0a09 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/BackupRequestImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.BackupRequest; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.BackupSchedule; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.DatabaseBackupSetting; + +class BackupRequestImpl extends WrapperImpl implements BackupRequest { + private final CertificateRegistrationManager manager; + BackupRequestImpl(BackupRequestInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String backupName() { + return this.inner().backupName(); + } + + @Override + public BackupSchedule backupSchedule() { + return this.inner().backupSchedule(); + } + + @Override + public List databases() { + return this.inner().databases(); + } + + @Override + public Boolean enabled() { + return this.inner().enabled(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String storageAccountUrl() { + return this.inner().storageAccountUrl(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/BackupRequestInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/BackupRequestInner.java new file mode 100644 index 0000000000000..8b61d7e15e42d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/BackupRequestInner.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.BackupSchedule; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.DatabaseBackupSetting; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Description of a backup which will be performed. + */ +@JsonFlatten +public class BackupRequestInner extends ProxyOnlyResource { + /** + * Name of the backup. + */ + @JsonProperty(value = "properties.backupName") + private String backupName; + + /** + * 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; + + /** + * Get name of the backup. + * + * @return the backupName value + */ + public String backupName() { + return this.backupName; + } + + /** + * Set name of the backup. + * + * @param backupName the backupName value to set + * @return the BackupRequestInner object itself. + */ + public BackupRequestInner withBackupName(String backupName) { + this.backupName = backupName; + return this; + } + + /** + * Get true if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set true if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled. + * + * @param enabled the enabled value to set + * @return the BackupRequestInner object itself. + */ + public BackupRequestInner withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get sAS URL to the container. + * + * @return the storageAccountUrl value + */ + public String storageAccountUrl() { + return this.storageAccountUrl; + } + + /** + * Set sAS URL to the container. + * + * @param storageAccountUrl the storageAccountUrl value to set + * @return the BackupRequestInner object itself. + */ + public BackupRequestInner withStorageAccountUrl(String storageAccountUrl) { + this.storageAccountUrl = storageAccountUrl; + return this; + } + + /** + * Get schedule for the backup if it is executed periodically. + * + * @return the backupSchedule value + */ + public BackupSchedule backupSchedule() { + return this.backupSchedule; + } + + /** + * Set schedule for the backup if it is executed periodically. + * + * @param backupSchedule the backupSchedule value to set + * @return the BackupRequestInner object itself. + */ + public BackupRequestInner withBackupSchedule(BackupSchedule backupSchedule) { + this.backupSchedule = backupSchedule; + return this; + } + + /** + * Get databases included in the backup. + * + * @return the databases value + */ + public List databases() { + return this.databases; + } + + /** + * Set databases included in the backup. + * + * @param databases the databases value to set + * @return the BackupRequestInner object itself. + */ + public BackupRequestInner withDatabases(List databases) { + this.databases = databases; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/BillingMeterInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/BillingMeterInner.java new file mode 100644 index 0000000000000..0b80d4285d9c5 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/BillingMeterInner.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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * App Service billing entity that contains information about meter which the + * Azure billing system utilizes to charge users for services. + */ +@JsonFlatten +public class BillingMeterInner extends ProxyOnlyResource { + /** + * Meter GUID onboarded in Commerce. + */ + @JsonProperty(value = "properties.meterId") + private String meterId; + + /** + * Azure Location of billable resource. + */ + @JsonProperty(value = "properties.billingLocation") + private String billingLocation; + + /** + * Short Name from App Service Azure pricing Page. + */ + @JsonProperty(value = "properties.shortName") + private String shortName; + + /** + * Friendly name of the meter. + */ + @JsonProperty(value = "properties.friendlyName") + private String friendlyName; + + /** + * App Service ResourceType meter used for. + */ + @JsonProperty(value = "properties.resourceType") + private String resourceType; + + /** + * App Service OS type meter used for. + */ + @JsonProperty(value = "properties.osType") + private String osType; + + /** + * Get meter GUID onboarded in Commerce. + * + * @return the meterId value + */ + public String meterId() { + return this.meterId; + } + + /** + * Set meter GUID onboarded in Commerce. + * + * @param meterId the meterId value to set + * @return the BillingMeterInner object itself. + */ + public BillingMeterInner withMeterId(String meterId) { + this.meterId = meterId; + return this; + } + + /** + * Get azure Location of billable resource. + * + * @return the billingLocation value + */ + public String billingLocation() { + return this.billingLocation; + } + + /** + * Set azure Location of billable resource. + * + * @param billingLocation the billingLocation value to set + * @return the BillingMeterInner object itself. + */ + public BillingMeterInner withBillingLocation(String billingLocation) { + this.billingLocation = billingLocation; + return this; + } + + /** + * Get short Name from App Service Azure pricing Page. + * + * @return the shortName value + */ + public String shortName() { + return this.shortName; + } + + /** + * Set short Name from App Service Azure pricing Page. + * + * @param shortName the shortName value to set + * @return the BillingMeterInner object itself. + */ + public BillingMeterInner withShortName(String shortName) { + this.shortName = shortName; + return this; + } + + /** + * Get friendly name of the meter. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set friendly name of the meter. + * + * @param friendlyName the friendlyName value to set + * @return the BillingMeterInner object itself. + */ + public BillingMeterInner withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get app Service ResourceType meter used for. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set app Service ResourceType meter used for. + * + * @param resourceType the resourceType value to set + * @return the BillingMeterInner object itself. + */ + public BillingMeterInner withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get app Service OS type meter used for. + * + * @return the osType value + */ + public String osType() { + return this.osType; + } + + /** + * Set app Service OS type meter used for. + * + * @param osType the osType value to set + * @return the BillingMeterInner object itself. + */ + public BillingMeterInner withOsType(String osType) { + this.osType = osType; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CapabilityImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CapabilityImpl.java new file mode 100644 index 0000000000000..43238a0bd945a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CapabilityImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.Capability; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class CapabilityImpl extends WrapperImpl implements Capability { + private final CertificateRegistrationManager manager; + + CapabilityImpl(CapabilityInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String reason() { + return this.inner().reason(); + } + + @Override + public String value() { + return this.inner().value(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CapabilityInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CapabilityInner.java new file mode 100644 index 0000000000000..9235a85a014e9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.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 name of the SKU capability. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the SKU capability. + * + * @param name the name value to set + * @return the CapabilityInner object itself. + */ + public CapabilityInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get value of the SKU capability. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set value of the SKU capability. + * + * @param value the value value to set + * @return the CapabilityInner object itself. + */ + public CapabilityInner withValue(String value) { + this.value = value; + return this; + } + + /** + * Get reason of the SKU capability. + * + * @return the reason value + */ + public String reason() { + return this.reason; + } + + /** + * Set reason of the SKU capability. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateEmailImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateEmailImpl.java new file mode 100644 index 0000000000000..14d76d0be27b5 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateEmailImpl.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.CertificateEmail; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import org.joda.time.DateTime; + +class CertificateEmailImpl extends WrapperImpl implements CertificateEmail { + private final CertificateRegistrationManager manager; + CertificateEmailImpl(CertificateEmailInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String emailId() { + return this.inner().emailId(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public DateTime timeStamp() { + return this.inner().timeStamp(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateEmailInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateEmailInner.java new file mode 100644 index 0000000000000..206593815097e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 email id. + * + * @return the emailId value + */ + public String emailId() { + return this.emailId; + } + + /** + * Set email id. + * + * @param emailId the emailId value to set + * @return the CertificateEmailInner object itself. + */ + public CertificateEmailInner withEmailId(String emailId) { + this.emailId = emailId; + return this; + } + + /** + * Get time stamp. + * + * @return the timeStamp value + */ + public DateTime timeStamp() { + return this.timeStamp; + } + + /** + * Set time stamp. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateImpl.java new file mode 100644 index 0000000000000..37be0ba39c8d7 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateImpl.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.Certificate; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.CertificatePatchResource; +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentProfile; +import com.microsoft.azure.management.appservice.v2019_08_01.KeyVaultSecretStatus; +import rx.functions.Func1; + +class CertificateImpl extends GroupableResourceCoreImpl implements Certificate, Certificate.Definition, Certificate.Update { + private CertificatePatchResource updateParameter; + CertificateImpl(String name, CertificateInner inner, CertificateRegistrationManager manager) { + super(name, inner, manager); + this.updateParameter = new CertificatePatchResource(); + } + + @Override + public Observable createResourceAsync() { + CertificatesInner client = this.manager().inner().certificates(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(new Func1() { + @Override + public CertificateInner call(CertificateInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + CertificatesInner client = this.manager().inner().certificates(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter) + .map(new Func1() { + @Override + public CertificateInner call(CertificateInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + CertificatesInner client = this.manager().inner().certificates(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.updateParameter = new CertificatePatchResource(); + } + + @Override + public String canonicalName() { + return this.inner().canonicalName(); + } + + @Override + public byte[] cerBlob() { + return this.inner().cerBlob(); + } + + @Override + public DateTime expirationDate() { + return this.inner().expirationDate(); + } + + @Override + public String friendlyName() { + return this.inner().friendlyName(); + } + + @Override + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.inner().hostingEnvironmentProfile(); + } + + @Override + public List hostNames() { + return this.inner().hostNames(); + } + + @Override + public DateTime issueDate() { + return this.inner().issueDate(); + } + + @Override + public String issuer() { + return this.inner().issuer(); + } + + @Override + public String keyVaultId() { + return this.inner().keyVaultId(); + } + + @Override + public String keyVaultSecretName() { + return this.inner().keyVaultSecretName(); + } + + @Override + public KeyVaultSecretStatus keyVaultSecretStatus() { + return this.inner().keyVaultSecretStatus(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String password() { + return this.inner().password(); + } + + @Override + public byte[] pfxBlob() { + return this.inner().pfxBlob(); + } + + @Override + public String publicKeyHash() { + return this.inner().publicKeyHash(); + } + + @Override + public String selfLink() { + return this.inner().selfLink(); + } + + @Override + public String serverFarmId() { + return this.inner().serverFarmId(); + } + + @Override + public String siteName() { + return this.inner().siteName(); + } + + @Override + public String subjectName() { + return this.inner().subjectName(); + } + + @Override + public String thumbprint() { + return this.inner().thumbprint(); + } + + @Override + public Boolean valid() { + return this.inner().valid(); + } + + @Override + public CertificateImpl withPassword(String password) { + this.inner().withPassword(password); + return this; + } + + @Override + public CertificateImpl withCanonicalName(String canonicalName) { + if (isInCreateMode()) { + this.inner().withCanonicalName(canonicalName); + } else { + this.updateParameter.withCanonicalName(canonicalName); + } + return this; + } + + @Override + public CertificateImpl withHostNames(List hostNames) { + if (isInCreateMode()) { + this.inner().withHostNames(hostNames); + } else { + this.updateParameter.withHostNames(hostNames); + } + return this; + } + + @Override + public CertificateImpl withKeyVaultId(String keyVaultId) { + if (isInCreateMode()) { + this.inner().withKeyVaultId(keyVaultId); + } else { + this.updateParameter.withKeyVaultId(keyVaultId); + } + return this; + } + + @Override + public CertificateImpl withKeyVaultSecretName(String keyVaultSecretName) { + if (isInCreateMode()) { + this.inner().withKeyVaultSecretName(keyVaultSecretName); + } else { + this.updateParameter.withKeyVaultSecretName(keyVaultSecretName); + } + return this; + } + + @Override + public CertificateImpl withKind(String kind) { + if (isInCreateMode()) { + this.inner().withKind(kind); + } else { + this.updateParameter.withKind(kind); + } + return this; + } + + @Override + public CertificateImpl withPfxBlob(byte[] pfxBlob) { + if (isInCreateMode()) { + this.inner().withPfxBlob(pfxBlob); + } else { + this.updateParameter.withPfxBlob(pfxBlob); + } + return this; + } + + @Override + public CertificateImpl withServerFarmId(String serverFarmId) { + if (isInCreateMode()) { + this.inner().withServerFarmId(serverFarmId); + } else { + this.updateParameter.withServerFarmId(serverFarmId); + } + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateInner.java new file mode 100644 index 0000000000000..25fbda9b4b1ef --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateInner.java @@ -0,0 +1,434 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentProfile; +import com.microsoft.azure.management.appservice.v2019_08_01.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 expiration 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; + + /** + * 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; + + /** + * CNAME of the certificate to be issued via free certificate. + */ + @JsonProperty(value = "properties.canonicalName") + private String canonicalName; + + /** + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get friendly name of the certificate. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Get subject name of the certificate. + * + * @return the subjectName value + */ + public String subjectName() { + return this.subjectName; + } + + /** + * Get host names the certificate applies to. + * + * @return the hostNames value + */ + public List hostNames() { + return this.hostNames; + } + + /** + * Set host names the certificate applies to. + * + * @param hostNames the hostNames value to set + * @return the CertificateInner object itself. + */ + public CertificateInner withHostNames(List hostNames) { + this.hostNames = hostNames; + return this; + } + + /** + * Get pfx blob. + * + * @return the pfxBlob value + */ + public byte[] pfxBlob() { + return this.pfxBlob; + } + + /** + * Set pfx blob. + * + * @param pfxBlob the pfxBlob value to set + * @return the CertificateInner object itself. + */ + public CertificateInner withPfxBlob(byte[] pfxBlob) { + this.pfxBlob = pfxBlob; + return this; + } + + /** + * Get app name. + * + * @return the siteName value + */ + public String siteName() { + return this.siteName; + } + + /** + * Get self link. + * + * @return the selfLink value + */ + public String selfLink() { + return this.selfLink; + } + + /** + * Get certificate issuer. + * + * @return the issuer value + */ + public String issuer() { + return this.issuer; + } + + /** + * Get certificate issue Date. + * + * @return the issueDate value + */ + public DateTime issueDate() { + return this.issueDate; + } + + /** + * Get certificate expiration date. + * + * @return the expirationDate value + */ + public DateTime expirationDate() { + return this.expirationDate; + } + + /** + * Get certificate password. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Set certificate password. + * + * @param password the password value to set + * @return the CertificateInner object itself. + */ + public CertificateInner withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get certificate thumbprint. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Get is the certificate valid?. + * + * @return the valid value + */ + public Boolean valid() { + return this.valid; + } + + /** + * Get raw bytes of .cer file. + * + * @return the cerBlob value + */ + public byte[] cerBlob() { + return this.cerBlob; + } + + /** + * Get public key hash. + * + * @return the publicKeyHash value + */ + public String publicKeyHash() { + return this.publicKeyHash; + } + + /** + * Get specification for the App Service Environment to use for the certificate. + * + * @return the hostingEnvironmentProfile value + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Get key Vault Csm resource Id. + * + * @return the keyVaultId value + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Set key Vault Csm resource Id. + * + * @param keyVaultId the keyVaultId value to set + * @return the CertificateInner object itself. + */ + public CertificateInner withKeyVaultId(String keyVaultId) { + this.keyVaultId = keyVaultId; + return this; + } + + /** + * Get key Vault secret name. + * + * @return the keyVaultSecretName value + */ + public String keyVaultSecretName() { + return this.keyVaultSecretName; + } + + /** + * Set key Vault secret name. + * + * @param keyVaultSecretName the keyVaultSecretName value to set + * @return the CertificateInner object itself. + */ + public CertificateInner withKeyVaultSecretName(String keyVaultSecretName) { + this.keyVaultSecretName = keyVaultSecretName; + return this; + } + + /** + * Get status of the Key Vault secret. Possible values include: 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', 'Unknown'. + * + * @return the keyVaultSecretStatus value + */ + public KeyVaultSecretStatus keyVaultSecretStatus() { + return this.keyVaultSecretStatus; + } + + /** + * Get resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + * + * @return the serverFarmId value + */ + public String serverFarmId() { + return this.serverFarmId; + } + + /** + * Set resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + * + * @param serverFarmId the serverFarmId value to set + * @return the CertificateInner object itself. + */ + public CertificateInner withServerFarmId(String serverFarmId) { + this.serverFarmId = serverFarmId; + return this; + } + + /** + * Get cNAME of the certificate to be issued via free certificate. + * + * @return the canonicalName value + */ + public String canonicalName() { + return this.canonicalName; + } + + /** + * Set cNAME of the certificate to be issued via free certificate. + * + * @param canonicalName the canonicalName value to set + * @return the CertificateInner object itself. + */ + public CertificateInner withCanonicalName(String canonicalName) { + this.canonicalName = canonicalName; + return this; + } + + /** + * Get kind of resource. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Set kind of resource. + * + * @param kind the kind value to set + * @return the CertificateInner object itself. + */ + public CertificateInner withKind(String kind) { + this.kind = kind; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateOrderActionImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateOrderActionImpl.java new file mode 100644 index 0000000000000..d52a2fb755887 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateOrderActionImpl.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.CertificateOrderAction; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.CertificateOrderActionType; +import org.joda.time.DateTime; + +class CertificateOrderActionImpl extends WrapperImpl implements CertificateOrderAction { + private final CertificateRegistrationManager manager; + CertificateOrderActionImpl(CertificateOrderActionInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public CertificateOrderActionType actionType() { + return this.inner().actionType(); + } + + @Override + public DateTime createdAt() { + return this.inner().createdAt(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateOrderActionInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateOrderActionInner.java new file mode 100644 index 0000000000000..d14b0416dd1e9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateOrderActionInner.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.CertificateOrderActionType; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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.actionType", access = JsonProperty.Access.WRITE_ONLY) + private CertificateOrderActionType actionType; + + /** + * Time at which the certificate action was performed. + */ + @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY) + private DateTime createdAt; + + /** + * Get action type. Possible values include: 'CertificateIssued', 'CertificateOrderCanceled', 'CertificateOrderCreated', 'CertificateRevoked', 'DomainValidationComplete', 'FraudDetected', 'OrgNameChange', 'OrgValidationComplete', 'SanDrop', 'FraudCleared', 'CertificateExpired', 'CertificateExpirationWarning', 'FraudDocumentationRequired', 'Unknown'. + * + * @return the actionType value + */ + public CertificateOrderActionType actionType() { + return this.actionType; + } + + /** + * Get time at which the certificate action was performed. + * + * @return the createdAt value + */ + public DateTime createdAt() { + return this.createdAt; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateRegistrationManager.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateRegistrationManager.java new file mode 100644 index 0000000000000..544fc68177b8a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateRegistrationManager.java @@ -0,0 +1,267 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceCertificateOrders; +import com.microsoft.azure.management.appservice.v2019_08_01.CertificateRegistrationProviders; +import com.microsoft.azure.management.appservice.v2019_08_01.Domains; +import com.microsoft.azure.management.appservice.v2019_08_01.TopLevelDomains; +import com.microsoft.azure.management.appservice.v2019_08_01.DomainRegistrationProviders; +import com.microsoft.azure.management.appservice.v2019_08_01.Certificates; +import com.microsoft.azure.management.appservice.v2019_08_01.DeletedWebApps; +import com.microsoft.azure.management.appservice.v2019_08_01.Diagnostics; +import com.microsoft.azure.management.appservice.v2019_08_01.Providers; +import com.microsoft.azure.management.appservice.v2019_08_01.Recommendations; +import com.microsoft.azure.management.appservice.v2019_08_01.WebApps; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSites; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServiceEnvironments; +import com.microsoft.azure.management.appservice.v2019_08_01.AppServicePlans; +import com.microsoft.azure.management.appservice.v2019_08_01.ResourceHealthMetadatas; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure CertificateRegistration resource management. + */ +public final class CertificateRegistrationManager extends ManagerCore { + private AppServiceCertificateOrders appServiceCertificateOrders; + private CertificateRegistrationProviders certificateRegistrationProviders; + private Domains domains; + private TopLevelDomains topLevelDomains; + private DomainRegistrationProviders domainRegistrationProviders; + private Certificates certificates; + private DeletedWebApps deletedWebApps; + private Diagnostics diagnostics; + private Providers providers; + private Recommendations recommendations; + private WebApps webApps; + private StaticSites staticSites; + private AppServiceEnvironments appServiceEnvironments; + private AppServicePlans appServicePlans; + private ResourceHealthMetadatas resourceHealthMetadatas; + /** + * Get a Configurable instance that can be used to create CertificateRegistrationManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new CertificateRegistrationManager.ConfigurableImpl(); + } + /** + * Creates an instance of CertificateRegistrationManager that exposes CertificateRegistration resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the CertificateRegistrationManager + */ + public static CertificateRegistrationManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new CertificateRegistrationManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of CertificateRegistrationManager that exposes CertificateRegistration resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the CertificateRegistrationManager + */ + public static CertificateRegistrationManager authenticate(RestClient restClient, String subscriptionId) { + return new CertificateRegistrationManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of CertificateRegistrationManager that exposes CertificateRegistration management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing CertificateRegistration management API entry points that work across subscriptions + */ + CertificateRegistrationManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage AppServiceCertificateOrders. + */ + public AppServiceCertificateOrders appServiceCertificateOrders() { + if (this.appServiceCertificateOrders == null) { + this.appServiceCertificateOrders = new AppServiceCertificateOrdersImpl(this); + } + return this.appServiceCertificateOrders; + } + + /** + * @return Entry point to manage CertificateRegistrationProviders. + */ + public CertificateRegistrationProviders certificateRegistrationProviders() { + if (this.certificateRegistrationProviders == null) { + this.certificateRegistrationProviders = new CertificateRegistrationProvidersImpl(this); + } + return this.certificateRegistrationProviders; + } + + /** + * @return Entry point to manage Domains. + */ + public Domains domains() { + if (this.domains == null) { + this.domains = new DomainsImpl(this); + } + return this.domains; + } + + /** + * @return Entry point to manage TopLevelDomains. + */ + public TopLevelDomains topLevelDomains() { + if (this.topLevelDomains == null) { + this.topLevelDomains = new TopLevelDomainsImpl(this); + } + return this.topLevelDomains; + } + + /** + * @return Entry point to manage DomainRegistrationProviders. + */ + public DomainRegistrationProviders domainRegistrationProviders() { + if (this.domainRegistrationProviders == null) { + this.domainRegistrationProviders = new DomainRegistrationProvidersImpl(this); + } + return this.domainRegistrationProviders; + } + + /** + * @return Entry point to manage Certificates. + */ + public Certificates certificates() { + if (this.certificates == null) { + this.certificates = new CertificatesImpl(this); + } + return this.certificates; + } + + /** + * @return Entry point to manage DeletedWebApps. + */ + public DeletedWebApps deletedWebApps() { + if (this.deletedWebApps == null) { + this.deletedWebApps = new DeletedWebAppsImpl(this); + } + return this.deletedWebApps; + } + + /** + * @return Entry point to manage Diagnostics. + */ + public Diagnostics diagnostics() { + if (this.diagnostics == null) { + this.diagnostics = new DiagnosticsImpl(this); + } + return this.diagnostics; + } + + /** + * @return Entry point to manage Providers. + */ + public Providers providers() { + if (this.providers == null) { + this.providers = new ProvidersImpl(this); + } + return this.providers; + } + + /** + * @return Entry point to manage Recommendations. + */ + public Recommendations recommendations() { + if (this.recommendations == null) { + this.recommendations = new RecommendationsImpl(this); + } + return this.recommendations; + } + + /** + * @return Entry point to manage WebApps. + */ + public WebApps webApps() { + if (this.webApps == null) { + this.webApps = new WebAppsImpl(this); + } + return this.webApps; + } + + /** + * @return Entry point to manage StaticSites. + */ + public StaticSites staticSites() { + if (this.staticSites == null) { + this.staticSites = new StaticSitesImpl(this); + } + return this.staticSites; + } + + /** + * @return Entry point to manage AppServiceEnvironments. + */ + public AppServiceEnvironments appServiceEnvironments() { + if (this.appServiceEnvironments == null) { + this.appServiceEnvironments = new AppServiceEnvironmentsImpl(this); + } + return this.appServiceEnvironments; + } + + /** + * @return Entry point to manage AppServicePlans. + */ + public AppServicePlans appServicePlans() { + if (this.appServicePlans == null) { + this.appServicePlans = new AppServicePlansImpl(this); + } + return this.appServicePlans; + } + + /** + * @return Entry point to manage ResourceHealthMetadatas. + */ + public ResourceHealthMetadatas resourceHealthMetadatas() { + if (this.resourceHealthMetadatas == null) { + this.resourceHealthMetadatas = new ResourceHealthMetadatasImpl(this); + } + return this.resourceHealthMetadatas; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public CertificateRegistrationManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return CertificateRegistrationManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private CertificateRegistrationManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new WebSiteManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateRegistrationProvidersImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateRegistrationProvidersImpl.java new file mode 100644 index 0000000000000..314cffabf4141 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateRegistrationProvidersImpl.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. + * abc + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.CertificateRegistrationProviders; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.appservice.v2019_08_01.CsmOperationDescription; + +class CertificateRegistrationProvidersImpl extends WrapperImpl implements CertificateRegistrationProviders { + private final CertificateRegistrationManager manager; + + CertificateRegistrationProvidersImpl(CertificateRegistrationManager manager) { + super(manager.inner().certificateRegistrationProviders()); + this.manager = manager; + } + + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable listOperationsAsync() { + CertificateRegistrationProvidersInner client = this.inner(); + return client.listOperationsAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public CsmOperationDescription call(CsmOperationDescriptionInner inner) { + return new CsmOperationDescriptionImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateRegistrationProvidersInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateRegistrationProvidersInner.java new file mode 100644 index 0000000000000..c771a875c6f49 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificateRegistrationProvidersInner.java @@ -0,0 +1,293 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.appservice.v2019_08_01.DefaultErrorResponseException; +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.appservice.v2019_08_01.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.appservice.v2019_08_01.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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listOperations(this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificatesImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificatesImpl.java new file mode 100644 index 0000000000000..a1a8a4acdc7f4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificatesImpl.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. + * def + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.Certificates; +import com.microsoft.azure.management.appservice.v2019_08_01.Certificate; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; + +class CertificatesImpl extends GroupableResourcesCoreImpl implements Certificates { + protected CertificatesImpl(CertificateRegistrationManager manager) { + super(manager.inner().certificates(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + CertificatesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + CertificatesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + CertificatesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + CertificatesInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Certificate call(CertificateInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + CertificatesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + CertificatesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Certificate call(CertificateInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public CertificateImpl define(String name) { + return wrapModel(name); + } + + @Override + protected CertificateImpl wrapModel(CertificateInner inner) { + return new CertificateImpl(inner.name(), inner, manager()); + } + + @Override + protected CertificateImpl wrapModel(String name) { + return new CertificateImpl(name, new CertificateInner(), this.manager()); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificatesInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificatesInner.java new file mode 100644 index 0000000000000..974b0b9c427da --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CertificatesInner.java @@ -0,0 +1,943 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.appservice.v2019_08_01.CertificatePatchResource; +import com.microsoft.azure.management.appservice.v2019_08_01.DefaultErrorResponseException; +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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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 CertificatePatchResource 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.appservice.v2019_08_01.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.appservice.v2019_08_01.Certificates listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get all certificates for a subscription. + * Description for Get all certificates for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all certificates in a resource group. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a certificate. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Create or update a certificate. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(certificateEnvelope); + return service.createOrUpdate(resourceGroupName, name, this.client.subscriptionId(), certificateEnvelope, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a certificate. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Create or update a certificate. + * Description for 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 DefaultErrorResponseException 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, CertificatePatchResource certificateEnvelope) { + return updateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope).toBlocking().single().body(); + } + + /** + * Create or update a certificate. + * Description for 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, CertificatePatchResource certificateEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope), serviceCallback); + } + + /** + * Create or update a certificate. + * Description for 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, CertificatePatchResource certificateEnvelope) { + return updateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope).map(new Func1, CertificateInner>() { + @Override + public CertificateInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a certificate. + * Description for 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, CertificatePatchResource 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(certificateEnvelope); + return service.update(resourceGroupName, name, this.client.subscriptionId(), certificateEnvelope, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all certificates for a subscription. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all certificates in a resource group. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ConnectionStringDictionaryImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ConnectionStringDictionaryImpl.java new file mode 100644 index 0000000000000..95116f7c0c9ea --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ConnectionStringDictionaryImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ConnectionStringDictionary; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.Map; +import com.microsoft.azure.management.appservice.v2019_08_01.ConnStringValueTypePair; + +class ConnectionStringDictionaryImpl extends WrapperImpl implements ConnectionStringDictionary { + private final CertificateRegistrationManager manager; + ConnectionStringDictionaryImpl(ConnectionStringDictionaryInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Map properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ConnectionStringDictionaryInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ConnectionStringDictionaryInner.java new file mode 100644 index 0000000000000..eb9a23b1a6721 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import java.util.Map; +import com.microsoft.azure.management.appservice.v2019_08_01.ConnStringValueTypePair; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * String dictionary resource. + */ +public class ConnectionStringDictionaryInner extends ProxyOnlyResource { + /** + * Connection strings. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get connection strings. + * + * @return the properties value + */ + public Map properties() { + return this.properties; + } + + /** + * Set connection strings. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ContinuousWebJobImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ContinuousWebJobImpl.java new file mode 100644 index 0000000000000..3865a37cdcf80 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ContinuousWebJobImpl.java @@ -0,0 +1,116 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ContinuousWebJob; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import java.util.Map; +import com.microsoft.azure.management.appservice.v2019_08_01.ContinuousWebJobStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.WebJobType; + +class ContinuousWebJobImpl extends IndexableRefreshableWrapperImpl implements ContinuousWebJob { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String webJobName; + + ContinuousWebJobImpl(ContinuousWebJobInner inner, CertificateRegistrationManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.webJobName = IdParsingUtils.getValueFromIdByName(inner.id(), "continuouswebjobs"); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getContinuousWebJobAsync(this.resourceGroupName, this.name, this.webJobName); + } + + + + @Override + public String detailedStatus() { + return this.inner().detailedStatus(); + } + + @Override + public String error() { + return this.inner().error(); + } + + @Override + public String extraInfoUrl() { + return this.inner().extraInfoUrl(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String logUrl() { + return this.inner().logUrl(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String runCommand() { + return this.inner().runCommand(); + } + + @Override + public Map settings() { + return this.inner().settings(); + } + + @Override + public ContinuousWebJobStatus status() { + return this.inner().status(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String url() { + return this.inner().url(); + } + + @Override + public Boolean usingSdk() { + return this.inner().usingSdk(); + } + + @Override + public WebJobType webJobType() { + return this.inner().webJobType(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ContinuousWebJobInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ContinuousWebJobInner.java new file mode 100644 index 0000000000000..411e30c8ed352 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ContinuousWebJobInner.java @@ -0,0 +1,284 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ContinuousWebJobStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.WebJobType; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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.detailed_status") + private String detailedStatus; + + /** + * Log URL. + */ + @JsonProperty(value = "properties.log_url") + private String logUrl; + + /** + * Run command. + */ + @JsonProperty(value = "properties.run_command") + private String runCommand; + + /** + * Job URL. + */ + @JsonProperty(value = "properties.url") + private String url; + + /** + * Extra Info URL. + */ + @JsonProperty(value = "properties.extra_info_url") + private String extraInfoUrl; + + /** + * Job type. Possible values include: 'Continuous', 'Triggered'. + */ + @JsonProperty(value = "properties.web_job_type") + private WebJobType webJobType; + + /** + * Error information. + */ + @JsonProperty(value = "properties.error") + private String error; + + /** + * Using SDK?. + */ + @JsonProperty(value = "properties.using_sdk") + private Boolean usingSdk; + + /** + * Job settings. + */ + @JsonProperty(value = "properties.settings") + private Map settings; + + /** + * Get job status. Possible values include: 'Initializing', 'Starting', 'Running', 'PendingRestart', 'Stopped'. + * + * @return the status value + */ + public ContinuousWebJobStatus status() { + return this.status; + } + + /** + * Set job status. Possible values include: 'Initializing', 'Starting', 'Running', 'PendingRestart', 'Stopped'. + * + * @param status the status value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withStatus(ContinuousWebJobStatus status) { + this.status = status; + return this; + } + + /** + * Get detailed status. + * + * @return the detailedStatus value + */ + public String detailedStatus() { + return this.detailedStatus; + } + + /** + * Set detailed status. + * + * @param detailedStatus the detailedStatus value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withDetailedStatus(String detailedStatus) { + this.detailedStatus = detailedStatus; + return this; + } + + /** + * Get log URL. + * + * @return the logUrl value + */ + public String logUrl() { + return this.logUrl; + } + + /** + * Set log URL. + * + * @param logUrl the logUrl value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withLogUrl(String logUrl) { + this.logUrl = logUrl; + return this; + } + + /** + * Get run command. + * + * @return the runCommand value + */ + public String runCommand() { + return this.runCommand; + } + + /** + * Set run command. + * + * @param runCommand the runCommand value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withRunCommand(String runCommand) { + this.runCommand = runCommand; + return this; + } + + /** + * Get job URL. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Set job URL. + * + * @param url the url value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get extra Info URL. + * + * @return the extraInfoUrl value + */ + public String extraInfoUrl() { + return this.extraInfoUrl; + } + + /** + * Set extra Info URL. + * + * @param extraInfoUrl the extraInfoUrl value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withExtraInfoUrl(String extraInfoUrl) { + this.extraInfoUrl = extraInfoUrl; + return this; + } + + /** + * Get job type. Possible values include: 'Continuous', 'Triggered'. + * + * @return the webJobType value + */ + public WebJobType webJobType() { + return this.webJobType; + } + + /** + * Set job type. Possible values include: 'Continuous', 'Triggered'. + * + * @param webJobType the webJobType value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withWebJobType(WebJobType webJobType) { + this.webJobType = webJobType; + return this; + } + + /** + * Get error information. + * + * @return the error value + */ + public String error() { + return this.error; + } + + /** + * Set error information. + * + * @param error the error value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withError(String error) { + this.error = error; + return this; + } + + /** + * Get using SDK?. + * + * @return the usingSdk value + */ + public Boolean usingSdk() { + return this.usingSdk; + } + + /** + * Set using SDK?. + * + * @param usingSdk the usingSdk value to set + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withUsingSdk(Boolean usingSdk) { + this.usingSdk = usingSdk; + return this; + } + + /** + * Get job settings. + * + * @return the settings value + */ + public Map settings() { + return this.settings; + } + + /** + * Set job settings. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmOperationDescriptionImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmOperationDescriptionImpl.java new file mode 100644 index 0000000000000..1235777c1dfa4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmOperationDescriptionImpl.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.CsmOperationDescription; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.CsmOperationDisplay; +import com.microsoft.azure.management.appservice.v2019_08_01.CsmOperationDescriptionProperties; + +class CsmOperationDescriptionImpl extends WrapperImpl implements CsmOperationDescription { + private final CertificateRegistrationManager manager; + CsmOperationDescriptionImpl(CsmOperationDescriptionInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public CsmOperationDisplay display() { + return this.inner().display(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String origin() { + return this.inner().origin(); + } + + @Override + public CsmOperationDescriptionProperties properties() { + return this.inner().properties(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmOperationDescriptionInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmOperationDescriptionInner.java new file mode 100644 index 0000000000000..3cddec2644fd7 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.CsmOperationDisplay; +import com.microsoft.azure.management.appservice.v2019_08_01.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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmPublishingCredentialsPoliciesCollectionImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmPublishingCredentialsPoliciesCollectionImpl.java new file mode 100644 index 0000000000000..f81990ecb289d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmPublishingCredentialsPoliciesCollectionImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.CsmPublishingCredentialsPoliciesCollection; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class CsmPublishingCredentialsPoliciesCollectionImpl extends WrapperImpl implements CsmPublishingCredentialsPoliciesCollection { + private final CertificateRegistrationManager manager; + CsmPublishingCredentialsPoliciesCollectionImpl(CsmPublishingCredentialsPoliciesCollectionInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public CsmPublishingCredentialsPoliciesEntityInner ftp() { + return this.inner().ftp(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public CsmPublishingCredentialsPoliciesEntityInner scm() { + return this.inner().scm(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmPublishingCredentialsPoliciesCollectionInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmPublishingCredentialsPoliciesCollectionInner.java new file mode 100644 index 0000000000000..2c9d5ed4af162 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmPublishingCredentialsPoliciesCollectionInner.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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Publishing Credentials Policies collection. + */ +@JsonFlatten +public class CsmPublishingCredentialsPoliciesCollectionInner extends ProxyOnlyResource { + /** + * Whether FTP is allowed. + */ + @JsonProperty(value = "properties.ftp", required = true) + private CsmPublishingCredentialsPoliciesEntityInner ftp; + + /** + * Whether Scm Basic Auth is allowed. + */ + @JsonProperty(value = "properties.scm", required = true) + private CsmPublishingCredentialsPoliciesEntityInner scm; + + /** + * Get whether FTP is allowed. + * + * @return the ftp value + */ + public CsmPublishingCredentialsPoliciesEntityInner ftp() { + return this.ftp; + } + + /** + * Set whether FTP is allowed. + * + * @param ftp the ftp value to set + * @return the CsmPublishingCredentialsPoliciesCollectionInner object itself. + */ + public CsmPublishingCredentialsPoliciesCollectionInner withFtp(CsmPublishingCredentialsPoliciesEntityInner ftp) { + this.ftp = ftp; + return this; + } + + /** + * Get whether Scm Basic Auth is allowed. + * + * @return the scm value + */ + public CsmPublishingCredentialsPoliciesEntityInner scm() { + return this.scm; + } + + /** + * Set whether Scm Basic Auth is allowed. + * + * @param scm the scm value to set + * @return the CsmPublishingCredentialsPoliciesCollectionInner object itself. + */ + public CsmPublishingCredentialsPoliciesCollectionInner withScm(CsmPublishingCredentialsPoliciesEntityInner scm) { + this.scm = scm; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmPublishingCredentialsPoliciesEntityImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmPublishingCredentialsPoliciesEntityImpl.java new file mode 100644 index 0000000000000..eaba2446349d3 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmPublishingCredentialsPoliciesEntityImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.CsmPublishingCredentialsPoliciesEntity; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class CsmPublishingCredentialsPoliciesEntityImpl extends WrapperImpl implements CsmPublishingCredentialsPoliciesEntity { + private final CertificateRegistrationManager manager; + CsmPublishingCredentialsPoliciesEntityImpl(CsmPublishingCredentialsPoliciesEntityInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public boolean allow() { + return this.inner().allow(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmPublishingCredentialsPoliciesEntityInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmPublishingCredentialsPoliciesEntityInner.java new file mode 100644 index 0000000000000..2a5c1d844b601 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmPublishingCredentialsPoliciesEntityInner.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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Publishing Credentials Policies parameters. + */ +@JsonFlatten +public class CsmPublishingCredentialsPoliciesEntityInner extends ProxyOnlyResource { + /** + * <code>true</code> to allow access to a publishing method; + * otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.allow", required = true) + private boolean allow; + + /** + * Get <code>true</code> to allow access to a publishing method; otherwise, <code>false</code>. + * + * @return the allow value + */ + public boolean allow() { + return this.allow; + } + + /** + * Set <code>true</code> to allow access to a publishing method; otherwise, <code>false</code>. + * + * @param allow the allow value to set + * @return the CsmPublishingCredentialsPoliciesEntityInner object itself. + */ + public CsmPublishingCredentialsPoliciesEntityInner withAllow(boolean allow) { + this.allow = allow; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmUsageQuotaInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CsmUsageQuotaInner.java new file mode 100644 index 0000000000000..7a0fe6c13f103 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.LocalizableString; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Usage of the quota resource. + */ +public class CsmUsageQuotaInner { + /** + * Units of measurement for the quota resource. + */ + @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 units of measurement for the quota resource. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set units of measurement for the quota resource. + * + * @param unit the unit value to set + * @return the CsmUsageQuotaInner object itself. + */ + public CsmUsageQuotaInner withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get next reset time for the resource counter. + * + * @return the nextResetTime value + */ + public DateTime nextResetTime() { + return this.nextResetTime; + } + + /** + * Set next reset time for the resource counter. + * + * @param nextResetTime the nextResetTime value to set + * @return the CsmUsageQuotaInner object itself. + */ + public CsmUsageQuotaInner withNextResetTime(DateTime nextResetTime) { + this.nextResetTime = nextResetTime; + return this; + } + + /** + * Get the current value of the resource counter. + * + * @return the currentValue value + */ + public Long currentValue() { + return this.currentValue; + } + + /** + * Set the current value of the resource counter. + * + * @param currentValue the currentValue value to set + * @return the CsmUsageQuotaInner object itself. + */ + public CsmUsageQuotaInner withCurrentValue(Long currentValue) { + this.currentValue = currentValue; + return this; + } + + /** + * Get the resource limit. + * + * @return the limit value + */ + public Long limit() { + return this.limit; + } + + /** + * Set the resource limit. + * + * @param limit the limit value to set + * @return the CsmUsageQuotaInner object itself. + */ + public CsmUsageQuotaInner withLimit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Get quota name. + * + * @return the name value + */ + public LocalizableString name() { + return this.name; + } + + /** + * Set quota name. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CustomHostnameAnalysisResultImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CustomHostnameAnalysisResultImpl.java new file mode 100644 index 0000000000000..bc12eca8e857d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CustomHostnameAnalysisResultImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.CustomHostnameAnalysisResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.ErrorEntity; +import com.microsoft.azure.management.appservice.v2019_08_01.DnsVerificationTestResult; + +class CustomHostnameAnalysisResultImpl extends WrapperImpl implements CustomHostnameAnalysisResult { + private final CertificateRegistrationManager manager; + CustomHostnameAnalysisResultImpl(CustomHostnameAnalysisResultInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public List alternateCNameRecords() { + return this.inner().alternateCNameRecords(); + } + + @Override + public List alternateTxtRecords() { + return this.inner().alternateTxtRecords(); + } + + @Override + public List aRecords() { + return this.inner().aRecords(); + } + + @Override + public List cNameRecords() { + return this.inner().cNameRecords(); + } + + @Override + public String conflictingAppResourceId() { + return this.inner().conflictingAppResourceId(); + } + + @Override + public ErrorEntity customDomainVerificationFailureInfo() { + return this.inner().customDomainVerificationFailureInfo(); + } + + @Override + public DnsVerificationTestResult customDomainVerificationTest() { + return this.inner().customDomainVerificationTest(); + } + + @Override + public Boolean hasConflictAcrossSubscription() { + return this.inner().hasConflictAcrossSubscription(); + } + + @Override + public Boolean hasConflictOnScaleUnit() { + return this.inner().hasConflictOnScaleUnit(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Boolean isHostnameAlreadyVerified() { + return this.inner().isHostnameAlreadyVerified(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List txtRecords() { + return this.inner().txtRecords(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CustomHostnameAnalysisResultInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/CustomHostnameAnalysisResultInner.java new file mode 100644 index 0000000000000..428235ccba1e0 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.DnsVerificationTestResult; +import com.microsoft.azure.management.appservice.v2019_08_01.ErrorEntity; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 there 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 <code>true</code> if hostname is already verified; otherwise, <code>false</code>. + * + * @return the isHostnameAlreadyVerified value + */ + public Boolean isHostnameAlreadyVerified() { + return this.isHostnameAlreadyVerified; + } + + /** + * Get dNS verification test result. Possible values include: 'Passed', 'Failed', 'Skipped'. + * + * @return the customDomainVerificationTest value + */ + public DnsVerificationTestResult customDomainVerificationTest() { + return this.customDomainVerificationTest; + } + + /** + * Get raw failure information if DNS verification fails. + * + * @return the customDomainVerificationFailureInfo value + */ + public ErrorEntity customDomainVerificationFailureInfo() { + return this.customDomainVerificationFailureInfo; + } + + /** + * Get <code>true</code> if there is a conflict on a scale unit; otherwise, <code>false</code>. + * + * @return the hasConflictOnScaleUnit value + */ + public Boolean hasConflictOnScaleUnit() { + return this.hasConflictOnScaleUnit; + } + + /** + * Get <code>true</code> if there is a conflict across subscriptions; otherwise, <code>false</code>. + * + * @return the hasConflictAcrossSubscription value + */ + public Boolean hasConflictAcrossSubscription() { + return this.hasConflictAcrossSubscription; + } + + /** + * Get name of the conflicting app on scale unit if it's within the same subscription. + * + * @return the conflictingAppResourceId value + */ + public String conflictingAppResourceId() { + return this.conflictingAppResourceId; + } + + /** + * Get cName records controller can see for this hostname. + * + * @return the cNameRecords value + */ + public List cNameRecords() { + return this.cNameRecords; + } + + /** + * Set cName records controller can see for this hostname. + * + * @param cNameRecords the cNameRecords value to set + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withCNameRecords(List cNameRecords) { + this.cNameRecords = cNameRecords; + return this; + } + + /** + * Get tXT records controller can see for this hostname. + * + * @return the txtRecords value + */ + public List txtRecords() { + return this.txtRecords; + } + + /** + * Set tXT records controller can see for this hostname. + * + * @param txtRecords the txtRecords value to set + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withTxtRecords(List txtRecords) { + this.txtRecords = txtRecords; + return this; + } + + /** + * Get a records controller can see for this hostname. + * + * @return the aRecords value + */ + public List aRecords() { + return this.aRecords; + } + + /** + * Set a records controller can see for this hostname. + * + * @param aRecords the aRecords value to set + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withARecords(List aRecords) { + this.aRecords = aRecords; + return this; + } + + /** + * Get alternate CName records controller can see for this hostname. + * + * @return the alternateCNameRecords value + */ + public List alternateCNameRecords() { + return this.alternateCNameRecords; + } + + /** + * Set alternate CName records controller can see for this hostname. + * + * @param alternateCNameRecords the alternateCNameRecords value to set + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withAlternateCNameRecords(List alternateCNameRecords) { + this.alternateCNameRecords = alternateCNameRecords; + return this; + } + + /** + * Get alternate TXT records controller can see for this hostname. + * + * @return the alternateTxtRecords value + */ + public List alternateTxtRecords() { + return this.alternateTxtRecords; + } + + /** + * Set alternate TXT records controller can see for this hostname. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeletedSiteImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeletedSiteImpl.java new file mode 100644 index 0000000000000..81c5806569adb --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeletedSiteImpl.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.DeletedSite; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; + +class DeletedSiteImpl extends IndexableRefreshableWrapperImpl implements DeletedSite { + private final CertificateRegistrationManager manager; + private String location; + private String deletedSiteId; + + DeletedSiteImpl(DeletedSiteInner inner, CertificateRegistrationManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.location = IdParsingUtils.getValueFromIdByName(inner.id(), "locations"); + this.deletedSiteId = IdParsingUtils.getValueFromIdByName(inner.id(), "deletedSites"); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + DeletedWebAppsInner client = this.manager().inner().deletedWebApps(); + return client.getDeletedWebAppByLocationAsync(this.location, this.deletedSiteId); + } + + + + @Override + public Integer deletedSiteId() { + return this.inner().deletedSiteId(); + } + + @Override + public String deletedSiteKind() { + return this.inner().deletedSiteKind(); + } + + @Override + public String deletedSiteName() { + return this.inner().deletedSiteName(); + } + + @Override + public String deletedTimestamp() { + return this.inner().deletedTimestamp(); + } + + @Override + public String geoRegionName() { + return this.inner().geoRegionName(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String resourceGroup() { + return this.inner().resourceGroup(); + } + + @Override + public String slot() { + return this.inner().slot(); + } + + @Override + public String subscription() { + return this.inner().subscription(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeletedSiteInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeletedSiteInner.java new file mode 100644 index 0000000000000..b0a51259632be --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeletedSiteInner.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * A deleted app. + */ +@JsonFlatten +public class DeletedSiteInner extends ProxyOnlyResource { + /** + * Numeric id for the deleted site. + */ + @JsonProperty(value = "properties.deletedSiteId", access = JsonProperty.Access.WRITE_ONLY) + private Integer deletedSiteId; + + /** + * Time in UTC when the app was deleted. + */ + @JsonProperty(value = "properties.deletedTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private String deletedTimestamp; + + /** + * Subscription containing the deleted site. + */ + @JsonProperty(value = "properties.subscription", access = JsonProperty.Access.WRITE_ONLY) + private String subscription; + + /** + * ResourceGroup that contained the deleted site. + */ + @JsonProperty(value = "properties.resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGroup; + + /** + * Name of the deleted site. + */ + @JsonProperty(value = "properties.deletedSiteName", access = JsonProperty.Access.WRITE_ONLY) + private String deletedSiteName; + + /** + * Slot of the deleted site. + */ + @JsonProperty(value = "properties.slot", access = JsonProperty.Access.WRITE_ONLY) + private String slot; + + /** + * Kind of site that was deleted. + */ + @JsonProperty(value = "properties.kind", access = JsonProperty.Access.WRITE_ONLY) + private String deletedSiteKind; + + /** + * Geo Region of the deleted site. + */ + @JsonProperty(value = "properties.geoRegionName", access = JsonProperty.Access.WRITE_ONLY) + private String geoRegionName; + + /** + * Get numeric id for the deleted site. + * + * @return the deletedSiteId value + */ + public Integer deletedSiteId() { + return this.deletedSiteId; + } + + /** + * Get time in UTC when the app was deleted. + * + * @return the deletedTimestamp value + */ + public String deletedTimestamp() { + return this.deletedTimestamp; + } + + /** + * Get subscription containing the deleted site. + * + * @return the subscription value + */ + public String subscription() { + return this.subscription; + } + + /** + * Get resourceGroup that contained the deleted site. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get name of the deleted site. + * + * @return the deletedSiteName value + */ + public String deletedSiteName() { + return this.deletedSiteName; + } + + /** + * Get slot of the deleted site. + * + * @return the slot value + */ + public String slot() { + return this.slot; + } + + /** + * Get kind of site that was deleted. + * + * @return the deletedSiteKind value + */ + public String deletedSiteKind() { + return this.deletedSiteKind; + } + + /** + * Get geo Region of the deleted site. + * + * @return the geoRegionName value + */ + public String geoRegionName() { + return this.geoRegionName; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeletedWebAppsImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeletedWebAppsImpl.java new file mode 100644 index 0000000000000..5c938390752db --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeletedWebAppsImpl.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. + * abc + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.DeletedWebApps; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.appservice.v2019_08_01.DeletedSite; +import com.microsoft.azure.Page; + +class DeletedWebAppsImpl extends WrapperImpl implements DeletedWebApps { + private final CertificateRegistrationManager manager; + + DeletedWebAppsImpl(CertificateRegistrationManager manager) { + super(manager.inner().deletedWebApps()); + this.manager = manager; + } + + public CertificateRegistrationManager manager() { + return this.manager; + } + + private DeletedSiteImpl wrapDeletedSiteModel(DeletedSiteInner inner) { + return new DeletedSiteImpl(inner, manager()); + } + + private Observable getDeletedSiteInnerUsingDeletedWebAppsInnerAsync(String id) { + String location = IdParsingUtils.getValueFromIdByName(id, "locations"); + String deletedSiteId = IdParsingUtils.getValueFromIdByName(id, "deletedSites"); + DeletedWebAppsInner client = this.inner(); + return client.getDeletedWebAppByLocationAsync(location, deletedSiteId); + } + + @Override + public Observable getDeletedWebAppByLocationAsync(String location, String deletedSiteId) { + DeletedWebAppsInner client = this.inner(); + return client.getDeletedWebAppByLocationAsync(location, deletedSiteId) + .flatMap(new Func1>() { + @Override + public Observable call(DeletedSiteInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DeletedSite)wrapDeletedSiteModel(inner)); + } + } + }); + } + + @Override + public Observable listByLocationAsync(final String location) { + DeletedWebAppsInner client = this.inner(); + return client.listByLocationAsync(location) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DeletedSite call(DeletedSiteInner inner) { + return wrapDeletedSiteModel(inner); + } + }); + } + + @Override + public Observable listAsync() { + DeletedWebAppsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DeletedSite call(DeletedSiteInner inner) { + return new DeletedSiteImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeletedWebAppsInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeletedWebAppsInner.java new file mode 100644 index 0000000000000..132191cc16962 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeletedWebAppsInner.java @@ -0,0 +1,636 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.appservice.v2019_08_01.DefaultErrorResponseException; +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.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.appservice.v2019_08_01.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.appservice.v2019_08_01.DeletedWebApps listByLocation" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites") + Observable> listByLocation(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.DeletedWebApps getDeletedWebAppByLocation" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}") + Observable> getDeletedWebAppByLocation(@Path("location") String location, @Path("deletedSiteId") String deletedSiteId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.DeletedWebApps 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.appservice.v2019_08_01.DeletedWebApps listByLocationNext" }) + @GET + Observable> listByLocationNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get all deleted apps for a subscription. + * Description for Get all deleted apps for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all deleted apps for a subscription at location. + * Description for Get all deleted apps for a subscription at location. + * + * @param location the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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 listByLocation(final String location) { + ServiceResponse> response = listByLocationSinglePageAsync(location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByLocationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all deleted apps for a subscription at location. + * Description for Get all deleted apps for a subscription at location. + * + * @param location the String value + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByLocationAsync(final String location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByLocationSinglePageAsync(location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByLocationNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all deleted apps for a subscription at location. + * Description for Get all deleted apps for a subscription at location. + * + * @param location the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeletedSiteInner> object + */ + public Observable> listByLocationAsync(final String location) { + return listByLocationWithServiceResponseAsync(location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all deleted apps for a subscription at location. + * Description for Get all deleted apps for a subscription at location. + * + * @param location the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeletedSiteInner> object + */ + public Observable>> listByLocationWithServiceResponseAsync(final String location) { + return listByLocationSinglePageAsync(location) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByLocationNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all deleted apps for a subscription at location. + * Description for Get all deleted apps for a subscription at location. + * + ServiceResponse> * @param location the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DeletedSiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByLocationSinglePageAsync(final String location) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByLocation(location, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByLocationDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByLocationDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get deleted app for a subscription at location. + * Description for Get deleted app for a subscription at location. + * + * @param location the String value + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DeletedSiteInner object if successful. + */ + public DeletedSiteInner getDeletedWebAppByLocation(String location, String deletedSiteId) { + return getDeletedWebAppByLocationWithServiceResponseAsync(location, deletedSiteId).toBlocking().single().body(); + } + + /** + * Get deleted app for a subscription at location. + * Description for Get deleted app for a subscription at location. + * + * @param location the String value + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345 + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getDeletedWebAppByLocationAsync(String location, String deletedSiteId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getDeletedWebAppByLocationWithServiceResponseAsync(location, deletedSiteId), serviceCallback); + } + + /** + * Get deleted app for a subscription at location. + * Description for Get deleted app for a subscription at location. + * + * @param location the String value + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeletedSiteInner object + */ + public Observable getDeletedWebAppByLocationAsync(String location, String deletedSiteId) { + return getDeletedWebAppByLocationWithServiceResponseAsync(location, deletedSiteId).map(new Func1, DeletedSiteInner>() { + @Override + public DeletedSiteInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get deleted app for a subscription at location. + * Description for Get deleted app for a subscription at location. + * + * @param location the String value + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345 + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DeletedSiteInner object + */ + public Observable> getDeletedWebAppByLocationWithServiceResponseAsync(String location, String deletedSiteId) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (deletedSiteId == null) { + throw new IllegalArgumentException("Parameter deletedSiteId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getDeletedWebAppByLocation(location, deletedSiteId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDeletedWebAppByLocationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDeletedWebAppByLocationDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all deleted apps for a subscription. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all deleted apps for a subscription at location. + * Description for Get all deleted apps for a subscription at location. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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 listByLocationNext(final String nextPageLink) { + ServiceResponse> response = listByLocationNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByLocationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all deleted apps for a subscription at location. + * Description for Get all deleted apps for a subscription at location. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByLocationNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByLocationNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByLocationNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all deleted apps for a subscription at location. + * Description for Get all deleted apps for a subscription at location. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeletedSiteInner> object + */ + public Observable> listByLocationNextAsync(final String nextPageLink) { + return listByLocationNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all deleted apps for a subscription at location. + * Description for Get all deleted apps for a subscription at location. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DeletedSiteInner> object + */ + public Observable>> listByLocationNextWithServiceResponseAsync(final String nextPageLink) { + return listByLocationNextSinglePageAsync(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(listByLocationNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all deleted apps for a subscription at location. + * Description for Get all deleted apps for a subscription at location. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DeletedSiteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByLocationNextSinglePageAsync(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.listByLocationNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByLocationNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByLocationNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeploymentImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeploymentImpl.java new file mode 100644 index 0000000000000..45c17de7c18bc --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeploymentImpl.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.Deployment; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import org.joda.time.DateTime; + +class DeploymentImpl extends CreatableUpdatableImpl implements Deployment, Deployment.Definition, Deployment.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String id; + + DeploymentImpl(String name, CertificateRegistrationManager manager) { + super(name, new DeploymentInner()); + this.manager = manager; + // Set resource name + this.id = name; + // + } + + DeploymentImpl(DeploymentInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.id = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.id = IdParsingUtils.getValueFromIdByName(inner.id(), "deployments"); + // + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.createDeploymentAsync(this.resourceGroupName, this.name, this.id, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.createDeploymentAsync(this.resourceGroupName, this.name, this.id, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getDeploymentAsync(this.resourceGroupName, this.name, this.id); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public Boolean active() { + return this.inner().active(); + } + + @Override + public String author() { + return this.inner().author(); + } + + @Override + public String authorEmail() { + return this.inner().authorEmail(); + } + + @Override + public String deployer() { + return this.inner().deployer(); + } + + @Override + public String details() { + return this.inner().details(); + } + + @Override + public DateTime endTime() { + return this.inner().endTime(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String message() { + return this.inner().message(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public DateTime startTime() { + return this.inner().startTime(); + } + + @Override + public Integer status() { + return this.inner().status(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public DeploymentImpl withExistingSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + @Override + public DeploymentImpl withActive(Boolean active) { + this.inner().withActive(active); + return this; + } + + @Override + public DeploymentImpl withAuthor(String author) { + this.inner().withAuthor(author); + return this; + } + + @Override + public DeploymentImpl withAuthorEmail(String authorEmail) { + this.inner().withAuthorEmail(authorEmail); + return this; + } + + @Override + public DeploymentImpl withDeployer(String deployer) { + this.inner().withDeployer(deployer); + return this; + } + + @Override + public DeploymentImpl withDetails(String details) { + this.inner().withDetails(details); + return this; + } + + @Override + public DeploymentImpl withEndTime(DateTime endTime) { + this.inner().withEndTime(endTime); + return this; + } + + @Override + public DeploymentImpl withKind(String kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public DeploymentImpl withMessage(String message) { + this.inner().withMessage(message); + return this; + } + + @Override + public DeploymentImpl withStartTime(DateTime startTime) { + this.inner().withStartTime(startTime); + return this; + } + + @Override + public DeploymentImpl withStatus(Integer status) { + this.inner().withStatus(status); + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeploymentInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeploymentInner.java new file mode 100644 index 0000000000000..1a317d44a9134 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeploymentInner.java @@ -0,0 +1,256 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * User credentials used for publishing activity. + */ +@JsonFlatten +public class DeploymentInner extends ProxyOnlyResource { + /** + * 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.author_email") + private String authorEmail; + + /** + * Start time. + */ + @JsonProperty(value = "properties.start_time") + private DateTime startTime; + + /** + * End time. + */ + @JsonProperty(value = "properties.end_time") + 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 deployment status. + * + * @return the status value + */ + public Integer status() { + return this.status; + } + + /** + * Set deployment status. + * + * @param status the status value to set + * @return the DeploymentInner object itself. + */ + public DeploymentInner withStatus(Integer status) { + this.status = status; + return this; + } + + /** + * Get details about deployment status. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set details about deployment status. + * + * @param message the message value to set + * @return the DeploymentInner object itself. + */ + public DeploymentInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get who authored the deployment. + * + * @return the author value + */ + public String author() { + return this.author; + } + + /** + * Set who authored the deployment. + * + * @param author the author value to set + * @return the DeploymentInner object itself. + */ + public DeploymentInner withAuthor(String author) { + this.author = author; + return this; + } + + /** + * Get who performed the deployment. + * + * @return the deployer value + */ + public String deployer() { + return this.deployer; + } + + /** + * Set who performed the deployment. + * + * @param deployer the deployer value to set + * @return the DeploymentInner object itself. + */ + public DeploymentInner withDeployer(String deployer) { + this.deployer = deployer; + return this; + } + + /** + * Get author email. + * + * @return the authorEmail value + */ + public String authorEmail() { + return this.authorEmail; + } + + /** + * Set author email. + * + * @param authorEmail the authorEmail value to set + * @return the DeploymentInner object itself. + */ + public DeploymentInner withAuthorEmail(String authorEmail) { + this.authorEmail = authorEmail; + return this; + } + + /** + * Get start time. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set start time. + * + * @param startTime the startTime value to set + * @return the DeploymentInner object itself. + */ + public DeploymentInner withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get end time. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set end time. + * + * @param endTime the endTime value to set + * @return the DeploymentInner object itself. + */ + public DeploymentInner withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get true if deployment is currently active, false if completed and null if not started. + * + * @return the active value + */ + public Boolean active() { + return this.active; + } + + /** + * Set true if deployment is currently active, false if completed and null if not started. + * + * @param active the active value to set + * @return the DeploymentInner object itself. + */ + public DeploymentInner withActive(Boolean active) { + this.active = active; + return this; + } + + /** + * Get details on deployment. + * + * @return the details value + */ + public String details() { + return this.details; + } + + /** + * Set details on deployment. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeploymentLocationsInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeploymentLocationsInner.java new file mode 100644 index 0000000000000..b9a7590269f9b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DeploymentLocationsInner.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.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.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 available regions. + * + * @return the locations value + */ + public List locations() { + return this.locations; + } + + /** + * Set available regions. + * + * @param locations the locations value to set + * @return the DeploymentLocationsInner object itself. + */ + public DeploymentLocationsInner withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Get available App Service Environments with full descriptions of the environments. + * + * @return the hostingEnvironments value + */ + public List hostingEnvironments() { + return this.hostingEnvironments; + } + + /** + * Set available App Service Environments with full descriptions of the environments. + * + * @param hostingEnvironments the hostingEnvironments value to set + * @return the DeploymentLocationsInner object itself. + */ + public DeploymentLocationsInner withHostingEnvironments(List hostingEnvironments) { + this.hostingEnvironments = hostingEnvironments; + return this; + } + + /** + * Get available App Service Environments with basic information. + * + * @return the hostingEnvironmentDeploymentInfos value + */ + public List hostingEnvironmentDeploymentInfos() { + return this.hostingEnvironmentDeploymentInfos; + } + + /** + * Set available App Service Environments with basic information. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DetectorDefinitionImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DetectorDefinitionImpl.java new file mode 100644 index 0000000000000..81813cc3924f9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DetectorDefinitionImpl.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.DetectorDefinition; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class DetectorDefinitionImpl extends WrapperImpl implements DetectorDefinition { + private final CertificateRegistrationManager manager; + DetectorDefinitionImpl(DetectorDefinitionInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Boolean isEnabled() { + return this.inner().isEnabled(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Double rank() { + return this.inner().rank(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DetectorDefinitionInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DetectorDefinitionInner.java new file mode 100644 index 0000000000000..3f51349c17930 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 display name of the detector. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Get description of the detector. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Get detector Rank. + * + * @return the rank value + */ + public Double rank() { + return this.rank; + } + + /** + * Get flag representing whether detector is enabled or not. + * + * @return the isEnabled value + */ + public Boolean isEnabled() { + return this.isEnabled; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DetectorResponseImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DetectorResponseImpl.java new file mode 100644 index 0000000000000..8e7112d299095 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DetectorResponseImpl.java @@ -0,0 +1,76 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.DetectorResponse; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.DiagnosticData; +import com.microsoft.azure.management.appservice.v2019_08_01.DetectorInfo; + +class DetectorResponseImpl extends IndexableRefreshableWrapperImpl implements DetectorResponse { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String detectorName; + + DetectorResponseImpl(DetectorResponseInner inner, CertificateRegistrationManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "hostingEnvironments"); + this.detectorName = IdParsingUtils.getValueFromIdByName(inner.id(), "detectors"); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + DiagnosticsInner client = this.manager().inner().diagnostics(); + return client.getHostingEnvironmentDetectorResponseAsync(this.resourceGroupName, this.name, this.detectorName); + } + + + + @Override + public List dataset() { + return this.inner().dataset(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public DetectorInfo metadata() { + return this.inner().metadata(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DetectorResponseInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DetectorResponseInner.java new file mode 100644 index 0000000000000..3e8aa9e3198c1 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DetectorResponseInner.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.DetectorInfo; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.DiagnosticData; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Class representing Response from Detector. + */ +@JsonFlatten +public class DetectorResponseInner extends ProxyOnlyResource { + /** + * metadata for the detector. + */ + @JsonProperty(value = "properties.metadata") + private DetectorInfo metadata; + + /** + * Data Set. + */ + @JsonProperty(value = "properties.dataset") + private List dataset; + + /** + * Get metadata for the detector. + * + * @return the metadata value + */ + public DetectorInfo metadata() { + return this.metadata; + } + + /** + * Set metadata for the detector. + * + * @param metadata the metadata value to set + * @return the DetectorResponseInner object itself. + */ + public DetectorResponseInner withMetadata(DetectorInfo metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get data Set. + * + * @return the dataset value + */ + public List dataset() { + return this.dataset; + } + + /** + * Set data Set. + * + * @param dataset the dataset value to set + * @return the DetectorResponseInner object itself. + */ + public DetectorResponseInner withDataset(List dataset) { + this.dataset = dataset; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticAnalysisImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticAnalysisImpl.java new file mode 100644 index 0000000000000..2485019610d57 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticAnalysisImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.DiagnosticAnalysis; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.AbnormalTimePeriod; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.AnalysisData; + +class DiagnosticAnalysisImpl extends WrapperImpl implements DiagnosticAnalysis { + private final CertificateRegistrationManager manager; + DiagnosticAnalysisImpl(DiagnosticAnalysisInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public List abnormalTimePeriods() { + return this.inner().abnormalTimePeriods(); + } + + @Override + public DateTime endTime() { + return this.inner().endTime(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List nonCorrelatedDetectors() { + return this.inner().nonCorrelatedDetectors(); + } + + @Override + public List payload() { + return this.inner().payload(); + } + + @Override + public DateTime startTime() { + return this.inner().startTime(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticAnalysisInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticAnalysisInner.java new file mode 100644 index 0000000000000..712905aeba433 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.AbnormalTimePeriod; +import com.microsoft.azure.management.appservice.v2019_08_01.AnalysisData; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 start time of the period. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set start time of the period. + * + * @param startTime the startTime value to set + * @return the DiagnosticAnalysisInner object itself. + */ + public DiagnosticAnalysisInner withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get end time of the period. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set end time of the period. + * + * @param endTime the endTime value to set + * @return the DiagnosticAnalysisInner object itself. + */ + public DiagnosticAnalysisInner withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get list of time periods. + * + * @return the abnormalTimePeriods value + */ + public List abnormalTimePeriods() { + return this.abnormalTimePeriods; + } + + /** + * Set list of time periods. + * + * @param abnormalTimePeriods the abnormalTimePeriods value to set + * @return the DiagnosticAnalysisInner object itself. + */ + public DiagnosticAnalysisInner withAbnormalTimePeriods(List abnormalTimePeriods) { + this.abnormalTimePeriods = abnormalTimePeriods; + return this; + } + + /** + * Get data by each detector. + * + * @return the payload value + */ + public List payload() { + return this.payload; + } + + /** + * Set data by each detector. + * + * @param payload the payload value to set + * @return the DiagnosticAnalysisInner object itself. + */ + public DiagnosticAnalysisInner withPayload(List payload) { + this.payload = payload; + return this; + } + + /** + * Get data by each detector for detectors that did not corelate. + * + * @return the nonCorrelatedDetectors value + */ + public List nonCorrelatedDetectors() { + return this.nonCorrelatedDetectors; + } + + /** + * Set data by each detector for detectors that did not corelate. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticCategoryImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticCategoryImpl.java new file mode 100644 index 0000000000000..dc39ae353d192 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticCategoryImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.DiagnosticCategory; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; + +class DiagnosticCategoryImpl extends IndexableRefreshableWrapperImpl implements DiagnosticCategory { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String siteName; + private String diagnosticCategory; + + DiagnosticCategoryImpl(DiagnosticCategoryInner inner, CertificateRegistrationManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.siteName = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.diagnosticCategory = IdParsingUtils.getValueFromIdByName(inner.id(), "diagnostics"); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + DiagnosticsInner client = this.manager().inner().diagnostics(); + return client.getSiteDiagnosticCategoryAsync(this.resourceGroupName, this.siteName, this.diagnosticCategory); + } + + + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticCategoryInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticCategoryInner.java new file mode 100644 index 0000000000000..3d0489d37368a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 description of the diagnostic category. + * + * @return the description value + */ + public String description() { + return this.description; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticDetectorResponseImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticDetectorResponseImpl.java new file mode 100644 index 0000000000000..0a7626ea1f98f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticDetectorResponseImpl.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.DiagnosticDetectorResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.DetectorAbnormalTimePeriod; +import com.microsoft.azure.management.appservice.v2019_08_01.NameValuePair; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.DiagnosticMetricSet; +import com.microsoft.azure.management.appservice.v2019_08_01.ResponseMetaData; + +class DiagnosticDetectorResponseImpl extends WrapperImpl implements DiagnosticDetectorResponse { + private final CertificateRegistrationManager manager; + DiagnosticDetectorResponseImpl(DiagnosticDetectorResponseInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public List abnormalTimePeriods() { + return this.inner().abnormalTimePeriods(); + } + + @Override + public List> data() { + return this.inner().data(); + } + + @Override + public DetectorDefinitionInner detectorDefinition() { + return this.inner().detectorDefinition(); + } + + @Override + public DateTime endTime() { + return this.inner().endTime(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Boolean issueDetected() { + return this.inner().issueDetected(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public List metrics() { + return this.inner().metrics(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ResponseMetaData responseMetaData() { + return this.inner().responseMetaData(); + } + + @Override + public DateTime startTime() { + return this.inner().startTime(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticDetectorResponseInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticDetectorResponseInner.java new file mode 100644 index 0000000000000..fb31762d142ef --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.DiagnosticMetricSet; +import com.microsoft.azure.management.appservice.v2019_08_01.DetectorAbnormalTimePeriod; +import com.microsoft.azure.management.appservice.v2019_08_01.NameValuePair; +import com.microsoft.azure.management.appservice.v2019_08_01.ResponseMetaData; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Class representing Response 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 start time of the period. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set start time of the period. + * + * @param startTime the startTime value to set + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get end time of the period. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set end time of the period. + * + * @param endTime the endTime value to set + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get flag representing Issue was detected. + * + * @return the issueDetected value + */ + public Boolean issueDetected() { + return this.issueDetected; + } + + /** + * Set flag representing Issue was detected. + * + * @param issueDetected the issueDetected value to set + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withIssueDetected(Boolean issueDetected) { + this.issueDetected = issueDetected; + return this; + } + + /** + * Get detector's definition. + * + * @return the detectorDefinition value + */ + public DetectorDefinitionInner detectorDefinition() { + return this.detectorDefinition; + } + + /** + * Set detector's definition. + * + * @param detectorDefinition the detectorDefinition value to set + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withDetectorDefinition(DetectorDefinitionInner detectorDefinition) { + this.detectorDefinition = detectorDefinition; + return this; + } + + /** + * Get metrics provided by the detector. + * + * @return the metrics value + */ + public List metrics() { + return this.metrics; + } + + /** + * Set metrics provided by the detector. + * + * @param metrics the metrics value to set + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withMetrics(List metrics) { + this.metrics = metrics; + return this; + } + + /** + * Get list of Correlated events found by the detector. + * + * @return the abnormalTimePeriods value + */ + public List abnormalTimePeriods() { + return this.abnormalTimePeriods; + } + + /** + * Set list of Correlated events found by the detector. + * + * @param abnormalTimePeriods the abnormalTimePeriods value to set + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withAbnormalTimePeriods(List abnormalTimePeriods) { + this.abnormalTimePeriods = abnormalTimePeriods; + return this; + } + + /** + * Get additional Data that detector wants to send. + * + * @return the data value + */ + public List> data() { + return this.data; + } + + /** + * Set additional Data that detector wants to send. + * + * @param data the data value to set + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withData(List> data) { + this.data = data; + return this; + } + + /** + * Get meta Data. + * + * @return the responseMetaData value + */ + public ResponseMetaData responseMetaData() { + return this.responseMetaData; + } + + /** + * Set meta Data. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticsImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticsImpl.java new file mode 100644 index 0000000000000..2314f8c47993f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticsImpl.java @@ -0,0 +1,395 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.Diagnostics; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.appservice.v2019_08_01.DiagnosticCategory; +import com.microsoft.azure.management.appservice.v2019_08_01.DetectorResponse; +import com.microsoft.azure.management.appservice.v2019_08_01.DetectorDefinition; +import com.microsoft.azure.management.appservice.v2019_08_01.DiagnosticDetectorResponse; +import com.microsoft.azure.management.appservice.v2019_08_01.AnalysisDefinition; +import com.microsoft.azure.management.appservice.v2019_08_01.DiagnosticAnalysis; + +class DiagnosticsImpl extends WrapperImpl implements Diagnostics { + private final CertificateRegistrationManager manager; + + DiagnosticsImpl(CertificateRegistrationManager manager) { + super(manager.inner().diagnostics()); + this.manager = manager; + } + + public CertificateRegistrationManager manager() { + return this.manager; + } + + private DiagnosticCategoryImpl wrapModel(DiagnosticCategoryInner inner) { + return new DiagnosticCategoryImpl(inner, manager()); + } + + @Override + public Observable listSiteDiagnosticCategoriesSlotAsync(final String resourceGroupName, final String siteName, final String slot) { + DiagnosticsInner client = this.inner(); + return client.listSiteDiagnosticCategoriesSlotAsync(resourceGroupName, siteName, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DiagnosticCategory call(DiagnosticCategoryInner inner) { + return new DiagnosticCategoryImpl(inner, manager()); + } + }); + } + + @Override + public Observable getSiteDiagnosticCategorySlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String slot) { + DiagnosticsInner client = this.inner(); + return client.getSiteDiagnosticCategorySlotAsync(resourceGroupName, siteName, diagnosticCategory, slot) + .map(new Func1() { + @Override + public DiagnosticCategory call(DiagnosticCategoryInner inner) { + return new DiagnosticCategoryImpl(inner, manager()); + } + }); + } + + @Override + public Observable listSiteDiagnosticCategoriesAsync(final String resourceGroupName, final String siteName) { + DiagnosticsInner client = this.inner(); + return client.listSiteDiagnosticCategoriesAsync(resourceGroupName, siteName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DiagnosticCategory call(DiagnosticCategoryInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getSiteDiagnosticCategoryAsync(String resourceGroupName, String siteName, String diagnosticCategory) { + DiagnosticsInner client = this.inner(); + return client.getSiteDiagnosticCategoryAsync(resourceGroupName, siteName, diagnosticCategory) + .flatMap(new Func1>() { + @Override + public Observable call(DiagnosticCategoryInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DiagnosticCategory)wrapModel(inner)); + } + } + }); + } + + private DetectorResponseImpl wrapDetectorResponseModel(DetectorResponseInner inner) { + return new DetectorResponseImpl(inner, manager()); + } + + private AnalysisDefinitionImpl wrapAnalysisDefinitionModel(AnalysisDefinitionInner inner) { + return new AnalysisDefinitionImpl(inner, manager()); + } + + private Observable getDetectorResponseInnerUsingDiagnosticsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "hostingEnvironments"); + String detectorName = IdParsingUtils.getValueFromIdByName(id, "detectors"); + DiagnosticsInner client = this.inner(); + return client.getHostingEnvironmentDetectorResponseAsync(resourceGroupName, name, detectorName); + } + + private Observable getAnalysisDefinitionInnerUsingDiagnosticsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String siteName = IdParsingUtils.getValueFromIdByName(id, "sites"); + String diagnosticCategory = IdParsingUtils.getValueFromIdByName(id, "diagnostics"); + String analysisName = IdParsingUtils.getValueFromIdByName(id, "analyses"); + DiagnosticsInner client = this.inner(); + return client.getSiteAnalysisAsync(resourceGroupName, siteName, diagnosticCategory, analysisName); + } + + @Override + public Observable getHostingEnvironmentDetectorResponseAsync(String resourceGroupName, String name, String detectorName) { + DiagnosticsInner client = this.inner(); + return client.getHostingEnvironmentDetectorResponseAsync(resourceGroupName, name, detectorName) + .flatMap(new Func1>() { + @Override + public Observable call(DetectorResponseInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DetectorResponse)wrapDetectorResponseModel(inner)); + } + } + }); + } + + @Override + public Observable listHostingEnvironmentDetectorResponsesAsync(final String resourceGroupName, final String name) { + DiagnosticsInner client = this.inner(); + return client.listHostingEnvironmentDetectorResponsesAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DetectorResponse call(DetectorResponseInner inner) { + return wrapDetectorResponseModel(inner); + } + }); + } + + @Override + public Observable listSiteDetectorResponsesAsync(final String resourceGroupName, final String siteName) { + DiagnosticsInner client = this.inner(); + return client.listSiteDetectorResponsesAsync(resourceGroupName, siteName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DetectorResponse call(DetectorResponseInner inner) { + return new DetectorResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable getSiteDetectorResponseAsync(String resourceGroupName, String siteName, String detectorName) { + DiagnosticsInner client = this.inner(); + return client.getSiteDetectorResponseAsync(resourceGroupName, siteName, detectorName) + .map(new Func1() { + @Override + public DetectorResponse call(DetectorResponseInner inner) { + return new DetectorResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable listSiteDetectorsAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory) { + DiagnosticsInner client = this.inner(); + return client.listSiteDetectorsAsync(resourceGroupName, siteName, diagnosticCategory) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DetectorDefinition call(DetectorDefinitionInner inner) { + return new DetectorDefinitionImpl(inner, manager()); + } + }); + } + + @Override + public Observable getSiteDetectorAsync(String resourceGroupName, String siteName, String diagnosticCategory, String detectorName) { + DiagnosticsInner client = this.inner(); + return client.getSiteDetectorAsync(resourceGroupName, siteName, diagnosticCategory, detectorName) + .map(new Func1() { + @Override + public DetectorDefinition call(DetectorDefinitionInner inner) { + return new DetectorDefinitionImpl(inner, manager()); + } + }); + } + + @Override + public Observable executeSiteDetectorAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory) { + DiagnosticsInner client = this.inner(); + return client.executeSiteDetectorAsync(resourceGroupName, siteName, detectorName, diagnosticCategory) + .map(new Func1() { + @Override + public DiagnosticDetectorResponse call(DiagnosticDetectorResponseInner inner) { + return new DiagnosticDetectorResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable listSiteDetectorResponsesSlotAsync(final String resourceGroupName, final String siteName, final String slot) { + DiagnosticsInner client = this.inner(); + return client.listSiteDetectorResponsesSlotAsync(resourceGroupName, siteName, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DetectorResponse call(DetectorResponseInner inner) { + return new DetectorResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable getSiteDetectorResponseSlotAsync(String resourceGroupName, String siteName, String detectorName, String slot) { + DiagnosticsInner client = this.inner(); + return client.getSiteDetectorResponseSlotAsync(resourceGroupName, siteName, detectorName, slot) + .map(new Func1() { + @Override + public DetectorResponse call(DetectorResponseInner inner) { + return new DetectorResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable listSiteDetectorsSlotAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String slot) { + DiagnosticsInner client = this.inner(); + return client.listSiteDetectorsSlotAsync(resourceGroupName, siteName, diagnosticCategory, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DetectorDefinition call(DetectorDefinitionInner inner) { + return new DetectorDefinitionImpl(inner, manager()); + } + }); + } + + @Override + public Observable getSiteDetectorSlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, String slot) { + DiagnosticsInner client = this.inner(); + return client.getSiteDetectorSlotAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, slot) + .map(new Func1() { + @Override + public DetectorDefinition call(DetectorDefinitionInner inner) { + return new DetectorDefinitionImpl(inner, manager()); + } + }); + } + + @Override + public Observable executeSiteDetectorSlotAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot) { + DiagnosticsInner client = this.inner(); + return client.executeSiteDetectorSlotAsync(resourceGroupName, siteName, detectorName, diagnosticCategory, slot) + .map(new Func1() { + @Override + public DiagnosticDetectorResponse call(DiagnosticDetectorResponseInner inner) { + return new DiagnosticDetectorResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable getSiteAnalysisAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + DiagnosticsInner client = this.inner(); + return client.getSiteAnalysisAsync(resourceGroupName, siteName, diagnosticCategory, analysisName) + .flatMap(new Func1>() { + @Override + public Observable call(AnalysisDefinitionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((AnalysisDefinition)wrapAnalysisDefinitionModel(inner)); + } + } + }); + } + + @Override + public Observable listSiteAnalysesAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory) { + DiagnosticsInner client = this.inner(); + return client.listSiteAnalysesAsync(resourceGroupName, siteName, diagnosticCategory) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AnalysisDefinition call(AnalysisDefinitionInner inner) { + return wrapAnalysisDefinitionModel(inner); + } + }); + } + + @Override + public Observable executeSiteAnalysisAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + DiagnosticsInner client = this.inner(); + return client.executeSiteAnalysisAsync(resourceGroupName, siteName, diagnosticCategory, analysisName) + .map(new Func1() { + @Override + public DiagnosticAnalysis call(DiagnosticAnalysisInner inner) { + return new DiagnosticAnalysisImpl(inner, manager()); + } + }); + } + + @Override + public Observable listSiteAnalysesSlotAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String slot) { + DiagnosticsInner client = this.inner(); + return client.listSiteAnalysesSlotAsync(resourceGroupName, siteName, diagnosticCategory, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AnalysisDefinition call(AnalysisDefinitionInner inner) { + return new AnalysisDefinitionImpl(inner, manager()); + } + }); + } + + @Override + public Observable getSiteAnalysisSlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + DiagnosticsInner client = this.inner(); + return client.getSiteAnalysisSlotAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot) + .map(new Func1() { + @Override + public AnalysisDefinition call(AnalysisDefinitionInner inner) { + return new AnalysisDefinitionImpl(inner, manager()); + } + }); + } + + @Override + public Observable executeSiteAnalysisSlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + DiagnosticsInner client = this.inner(); + return client.executeSiteAnalysisSlotAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot) + .map(new Func1() { + @Override + public DiagnosticAnalysis call(DiagnosticAnalysisInner inner) { + return new DiagnosticAnalysisImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticsInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticsInner.java new file mode 100644 index 0000000000000..6562938836666 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticsInner.java @@ -0,0 +1,4591 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.appservice.v2019_08_01.DefaultErrorResponseException; +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.appservice.v2019_08_01.Diagnostics listHostingEnvironmentDetectorResponses" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors") + Observable> listHostingEnvironmentDetectorResponses(@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.appservice.v2019_08_01.Diagnostics getHostingEnvironmentDetectorResponse" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}") + Observable> getHostingEnvironmentDetectorResponse(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("detectorName") String detectorName, @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.appservice.v2019_08_01.Diagnostics listSiteDetectorResponses" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors") + Observable> listSiteDetectorResponses(@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.appservice.v2019_08_01.Diagnostics getSiteDetectorResponse" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}") + Observable> getSiteDetectorResponse(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("detectorName") String detectorName, @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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.Diagnostics listSiteDetectorResponsesSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors") + Observable> listSiteDetectorResponsesSlot(@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.appservice.v2019_08_01.Diagnostics getSiteDetectorResponseSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}") + Observable> getSiteDetectorResponseSlot(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("detectorName") String detectorName, @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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.Diagnostics listHostingEnvironmentDetectorResponsesNext" }) + @GET + Observable> listHostingEnvironmentDetectorResponsesNext(@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.appservice.v2019_08_01.Diagnostics listSiteDetectorResponsesNext" }) + @GET + Observable> listSiteDetectorResponsesNext(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.Diagnostics listSiteDetectorResponsesSlotNext" }) + @GET + Observable> listSiteDetectorResponsesSlotNext(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.Diagnostics listSiteDetectorsSlotNext" }) + @GET + Observable> listSiteDetectorsSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List Hosting Environment Detector Responses. + * Description for List Hosting Environment Detector Responses. + * + * @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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DetectorResponseInner> object if successful. + */ + public PagedList listHostingEnvironmentDetectorResponses(final String resourceGroupName, final String name) { + ServiceResponse> response = listHostingEnvironmentDetectorResponsesSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listHostingEnvironmentDetectorResponsesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List Hosting Environment Detector Responses. + * Description for List Hosting Environment Detector Responses. + * + * @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> listHostingEnvironmentDetectorResponsesAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listHostingEnvironmentDetectorResponsesSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listHostingEnvironmentDetectorResponsesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List Hosting Environment Detector Responses. + * Description for List Hosting Environment Detector Responses. + * + * @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<DetectorResponseInner> object + */ + public Observable> listHostingEnvironmentDetectorResponsesAsync(final String resourceGroupName, final String name) { + return listHostingEnvironmentDetectorResponsesWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List Hosting Environment Detector Responses. + * Description for List Hosting Environment Detector Responses. + * + * @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<DetectorResponseInner> object + */ + public Observable>> listHostingEnvironmentDetectorResponsesWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listHostingEnvironmentDetectorResponsesSinglePageAsync(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(listHostingEnvironmentDetectorResponsesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List Hosting Environment Detector Responses. + * Description for List Hosting Environment Detector Responses. + * + 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<DetectorResponseInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listHostingEnvironmentDetectorResponsesSinglePageAsync(final String resourceGroupName, final String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listHostingEnvironmentDetectorResponses(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listHostingEnvironmentDetectorResponsesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listHostingEnvironmentDetectorResponsesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Hosting Environment Detector Response. + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name + * @param detectorName Detector Resource Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DetectorResponseInner object if successful. + */ + public DetectorResponseInner getHostingEnvironmentDetectorResponse(String resourceGroupName, String name, String detectorName) { + return getHostingEnvironmentDetectorResponseWithServiceResponseAsync(resourceGroupName, name, detectorName).toBlocking().single().body(); + } + + /** + * Get Hosting Environment Detector Response. + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name + * @param detectorName Detector 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 getHostingEnvironmentDetectorResponseAsync(String resourceGroupName, String name, String detectorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getHostingEnvironmentDetectorResponseWithServiceResponseAsync(resourceGroupName, name, detectorName), serviceCallback); + } + + /** + * Get Hosting Environment Detector Response. + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name + * @param detectorName Detector Resource Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DetectorResponseInner object + */ + public Observable getHostingEnvironmentDetectorResponseAsync(String resourceGroupName, String name, String detectorName) { + return getHostingEnvironmentDetectorResponseWithServiceResponseAsync(resourceGroupName, name, detectorName).map(new Func1, DetectorResponseInner>() { + @Override + public DetectorResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get Hosting Environment Detector Response. + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name + * @param detectorName Detector Resource Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DetectorResponseInner object + */ + public Observable> getHostingEnvironmentDetectorResponseWithServiceResponseAsync(String resourceGroupName, String name, String detectorName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final DateTime startTime = null; + final DateTime endTime = null; + final String timeGrain = null; + return service.getHostingEnvironmentDetectorResponse(resourceGroupName, name, detectorName, this.client.subscriptionId(), startTime, endTime, timeGrain, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getHostingEnvironmentDetectorResponseDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get Hosting Environment Detector Response. + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name + * @param detectorName Detector Resource Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DetectorResponseInner object if successful. + */ + public DetectorResponseInner getHostingEnvironmentDetectorResponse(String resourceGroupName, String name, String detectorName, DateTime startTime, DateTime endTime, String timeGrain) { + return getHostingEnvironmentDetectorResponseWithServiceResponseAsync(resourceGroupName, name, detectorName, startTime, endTime, timeGrain).toBlocking().single().body(); + } + + /** + * Get Hosting Environment Detector Response. + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name + * @param detectorName Detector 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 getHostingEnvironmentDetectorResponseAsync(String resourceGroupName, String name, String detectorName, DateTime startTime, DateTime endTime, String timeGrain, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getHostingEnvironmentDetectorResponseWithServiceResponseAsync(resourceGroupName, name, detectorName, startTime, endTime, timeGrain), serviceCallback); + } + + /** + * Get Hosting Environment Detector Response. + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name + * @param detectorName Detector 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 DetectorResponseInner object + */ + public Observable getHostingEnvironmentDetectorResponseAsync(String resourceGroupName, String name, String detectorName, DateTime startTime, DateTime endTime, String timeGrain) { + return getHostingEnvironmentDetectorResponseWithServiceResponseAsync(resourceGroupName, name, detectorName, startTime, endTime, timeGrain).map(new Func1, DetectorResponseInner>() { + @Override + public DetectorResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get Hosting Environment Detector Response. + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name + * @param detectorName Detector 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 DetectorResponseInner object + */ + public Observable> getHostingEnvironmentDetectorResponseWithServiceResponseAsync(String resourceGroupName, String name, String detectorName, DateTime startTime, DateTime endTime, String timeGrain) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getHostingEnvironmentDetectorResponse(resourceGroupName, name, detectorName, this.client.subscriptionId(), startTime, endTime, timeGrain, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getHostingEnvironmentDetectorResponseDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getHostingEnvironmentDetectorResponseDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DetectorResponseInner> object if successful. + */ + public PagedList listSiteDetectorResponses(final String resourceGroupName, final String siteName) { + ServiceResponse> response = listSiteDetectorResponsesSinglePageAsync(resourceGroupName, siteName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteDetectorResponsesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @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> listSiteDetectorResponsesAsync(final String resourceGroupName, final String siteName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteDetectorResponsesSinglePageAsync(resourceGroupName, siteName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteDetectorResponsesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @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<DetectorResponseInner> object + */ + public Observable> listSiteDetectorResponsesAsync(final String resourceGroupName, final String siteName) { + return listSiteDetectorResponsesWithServiceResponseAsync(resourceGroupName, siteName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @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<DetectorResponseInner> object + */ + public Observable>> listSiteDetectorResponsesWithServiceResponseAsync(final String resourceGroupName, final String siteName) { + return listSiteDetectorResponsesSinglePageAsync(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(listSiteDetectorResponsesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + 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<DetectorResponseInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteDetectorResponsesSinglePageAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSiteDetectorResponses(resourceGroupName, siteName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteDetectorResponsesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteDetectorResponsesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DetectorResponseInner object if successful. + */ + public DetectorResponseInner getSiteDetectorResponse(String resourceGroupName, String siteName, String detectorName) { + return getSiteDetectorResponseWithServiceResponseAsync(resourceGroupName, siteName, detectorName).toBlocking().single().body(); + } + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector 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 getSiteDetectorResponseAsync(String resourceGroupName, String siteName, String detectorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSiteDetectorResponseWithServiceResponseAsync(resourceGroupName, siteName, detectorName), serviceCallback); + } + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DetectorResponseInner object + */ + public Observable getSiteDetectorResponseAsync(String resourceGroupName, String siteName, String detectorName) { + return getSiteDetectorResponseWithServiceResponseAsync(resourceGroupName, siteName, detectorName).map(new Func1, DetectorResponseInner>() { + @Override + public DetectorResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DetectorResponseInner object + */ + public Observable> getSiteDetectorResponseWithServiceResponseAsync(String resourceGroupName, String siteName, 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 (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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final DateTime startTime = null; + final DateTime endTime = null; + final String timeGrain = null; + return service.getSiteDetectorResponse(resourceGroupName, siteName, detectorName, this.client.subscriptionId(), startTime, endTime, timeGrain, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteDetectorResponseDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param startTime Start Time + * @param endTime End Time + * @param timeGrain Time Grain + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DetectorResponseInner object if successful. + */ + public DetectorResponseInner getSiteDetectorResponse(String resourceGroupName, String siteName, String detectorName, DateTime startTime, DateTime endTime, String timeGrain) { + return getSiteDetectorResponseWithServiceResponseAsync(resourceGroupName, siteName, detectorName, startTime, endTime, timeGrain).toBlocking().single().body(); + } + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector 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 getSiteDetectorResponseAsync(String resourceGroupName, String siteName, String detectorName, DateTime startTime, DateTime endTime, String timeGrain, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSiteDetectorResponseWithServiceResponseAsync(resourceGroupName, siteName, detectorName, startTime, endTime, timeGrain), serviceCallback); + } + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector 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 DetectorResponseInner object + */ + public Observable getSiteDetectorResponseAsync(String resourceGroupName, String siteName, String detectorName, DateTime startTime, DateTime endTime, String timeGrain) { + return getSiteDetectorResponseWithServiceResponseAsync(resourceGroupName, siteName, detectorName, startTime, endTime, timeGrain).map(new Func1, DetectorResponseInner>() { + @Override + public DetectorResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector 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 DetectorResponseInner object + */ + public Observable> getSiteDetectorResponseWithServiceResponseAsync(String resourceGroupName, String siteName, String detectorName, 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 (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSiteDetectorResponse(resourceGroupName, siteName, detectorName, this.client.subscriptionId(), startTime, endTime, timeGrain, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteDetectorResponseDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSiteDetectorResponseDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Diagnostics Categories. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSiteDiagnosticCategories(resourceGroupName, siteName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteDiagnosticCategoriesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteDiagnosticCategoriesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Diagnostics Category. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSiteDiagnosticCategory(resourceGroupName, siteName, diagnosticCategory, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteDiagnosticCategoryDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSiteDiagnosticCategoryDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Site Analyses. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSiteAnalyses(resourceGroupName, siteName, diagnosticCategory, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteAnalysesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteAnalysesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Site Analysis. + * Description for 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AnalysisDefinitionInner object if successful. + */ + public AnalysisDefinitionInner getSiteAnalysis(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + return getSiteAnalysisWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName).toBlocking().single().body(); + } + + /** + * Get Site Analysis. + * Description for 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. + * Description for 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 AnalysisDefinitionInner object + */ + public Observable getSiteAnalysisAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + return getSiteAnalysisWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName).map(new Func1, AnalysisDefinitionInner>() { + @Override + public AnalysisDefinitionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get Site Analysis. + * Description for 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 AnalysisDefinitionInner 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analysisName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteAnalysisDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSiteAnalysisDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Execute Analysis. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + 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, this.client.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.executeSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analysisName, this.client.subscriptionId(), startTime, endTime, timeGrain, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Detectors. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSiteDetectors(resourceGroupName, siteName, diagnosticCategory, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteDetectorsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteDetectorsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Detector. + * Description for 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DetectorDefinitionInner object if successful. + */ + public DetectorDefinitionInner getSiteDetector(String resourceGroupName, String siteName, String diagnosticCategory, String detectorName) { + return getSiteDetectorWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, detectorName).toBlocking().single().body(); + } + + /** + * Get Detector. + * Description for 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(String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSiteDetectorWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, detectorName), serviceCallback); + } + + /** + * Get Detector. + * Description for 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 DetectorDefinitionInner object + */ + public Observable getSiteDetectorAsync(String resourceGroupName, String siteName, String diagnosticCategory, String detectorName) { + return getSiteDetectorWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, detectorName).map(new Func1, DetectorDefinitionInner>() { + @Override + public DetectorDefinitionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get Detector. + * Description for 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 DetectorDefinitionInner object + */ + public Observable> getSiteDetectorWithServiceResponseAsync(String resourceGroupName, String siteName, String diagnosticCategory, 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSiteDetector(resourceGroupName, siteName, diagnosticCategory, detectorName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteDetectorDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSiteDetectorDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Execute Detector. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + 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, this.client.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.executeSiteDetector(resourceGroupName, siteName, detectorName, diagnosticCategory, this.client.subscriptionId(), startTime, endTime, timeGrain, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DetectorResponseInner> object if successful. + */ + public PagedList listSiteDetectorResponsesSlot(final String resourceGroupName, final String siteName, final String slot) { + ServiceResponse> response = listSiteDetectorResponsesSlotSinglePageAsync(resourceGroupName, siteName, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteDetectorResponsesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @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> listSiteDetectorResponsesSlotAsync(final String resourceGroupName, final String siteName, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteDetectorResponsesSlotSinglePageAsync(resourceGroupName, siteName, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteDetectorResponsesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @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<DetectorResponseInner> object + */ + public Observable> listSiteDetectorResponsesSlotAsync(final String resourceGroupName, final String siteName, final String slot) { + return listSiteDetectorResponsesSlotWithServiceResponseAsync(resourceGroupName, siteName, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @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<DetectorResponseInner> object + */ + public Observable>> listSiteDetectorResponsesSlotWithServiceResponseAsync(final String resourceGroupName, final String siteName, final String slot) { + return listSiteDetectorResponsesSlotSinglePageAsync(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(listSiteDetectorResponsesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + 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<DetectorResponseInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteDetectorResponsesSlotSinglePageAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSiteDetectorResponsesSlot(resourceGroupName, siteName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteDetectorResponsesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteDetectorResponsesSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DetectorResponseInner object if successful. + */ + public DetectorResponseInner getSiteDetectorResponseSlot(String resourceGroupName, String siteName, String detectorName, String slot) { + return getSiteDetectorResponseSlotWithServiceResponseAsync(resourceGroupName, siteName, detectorName, slot).toBlocking().single().body(); + } + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector 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 getSiteDetectorResponseSlotAsync(String resourceGroupName, String siteName, String detectorName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSiteDetectorResponseSlotWithServiceResponseAsync(resourceGroupName, siteName, detectorName, slot), serviceCallback); + } + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DetectorResponseInner object + */ + public Observable getSiteDetectorResponseSlotAsync(String resourceGroupName, String siteName, String detectorName, String slot) { + return getSiteDetectorResponseSlotWithServiceResponseAsync(resourceGroupName, siteName, detectorName, slot).map(new Func1, DetectorResponseInner>() { + @Override + public DetectorResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector Resource Name + * @param slot Slot Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DetectorResponseInner object + */ + public Observable> getSiteDetectorResponseSlotWithServiceResponseAsync(String resourceGroupName, String siteName, String detectorName, 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 (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final DateTime startTime = null; + final DateTime endTime = null; + final String timeGrain = null; + return service.getSiteDetectorResponseSlot(resourceGroupName, siteName, detectorName, slot, this.client.subscriptionId(), startTime, endTime, timeGrain, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteDetectorResponseSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DetectorResponseInner object if successful. + */ + public DetectorResponseInner getSiteDetectorResponseSlot(String resourceGroupName, String siteName, String detectorName, String slot, DateTime startTime, DateTime endTime, String timeGrain) { + return getSiteDetectorResponseSlotWithServiceResponseAsync(resourceGroupName, siteName, detectorName, slot, startTime, endTime, timeGrain).toBlocking().single().body(); + } + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector 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 getSiteDetectorResponseSlotAsync(String resourceGroupName, String siteName, String detectorName, String slot, DateTime startTime, DateTime endTime, String timeGrain, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSiteDetectorResponseSlotWithServiceResponseAsync(resourceGroupName, siteName, detectorName, slot, startTime, endTime, timeGrain), serviceCallback); + } + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector 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 DetectorResponseInner object + */ + public Observable getSiteDetectorResponseSlotAsync(String resourceGroupName, String siteName, String detectorName, String slot, DateTime startTime, DateTime endTime, String timeGrain) { + return getSiteDetectorResponseSlotWithServiceResponseAsync(resourceGroupName, siteName, detectorName, slot, startTime, endTime, timeGrain).map(new Func1, DetectorResponseInner>() { + @Override + public DetectorResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get site detector response. + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name + * @param detectorName Detector 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 DetectorResponseInner object + */ + public Observable> getSiteDetectorResponseSlotWithServiceResponseAsync(String resourceGroupName, String siteName, String detectorName, 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 (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSiteDetectorResponseSlot(resourceGroupName, siteName, detectorName, slot, this.client.subscriptionId(), startTime, endTime, timeGrain, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteDetectorResponseSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSiteDetectorResponseSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Diagnostics Categories. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSiteDiagnosticCategoriesSlot(resourceGroupName, siteName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteDiagnosticCategoriesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteDiagnosticCategoriesSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Diagnostics Category. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSiteDiagnosticCategorySlot(resourceGroupName, siteName, diagnosticCategory, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteDiagnosticCategorySlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSiteDiagnosticCategorySlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Site Analyses. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSiteAnalysesSlot(resourceGroupName, siteName, diagnosticCategory, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteAnalysesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteAnalysesSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Site Analysis. + * Description for 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AnalysisDefinitionInner object if successful. + */ + public AnalysisDefinitionInner getSiteAnalysisSlot(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + return getSiteAnalysisSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot).toBlocking().single().body(); + } + + /** + * Get Site Analysis. + * Description for 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. + * Description for 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 AnalysisDefinitionInner object + */ + public Observable getSiteAnalysisSlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + return getSiteAnalysisSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot).map(new Func1, AnalysisDefinitionInner>() { + @Override + public AnalysisDefinitionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get Site Analysis. + * Description for 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 AnalysisDefinitionInner 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, analysisName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteAnalysisSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSiteAnalysisSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Execute Analysis. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + 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, this.client.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.executeSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, analysisName, slot, this.client.subscriptionId(), startTime, endTime, timeGrain, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Detectors. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSiteDetectorsSlot(resourceGroupName, siteName, diagnosticCategory, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteDetectorsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteDetectorsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Detector. + * Description for 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DetectorDefinitionInner object if successful. + */ + public DetectorDefinitionInner getSiteDetectorSlot(String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, String slot) { + return getSiteDetectorSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, slot).toBlocking().single().body(); + } + + /** + * Get Detector. + * Description for 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(String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSiteDetectorSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, slot), serviceCallback); + } + + /** + * Get Detector. + * Description for 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 DetectorDefinitionInner object + */ + public Observable getSiteDetectorSlotAsync(String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, String slot) { + return getSiteDetectorSlotWithServiceResponseAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, slot).map(new Func1, DetectorDefinitionInner>() { + @Override + public DetectorDefinitionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get Detector. + * Description for 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 DetectorDefinitionInner object + */ + public Observable> getSiteDetectorSlotWithServiceResponseAsync(String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSiteDetectorSlot(resourceGroupName, siteName, diagnosticCategory, detectorName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteDetectorSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSiteDetectorSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Execute Detector. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + 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, this.client.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.executeSiteDetectorSlot(resourceGroupName, siteName, detectorName, diagnosticCategory, slot, this.client.subscriptionId(), startTime, endTime, timeGrain, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List Hosting Environment Detector Responses. + * Description for List Hosting Environment Detector Responses. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DetectorResponseInner> object if successful. + */ + public PagedList listHostingEnvironmentDetectorResponsesNext(final String nextPageLink) { + ServiceResponse> response = listHostingEnvironmentDetectorResponsesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listHostingEnvironmentDetectorResponsesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List Hosting Environment Detector Responses. + * Description for List Hosting Environment Detector Responses. + * + * @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> listHostingEnvironmentDetectorResponsesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listHostingEnvironmentDetectorResponsesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listHostingEnvironmentDetectorResponsesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List Hosting Environment Detector Responses. + * Description for List Hosting Environment Detector Responses. + * + * @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<DetectorResponseInner> object + */ + public Observable> listHostingEnvironmentDetectorResponsesNextAsync(final String nextPageLink) { + return listHostingEnvironmentDetectorResponsesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List Hosting Environment Detector Responses. + * Description for List Hosting Environment Detector Responses. + * + * @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<DetectorResponseInner> object + */ + public Observable>> listHostingEnvironmentDetectorResponsesNextWithServiceResponseAsync(final String nextPageLink) { + return listHostingEnvironmentDetectorResponsesNextSinglePageAsync(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(listHostingEnvironmentDetectorResponsesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List Hosting Environment Detector Responses. + * Description for List Hosting Environment Detector Responses. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DetectorResponseInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listHostingEnvironmentDetectorResponsesNextSinglePageAsync(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.listHostingEnvironmentDetectorResponsesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listHostingEnvironmentDetectorResponsesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listHostingEnvironmentDetectorResponsesNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DetectorResponseInner> object if successful. + */ + public PagedList listSiteDetectorResponsesNext(final String nextPageLink) { + ServiceResponse> response = listSiteDetectorResponsesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteDetectorResponsesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @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> listSiteDetectorResponsesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteDetectorResponsesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteDetectorResponsesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @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<DetectorResponseInner> object + */ + public Observable> listSiteDetectorResponsesNextAsync(final String nextPageLink) { + return listSiteDetectorResponsesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @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<DetectorResponseInner> object + */ + public Observable>> listSiteDetectorResponsesNextWithServiceResponseAsync(final String nextPageLink) { + return listSiteDetectorResponsesNextSinglePageAsync(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(listSiteDetectorResponsesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DetectorResponseInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteDetectorResponsesNextSinglePageAsync(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.listSiteDetectorResponsesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteDetectorResponsesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteDetectorResponsesNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Diagnostics Categories. + * Description for Get Diagnostics Categories. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Site Analyses. + * Description for Get Site Analyses. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Detectors. + * Description for Get Detectors. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DetectorResponseInner> object if successful. + */ + public PagedList listSiteDetectorResponsesSlotNext(final String nextPageLink) { + ServiceResponse> response = listSiteDetectorResponsesSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteDetectorResponsesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @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> listSiteDetectorResponsesSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteDetectorResponsesSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteDetectorResponsesSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @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<DetectorResponseInner> object + */ + public Observable> listSiteDetectorResponsesSlotNextAsync(final String nextPageLink) { + return listSiteDetectorResponsesSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + * @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<DetectorResponseInner> object + */ + public Observable>> listSiteDetectorResponsesSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listSiteDetectorResponsesSlotNextSinglePageAsync(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(listSiteDetectorResponsesSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List Site Detector Responses. + * Description for List Site Detector Responses. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DetectorResponseInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSiteDetectorResponsesSlotNextSinglePageAsync(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.listSiteDetectorResponsesSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteDetectorResponsesSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteDetectorResponsesSlotNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Diagnostics Categories. + * Description for Get Diagnostics Categories. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Site Analyses. + * Description for Get Site Analyses. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get Detectors. + * Description for Get Detectors. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainAvailabilityCheckResultImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainAvailabilityCheckResultImpl.java new file mode 100644 index 0000000000000..1a505bf1f1580 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainAvailabilityCheckResultImpl.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.DomainAvailabilityCheckResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.DomainType; + +class DomainAvailabilityCheckResultImpl extends WrapperImpl implements DomainAvailabilityCheckResult { + private final CertificateRegistrationManager manager; + DomainAvailabilityCheckResultImpl(DomainAvailabilityCheckResultInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Boolean available() { + return this.inner().available(); + } + + @Override + public DomainType domainType() { + return this.inner().domainType(); + } + + @Override + public String name() { + return this.inner().name(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainAvailabilityCheckResultInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainAvailabilityCheckResultInner.java new file mode 100644 index 0000000000000..4e73cadee0c4a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainAvailabilityCheckResultInner.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.DomainType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Domain availability check result. + */ +public class DomainAvailabilityCheckResultInner { + /** + * 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 name of the domain. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the domain. + * + * @param name the name value to set + * @return the DomainAvailabilityCheckResultInner object itself. + */ + public DomainAvailabilityCheckResultInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get <code>true</code> if domain can be purchased using CreateDomain API; otherwise, <code>false</code>. + * + * @return the available value + */ + public Boolean available() { + return this.available; + } + + /** + * Set <code>true</code> if domain can be purchased using CreateDomain API; otherwise, <code>false</code>. + * + * @param available the available value to set + * @return the DomainAvailabilityCheckResultInner object itself. + */ + public DomainAvailabilityCheckResultInner withAvailable(Boolean available) { + this.available = available; + return this; + } + + /** + * Get 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'. + * + * @return the domainType value + */ + public DomainType domainType() { + return this.domainType; + } + + /** + * Set 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'. + * + * @param domainType the domainType value to set + * @return the DomainAvailabilityCheckResultInner object itself. + */ + public DomainAvailabilityCheckResultInner withDomainType(DomainType domainType) { + this.domainType = domainType; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainControlCenterSsoRequestImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainControlCenterSsoRequestImpl.java new file mode 100644 index 0000000000000..6c4f733326656 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainControlCenterSsoRequestImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.DomainControlCenterSsoRequest; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class DomainControlCenterSsoRequestImpl extends WrapperImpl implements DomainControlCenterSsoRequest { + private final CertificateRegistrationManager manager; + DomainControlCenterSsoRequestImpl(DomainControlCenterSsoRequestInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String postParameterKey() { + return this.inner().postParameterKey(); + } + + @Override + public String postParameterValue() { + return this.inner().postParameterValue(); + } + + @Override + public String url() { + return this.inner().url(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainControlCenterSsoRequestInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainControlCenterSsoRequestInner.java new file mode 100644 index 0000000000000..af8d36fd4bcf3 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.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 uRL where the single sign-on request is to be made. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Get post parameter key. + * + * @return the postParameterKey value + */ + public String postParameterKey() { + return this.postParameterKey; + } + + /** + * Get post parameter value. Client should use 'application/x-www-form-urlencoded' encoding for this value. + * + * @return the postParameterValue value + */ + public String postParameterValue() { + return this.postParameterValue; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainImpl.java new file mode 100644 index 0000000000000..33affe5b1faf2 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainImpl.java @@ -0,0 +1,280 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.Domain; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.DomainPatchResource; +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.Contact; +import com.microsoft.azure.management.appservice.v2019_08_01.DomainStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.ProvisioningState; +import com.microsoft.azure.management.appservice.v2019_08_01.HostName; +import com.microsoft.azure.management.appservice.v2019_08_01.DomainPurchaseConsent; +import com.microsoft.azure.management.appservice.v2019_08_01.DnsType; +import rx.functions.Func1; + +class DomainImpl extends GroupableResourceCoreImpl implements Domain, Domain.Definition, Domain.Update { + private DomainPatchResource updateParameter; + DomainImpl(String name, DomainInner inner, CertificateRegistrationManager manager) { + super(name, inner, manager); + this.updateParameter = new DomainPatchResource(); + } + + @Override + public Observable createResourceAsync() { + DomainsInner client = this.manager().inner().domains(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(new Func1() { + @Override + public DomainInner call(DomainInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + DomainsInner client = this.manager().inner().domains(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter) + .map(new Func1() { + @Override + public DomainInner call(DomainInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + DomainsInner client = this.manager().inner().domains(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.updateParameter = new DomainPatchResource(); + } + + @Override + public String authCode() { + return this.inner().authCode(); + } + + @Override + public Boolean autoRenew() { + return this.inner().autoRenew(); + } + + @Override + public DomainPurchaseConsent consent() { + return this.inner().consent(); + } + + @Override + public Contact contactAdmin() { + return this.inner().contactAdmin(); + } + + @Override + public Contact contactBilling() { + return this.inner().contactBilling(); + } + + @Override + public Contact contactRegistrant() { + return this.inner().contactRegistrant(); + } + + @Override + public Contact contactTech() { + return this.inner().contactTech(); + } + + @Override + public DateTime createdTime() { + return this.inner().createdTime(); + } + + @Override + public DnsType dnsType() { + return this.inner().dnsType(); + } + + @Override + public String dnsZoneId() { + return this.inner().dnsZoneId(); + } + + @Override + public List domainNotRenewableReasons() { + return this.inner().domainNotRenewableReasons(); + } + + @Override + public DateTime expirationTime() { + return this.inner().expirationTime(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public DateTime lastRenewedTime() { + return this.inner().lastRenewedTime(); + } + + @Override + public List managedHostNames() { + return this.inner().managedHostNames(); + } + + @Override + public List nameServers() { + return this.inner().nameServers(); + } + + @Override + public Boolean privacy() { + return this.inner().privacy(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public Boolean readyForDnsRecordManagement() { + return this.inner().readyForDnsRecordManagement(); + } + + @Override + public DomainStatus registrationStatus() { + return this.inner().registrationStatus(); + } + + @Override + public DnsType targetDnsType() { + return this.inner().targetDnsType(); + } + + @Override + public DomainImpl withConsent(DomainPurchaseConsent consent) { + this.inner().withConsent(consent); + return this; + } + + @Override + public DomainImpl withContactAdmin(Contact contactAdmin) { + this.inner().withContactAdmin(contactAdmin); + return this; + } + + @Override + public DomainImpl withContactBilling(Contact contactBilling) { + this.inner().withContactBilling(contactBilling); + return this; + } + + @Override + public DomainImpl withContactRegistrant(Contact contactRegistrant) { + this.inner().withContactRegistrant(contactRegistrant); + return this; + } + + @Override + public DomainImpl withContactTech(Contact contactTech) { + this.inner().withContactTech(contactTech); + return this; + } + + @Override + public DomainImpl withAuthCode(String authCode) { + if (isInCreateMode()) { + this.inner().withAuthCode(authCode); + } else { + this.updateParameter.withAuthCode(authCode); + } + return this; + } + + @Override + public DomainImpl withAutoRenew(Boolean autoRenew) { + if (isInCreateMode()) { + this.inner().withAutoRenew(autoRenew); + } else { + this.updateParameter.withAutoRenew(autoRenew); + } + return this; + } + + @Override + public DomainImpl withDnsType(DnsType dnsType) { + if (isInCreateMode()) { + this.inner().withDnsType(dnsType); + } else { + this.updateParameter.withDnsType(dnsType); + } + return this; + } + + @Override + public DomainImpl withDnsZoneId(String dnsZoneId) { + if (isInCreateMode()) { + this.inner().withDnsZoneId(dnsZoneId); + } else { + this.updateParameter.withDnsZoneId(dnsZoneId); + } + return this; + } + + @Override + public DomainImpl withKind(String kind) { + if (isInCreateMode()) { + this.inner().withKind(kind); + } else { + this.updateParameter.withKind(kind); + } + return this; + } + + @Override + public DomainImpl withPrivacy(Boolean privacy) { + if (isInCreateMode()) { + this.inner().withPrivacy(privacy); + } else { + this.updateParameter.withPrivacy(privacy); + } + return this; + } + + @Override + public DomainImpl withTargetDnsType(DnsType targetDnsType) { + if (isInCreateMode()) { + this.inner().withTargetDnsType(targetDnsType); + } else { + this.updateParameter.withTargetDnsType(targetDnsType); + } + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainInner.java new file mode 100644 index 0000000000000..bd9943fccf930 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainInner.java @@ -0,0 +1,489 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.Contact; +import com.microsoft.azure.management.appservice.v2019_08_01.DomainStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.ProvisioningState; +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.HostName; +import com.microsoft.azure.management.appservice.v2019_08_01.DomainPurchaseConsent; +import com.microsoft.azure.management.appservice.v2019_08_01.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; + + /** + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get administrative contact. + * + * @return the contactAdmin value + */ + public Contact contactAdmin() { + return this.contactAdmin; + } + + /** + * Set administrative contact. + * + * @param contactAdmin the contactAdmin value to set + * @return the DomainInner object itself. + */ + public DomainInner withContactAdmin(Contact contactAdmin) { + this.contactAdmin = contactAdmin; + return this; + } + + /** + * Get billing contact. + * + * @return the contactBilling value + */ + public Contact contactBilling() { + return this.contactBilling; + } + + /** + * Set billing contact. + * + * @param contactBilling the contactBilling value to set + * @return the DomainInner object itself. + */ + public DomainInner withContactBilling(Contact contactBilling) { + this.contactBilling = contactBilling; + return this; + } + + /** + * Get registrant contact. + * + * @return the contactRegistrant value + */ + public Contact contactRegistrant() { + return this.contactRegistrant; + } + + /** + * Set registrant contact. + * + * @param contactRegistrant the contactRegistrant value to set + * @return the DomainInner object itself. + */ + public DomainInner withContactRegistrant(Contact contactRegistrant) { + this.contactRegistrant = contactRegistrant; + return this; + } + + /** + * Get technical contact. + * + * @return the contactTech value + */ + public Contact contactTech() { + return this.contactTech; + } + + /** + * Set technical contact. + * + * @param contactTech the contactTech value to set + * @return the DomainInner object itself. + */ + public DomainInner withContactTech(Contact contactTech) { + this.contactTech = contactTech; + return this; + } + + /** + * Get 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'. + * + * @return the registrationStatus value + */ + public DomainStatus registrationStatus() { + return this.registrationStatus; + } + + /** + * Get domain provisioning state. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get name servers. + * + * @return the nameServers value + */ + public List nameServers() { + return this.nameServers; + } + + /** + * Get <code>true</code> if domain privacy is enabled for this domain; otherwise, <code>false</code>. + * + * @return the privacy value + */ + public Boolean privacy() { + return this.privacy; + } + + /** + * Set <code>true</code> if domain privacy is enabled for this domain; otherwise, <code>false</code>. + * + * @param privacy the privacy value to set + * @return the DomainInner object itself. + */ + public DomainInner withPrivacy(Boolean privacy) { + this.privacy = privacy; + return this; + } + + /** + * Get domain creation timestamp. + * + * @return the createdTime value + */ + public DateTime createdTime() { + return this.createdTime; + } + + /** + * Get domain expiration timestamp. + * + * @return the expirationTime value + */ + public DateTime expirationTime() { + return this.expirationTime; + } + + /** + * Get timestamp when the domain was renewed last time. + * + * @return the lastRenewedTime value + */ + public DateTime lastRenewedTime() { + return this.lastRenewedTime; + } + + /** + * Get <code>true</code> if the domain should be automatically renewed; otherwise, <code>false</code>. + * + * @return the autoRenew value + */ + public Boolean autoRenew() { + return this.autoRenew; + } + + /** + * Set <code>true</code> if the domain should be automatically renewed; otherwise, <code>false</code>. + * + * @param autoRenew the autoRenew value to set + * @return the DomainInner object itself. + */ + public DomainInner withAutoRenew(Boolean autoRenew) { + this.autoRenew = autoRenew; + return this; + } + + /** + * Get <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. + * + * @return the readyForDnsRecordManagement value + */ + public Boolean readyForDnsRecordManagement() { + return this.readyForDnsRecordManagement; + } + + /** + * Get all hostnames derived from the domain and assigned to Azure resources. + * + * @return the managedHostNames value + */ + public List managedHostNames() { + return this.managedHostNames; + } + + /** + * Get legal agreement consent. + * + * @return the consent value + */ + public DomainPurchaseConsent consent() { + return this.consent; + } + + /** + * Set legal agreement consent. + * + * @param consent the consent value to set + * @return the DomainInner object itself. + */ + public DomainInner withConsent(DomainPurchaseConsent consent) { + this.consent = consent; + return this; + } + + /** + * Get reasons why domain is not renewable. + * + * @return the domainNotRenewableReasons value + */ + public List domainNotRenewableReasons() { + return this.domainNotRenewableReasons; + } + + /** + * Get current DNS type. Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns'. + * + * @return the dnsType value + */ + public DnsType dnsType() { + return this.dnsType; + } + + /** + * Set current DNS type. Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns'. + * + * @param dnsType the dnsType value to set + * @return the DomainInner object itself. + */ + public DomainInner withDnsType(DnsType dnsType) { + this.dnsType = dnsType; + return this; + } + + /** + * Get azure DNS Zone to use. + * + * @return the dnsZoneId value + */ + public String dnsZoneId() { + return this.dnsZoneId; + } + + /** + * Set azure DNS Zone to use. + * + * @param dnsZoneId the dnsZoneId value to set + * @return the DomainInner object itself. + */ + public DomainInner withDnsZoneId(String dnsZoneId) { + this.dnsZoneId = dnsZoneId; + return this; + } + + /** + * Get target DNS type (would be used for migration). Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns'. + * + * @return the targetDnsType value + */ + public DnsType targetDnsType() { + return this.targetDnsType; + } + + /** + * Set target DNS type (would be used for migration). Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns'. + * + * @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; + } + + /** + * Get kind of resource. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Set kind of resource. + * + * @param kind the kind value to set + * @return the DomainInner object itself. + */ + public DomainInner withKind(String kind) { + this.kind = kind; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainOwnershipIdentifierImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainOwnershipIdentifierImpl.java new file mode 100644 index 0000000000000..eb700d8e9c377 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainOwnershipIdentifierImpl.java @@ -0,0 +1,116 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.DomainOwnershipIdentifier; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; + +class DomainOwnershipIdentifierImpl extends CreatableUpdatableImpl implements DomainOwnershipIdentifier, DomainOwnershipIdentifier.Definition, DomainOwnershipIdentifier.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String domainName; + private String name; + + DomainOwnershipIdentifierImpl(String name, CertificateRegistrationManager manager) { + super(name, new DomainOwnershipIdentifierInner()); + this.manager = manager; + // Set resource name + this.name = name; + // + } + + DomainOwnershipIdentifierImpl(DomainOwnershipIdentifierInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.name = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.domainName = IdParsingUtils.getValueFromIdByName(inner.id(), "domains"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "domainOwnershipIdentifiers"); + // + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + DomainsInner client = this.manager().inner().domains(); + return client.createOrUpdateOwnershipIdentifierAsync(this.resourceGroupName, this.domainName, this.name, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + DomainsInner client = this.manager().inner().domains(); + return client.updateOwnershipIdentifierAsync(this.resourceGroupName, this.domainName, this.name, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + DomainsInner client = this.manager().inner().domains(); + return client.getOwnershipIdentifierAsync(this.resourceGroupName, this.domainName, this.name); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String ownershipId() { + return this.inner().ownershipId(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public DomainOwnershipIdentifierImpl withExistingDomain(String resourceGroupName, String domainName) { + this.resourceGroupName = resourceGroupName; + this.domainName = domainName; + return this; + } + + @Override + public DomainOwnershipIdentifierImpl withKind(String kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public DomainOwnershipIdentifierImpl withOwnershipId(String ownershipId) { + this.inner().withOwnershipId(ownershipId); + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainOwnershipIdentifierInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainOwnershipIdentifierInner.java new file mode 100644 index 0000000000000..e324d5d9431ac --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Domain ownership Identifier. + */ +@JsonFlatten +public class DomainOwnershipIdentifierInner extends ProxyOnlyResource { + /** + * Ownership Id. + */ + @JsonProperty(value = "properties.ownershipId") + private String ownershipId; + + /** + * Get ownership Id. + * + * @return the ownershipId value + */ + public String ownershipId() { + return this.ownershipId; + } + + /** + * Set ownership Id. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainRegistrationProvidersImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainRegistrationProvidersImpl.java new file mode 100644 index 0000000000000..683a0dfc6cb17 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainRegistrationProvidersImpl.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. + * abc + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.DomainRegistrationProviders; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.appservice.v2019_08_01.CsmOperationDescription; + +class DomainRegistrationProvidersImpl extends WrapperImpl implements DomainRegistrationProviders { + private final CertificateRegistrationManager manager; + + DomainRegistrationProvidersImpl(CertificateRegistrationManager manager) { + super(manager.inner().domainRegistrationProviders()); + this.manager = manager; + } + + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable listOperationsAsync() { + DomainRegistrationProvidersInner client = this.inner(); + return client.listOperationsAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public CsmOperationDescription call(CsmOperationDescriptionInner inner) { + return new CsmOperationDescriptionImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainRegistrationProvidersInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainRegistrationProvidersInner.java new file mode 100644 index 0000000000000..2097a5e9fef59 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainRegistrationProvidersInner.java @@ -0,0 +1,293 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.appservice.v2019_08_01.DefaultErrorResponseException; +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.appservice.v2019_08_01.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.appservice.v2019_08_01.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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listOperations(this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Implements Csm operations Api to exposes the list of available Csm Apis under the resource provider. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainsImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainsImpl.java new file mode 100644 index 0000000000000..7304996a62a19 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainsImpl.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.Domains; +import com.microsoft.azure.management.appservice.v2019_08_01.Domain; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.appservice.v2019_08_01.DomainAvailabilityCheckResult; +import com.microsoft.azure.management.appservice.v2019_08_01.DomainControlCenterSsoRequest; +import com.microsoft.azure.management.appservice.v2019_08_01.NameIdentifier; +import com.microsoft.azure.management.appservice.v2019_08_01.DomainRecommendationSearchParameters; +import com.microsoft.azure.management.appservice.v2019_08_01.DomainOwnershipIdentifier; + +class DomainsImpl extends GroupableResourcesCoreImpl implements Domains { + protected DomainsImpl(CertificateRegistrationManager manager) { + super(manager.inner().domains(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + DomainsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + DomainsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + DomainsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + DomainsInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Domain call(DomainInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + DomainsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + DomainsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Domain call(DomainInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public DomainImpl define(String name) { + return wrapModel(name); + } + + @Override + public Completable renewAsync(String resourceGroupName, String domainName) { + DomainsInner client = this.inner(); + return client.renewAsync(resourceGroupName, domainName).toCompletable(); + } + + @Override + public Observable checkAvailabilityAsync() { + DomainsInner client = this.inner(); + return client.checkAvailabilityAsync() + .map(new Func1() { + @Override + public DomainAvailabilityCheckResult call(DomainAvailabilityCheckResultInner inner) { + return new DomainAvailabilityCheckResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable getControlCenterSsoRequestAsync() { + DomainsInner client = this.inner(); + return client.getControlCenterSsoRequestAsync() + .map(new Func1() { + @Override + public DomainControlCenterSsoRequest call(DomainControlCenterSsoRequestInner inner) { + return new DomainControlCenterSsoRequestImpl(inner, manager()); + } + }); + } + + @Override + public Observable listRecommendationsAsync(final DomainRecommendationSearchParameters parameters) { + DomainsInner client = this.inner(); + return client.listRecommendationsAsync(parameters) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public NameIdentifier call(NameIdentifierInner inner) { + return new NameIdentifierImpl(inner, manager()); + } + }); + } + + @Override + protected DomainImpl wrapModel(DomainInner inner) { + return new DomainImpl(inner.name(), inner, manager()); + } + + @Override + protected DomainImpl wrapModel(String name) { + return new DomainImpl(name, new DomainInner(), this.manager()); + } + + @Override + public DomainOwnershipIdentifierImpl defineDomainOwnershipIdentifier(String name) { + return wrapDomainOwnershipIdentifierModel(name); + } + + private DomainOwnershipIdentifierImpl wrapDomainOwnershipIdentifierModel(String name) { + return new DomainOwnershipIdentifierImpl(name, this.manager()); + } + + private DomainOwnershipIdentifierImpl wrapDomainOwnershipIdentifierModel(DomainOwnershipIdentifierInner inner) { + return new DomainOwnershipIdentifierImpl(inner, manager()); + } + + private Observable getDomainOwnershipIdentifierInnerUsingDomainsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String domainName = IdParsingUtils.getValueFromIdByName(id, "domains"); + String name = IdParsingUtils.getValueFromIdByName(id, "domainOwnershipIdentifiers"); + DomainsInner client = this.inner(); + return client.getOwnershipIdentifierAsync(resourceGroupName, domainName, name); + } + + @Override + public Observable getOwnershipIdentifierAsync(String resourceGroupName, String domainName, String name) { + DomainsInner client = this.inner(); + return client.getOwnershipIdentifierAsync(resourceGroupName, domainName, name) + .flatMap(new Func1>() { + @Override + public Observable call(DomainOwnershipIdentifierInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DomainOwnershipIdentifier)wrapDomainOwnershipIdentifierModel(inner)); + } + } + }); + } + + @Override + public Observable listOwnershipIdentifiersAsync(final String resourceGroupName, final String domainName) { + DomainsInner client = this.inner(); + return client.listOwnershipIdentifiersAsync(resourceGroupName, domainName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public DomainOwnershipIdentifier call(DomainOwnershipIdentifierInner inner) { + return wrapDomainOwnershipIdentifierModel(inner); + } + }); + } + + @Override + public Completable deleteOwnershipIdentifierAsync(String resourceGroupName, String domainName, String name) { + DomainsInner client = this.inner(); + return client.deleteOwnershipIdentifierAsync(resourceGroupName, domainName, name).toCompletable(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainsInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainsInner.java new file mode 100644 index 0000000000000..8431c028f2346 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DomainsInner.java @@ -0,0 +1,2369 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.appservice.v2019_08_01.DefaultErrorResponseException; +import com.microsoft.azure.management.appservice.v2019_08_01.DomainPatchResource; +import com.microsoft.azure.management.appservice.v2019_08_01.DomainRecommendationSearchParameters; +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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.Domains listRecommendations" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations") + Observable> listRecommendations(@Path("subscriptionId") String subscriptionId, @Body DomainRecommendationSearchParameters 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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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 DomainPatchResource 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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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. + * Description for Check if a domain is available for registration. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DomainAvailabilityCheckResultInner object if successful. + */ + public DomainAvailabilityCheckResultInner checkAvailability() { + return checkAvailabilityWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Check if a domain is available for registration. + * Description for 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. + * Description for Check if a domain is available for registration. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainAvailabilityCheckResultInner object + */ + public Observable checkAvailabilityAsync() { + return checkAvailabilityWithServiceResponseAsync().map(new Func1, DomainAvailabilityCheckResultInner>() { + @Override + public DomainAvailabilityCheckResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Check if a domain is available for registration. + * Description for Check if a domain is available for registration. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DomainAvailabilityCheckResultInner object + */ + public Observable> checkAvailabilityWithServiceResponseAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String name = null; + NameIdentifierInner identifier = new NameIdentifierInner(); + identifier.withName(null); + return service.checkAvailability(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), identifier, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Check if a domain is available for registration. + * Description for Check if a domain is available for registration. + * + * @param name Name of the object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DomainAvailabilityCheckResultInner object if successful. + */ + public DomainAvailabilityCheckResultInner checkAvailability(String name) { + return checkAvailabilityWithServiceResponseAsync(name).toBlocking().single().body(); + } + + /** + * Check if a domain is available for registration. + * Description for 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. + * Description for 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 DomainAvailabilityCheckResultInner object + */ + public Observable checkAvailabilityAsync(String name) { + return checkAvailabilityWithServiceResponseAsync(name).map(new Func1, DomainAvailabilityCheckResultInner>() { + @Override + public DomainAvailabilityCheckResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Check if a domain is available for registration. + * Description for 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 DomainAvailabilityCheckResultInner object + */ + public Observable> checkAvailabilityWithServiceResponseAsync(String name) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + NameIdentifierInner identifier = new NameIdentifierInner(); + identifier.withName(name); + return service.checkAvailability(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), identifier, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkAvailabilityDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all domains in a subscription. + * Description for Get all domains in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Generate a single sign-on request for the domain management portal. + * Description for Generate a single sign-on request for the domain management portal. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getControlCenterSsoRequest(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getControlCenterSsoRequestDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getControlCenterSsoRequestDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get domain name recommendations based on keywords. + * Description for Get domain name recommendations based on keywords. + * + * @param parameters Search parameters for domain name recommendations. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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 DomainRecommendationSearchParameters 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. + * Description for 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 DomainRecommendationSearchParameters 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. + * Description for 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 DomainRecommendationSearchParameters parameters) { + return listRecommendationsWithServiceResponseAsync(parameters) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get domain name recommendations based on keywords. + * Description for 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 DomainRecommendationSearchParameters 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. + * Description for 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 DomainRecommendationSearchParameters parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.listRecommendations(this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRecommendationsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRecommendationsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all domains in a resource group. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a domain. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(resourceGroupName, domainName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates or updates a domain. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(domain); + Observable> observable = service.createOrUpdate(resourceGroupName, domainName, this.client.subscriptionId(), domain, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates or updates a domain. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(domain); + return service.beginCreateOrUpdate(resourceGroupName, domainName, this.client.subscriptionId(), domain, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a domain. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean forceHardDeleteDomain = null; + return service.delete(resourceGroupName, domainName, this.client.subscriptionId(), forceHardDeleteDomain, this.client.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(resourceGroupName, domainName, this.client.subscriptionId(), forceHardDeleteDomain, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates or updates a domain. + * Description for 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 DefaultErrorResponseException 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, DomainPatchResource domain) { + return updateWithServiceResponseAsync(resourceGroupName, domainName, domain).toBlocking().single().body(); + } + + /** + * Creates or updates a domain. + * Description for 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, DomainPatchResource domain, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, domainName, domain), serviceCallback); + } + + /** + * Creates or updates a domain. + * Description for 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, DomainPatchResource domain) { + return updateWithServiceResponseAsync(resourceGroupName, domainName, domain).map(new Func1, DomainInner>() { + @Override + public DomainInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a domain. + * Description for 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, DomainPatchResource 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(domain); + return service.update(resourceGroupName, domainName, this.client.subscriptionId(), domain, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Lists domain ownership identifiers. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listOwnershipIdentifiers(resourceGroupName, domainName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get ownership identifier for domain. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getOwnershipIdentifier(resourceGroupName, domainName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getOwnershipIdentifierDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getOwnershipIdentifierDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(domainOwnershipIdentifier); + return service.createOrUpdateOwnershipIdentifier(resourceGroupName, domainName, name, this.client.subscriptionId(), domainOwnershipIdentifier, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete ownership identifier for domain. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteOwnershipIdentifier(resourceGroupName, domainName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteOwnershipIdentifierDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteOwnershipIdentifierDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(domainOwnershipIdentifier); + return service.updateOwnershipIdentifier(resourceGroupName, domainName, name, this.client.subscriptionId(), domainOwnershipIdentifier, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Renew a domain. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.renew(resourceGroupName, domainName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = renewDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse renewDelegate(Response response) throws DefaultErrorResponseException, 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(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all domains in a subscription. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get domain name recommendations based on keywords. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all domains in a resource group. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Lists domain ownership identifiers. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/FunctionEnvelopeImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/FunctionEnvelopeImpl.java new file mode 100644 index 0000000000000..9f832a64d7e63 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/FunctionEnvelopeImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.FunctionEnvelope; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.Map; + +class FunctionEnvelopeImpl extends CreatableUpdatableImpl implements FunctionEnvelope, FunctionEnvelope.Definition, FunctionEnvelope.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String functionName; + + FunctionEnvelopeImpl(String name, CertificateRegistrationManager manager) { + super(name, new FunctionEnvelopeInner()); + this.manager = manager; + // Set resource name + this.functionName = name; + // + } + + FunctionEnvelopeImpl(FunctionEnvelopeInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.functionName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.functionName = IdParsingUtils.getValueFromIdByName(inner.id(), "functions"); + // + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.createFunctionAsync(this.resourceGroupName, this.name, this.functionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.createFunctionAsync(this.resourceGroupName, this.name, this.functionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getFunctionAsync(this.resourceGroupName, this.name, this.functionName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public Object config() { + return this.inner().config(); + } + + @Override + public String configHref() { + return this.inner().configHref(); + } + + @Override + public Map files() { + return this.inner().files(); + } + + @Override + public String functionAppId() { + return this.inner().functionAppId(); + } + + @Override + public String href() { + return this.inner().href(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String invokeUrlTemplate() { + return this.inner().invokeUrlTemplate(); + } + + @Override + public Boolean isDisabled() { + return this.inner().isDisabled(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String language() { + return this.inner().language(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String scriptHref() { + return this.inner().scriptHref(); + } + + @Override + public String scriptRootPathHref() { + return this.inner().scriptRootPathHref(); + } + + @Override + public String secretsFileHref() { + return this.inner().secretsFileHref(); + } + + @Override + public String testData() { + return this.inner().testData(); + } + + @Override + public String testDataHref() { + return this.inner().testDataHref(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public FunctionEnvelopeImpl withExistingSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + @Override + public FunctionEnvelopeImpl withConfig(Object config) { + this.inner().withConfig(config); + return this; + } + + @Override + public FunctionEnvelopeImpl withConfigHref(String configHref) { + this.inner().withConfigHref(configHref); + return this; + } + + @Override + public FunctionEnvelopeImpl withFiles(Map files) { + this.inner().withFiles(files); + return this; + } + + @Override + public FunctionEnvelopeImpl withFunctionAppId(String functionAppId) { + this.inner().withFunctionAppId(functionAppId); + return this; + } + + @Override + public FunctionEnvelopeImpl withHref(String href) { + this.inner().withHref(href); + return this; + } + + @Override + public FunctionEnvelopeImpl withInvokeUrlTemplate(String invokeUrlTemplate) { + this.inner().withInvokeUrlTemplate(invokeUrlTemplate); + return this; + } + + @Override + public FunctionEnvelopeImpl withIsDisabled(Boolean isDisabled) { + this.inner().withIsDisabled(isDisabled); + return this; + } + + @Override + public FunctionEnvelopeImpl withKind(String kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public FunctionEnvelopeImpl withLanguage(String language) { + this.inner().withLanguage(language); + return this; + } + + @Override + public FunctionEnvelopeImpl withScriptHref(String scriptHref) { + this.inner().withScriptHref(scriptHref); + return this; + } + + @Override + public FunctionEnvelopeImpl withScriptRootPathHref(String scriptRootPathHref) { + this.inner().withScriptRootPathHref(scriptRootPathHref); + return this; + } + + @Override + public FunctionEnvelopeImpl withSecretsFileHref(String secretsFileHref) { + this.inner().withSecretsFileHref(secretsFileHref); + return this; + } + + @Override + public FunctionEnvelopeImpl withTestData(String testData) { + this.inner().withTestData(testData); + return this; + } + + @Override + public FunctionEnvelopeImpl withTestDataHref(String testDataHref) { + this.inner().withTestDataHref(testDataHref); + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/FunctionEnvelopeInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/FunctionEnvelopeInner.java new file mode 100644 index 0000000000000..a4836e6937820 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/FunctionEnvelopeInner.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.appservice.v2019_08_01.implementation; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Function information. + */ +@JsonFlatten +public class FunctionEnvelopeInner extends ProxyOnlyResource { + /** + * Function App ID. + */ + @JsonProperty(value = "properties.function_app_id") + private String functionAppId; + + /** + * Script root path URI. + */ + @JsonProperty(value = "properties.script_root_path_href") + private String scriptRootPathHref; + + /** + * Script URI. + */ + @JsonProperty(value = "properties.script_href") + private String scriptHref; + + /** + * Config URI. + */ + @JsonProperty(value = "properties.config_href") + private String configHref; + + /** + * Test data URI. + */ + @JsonProperty(value = "properties.test_data_href") + private String testDataHref; + + /** + * Secrets file URI. + */ + @JsonProperty(value = "properties.secrets_file_href") + 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.test_data") + private String testData; + + /** + * The invocation URL. + */ + @JsonProperty(value = "properties.invoke_url_template") + private String invokeUrlTemplate; + + /** + * The function language. + */ + @JsonProperty(value = "properties.language") + private String language; + + /** + * Gets or sets a value indicating whether the function is disabled. + */ + @JsonProperty(value = "properties.isDisabled") + private Boolean isDisabled; + + /** + * Get function App ID. + * + * @return the functionAppId value + */ + public String functionAppId() { + return this.functionAppId; + } + + /** + * Set function App ID. + * + * @param functionAppId the functionAppId value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withFunctionAppId(String functionAppId) { + this.functionAppId = functionAppId; + return this; + } + + /** + * Get script root path URI. + * + * @return the scriptRootPathHref value + */ + public String scriptRootPathHref() { + return this.scriptRootPathHref; + } + + /** + * Set script root path URI. + * + * @param scriptRootPathHref the scriptRootPathHref value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withScriptRootPathHref(String scriptRootPathHref) { + this.scriptRootPathHref = scriptRootPathHref; + return this; + } + + /** + * Get script URI. + * + * @return the scriptHref value + */ + public String scriptHref() { + return this.scriptHref; + } + + /** + * Set script URI. + * + * @param scriptHref the scriptHref value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withScriptHref(String scriptHref) { + this.scriptHref = scriptHref; + return this; + } + + /** + * Get config URI. + * + * @return the configHref value + */ + public String configHref() { + return this.configHref; + } + + /** + * Set config URI. + * + * @param configHref the configHref value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withConfigHref(String configHref) { + this.configHref = configHref; + return this; + } + + /** + * Get test data URI. + * + * @return the testDataHref value + */ + public String testDataHref() { + return this.testDataHref; + } + + /** + * Set test data URI. + * + * @param testDataHref the testDataHref value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withTestDataHref(String testDataHref) { + this.testDataHref = testDataHref; + return this; + } + + /** + * Get secrets file URI. + * + * @return the secretsFileHref value + */ + public String secretsFileHref() { + return this.secretsFileHref; + } + + /** + * Set secrets file URI. + * + * @param secretsFileHref the secretsFileHref value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withSecretsFileHref(String secretsFileHref) { + this.secretsFileHref = secretsFileHref; + return this; + } + + /** + * Get function URI. + * + * @return the href value + */ + public String href() { + return this.href; + } + + /** + * Set function URI. + * + * @param href the href value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withHref(String href) { + this.href = href; + return this; + } + + /** + * Get config information. + * + * @return the config value + */ + public Object config() { + return this.config; + } + + /** + * Set config information. + * + * @param config the config value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withConfig(Object config) { + this.config = config; + return this; + } + + /** + * Get file list. + * + * @return the files value + */ + public Map files() { + return this.files; + } + + /** + * Set file list. + * + * @param files the files value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withFiles(Map files) { + this.files = files; + return this; + } + + /** + * Get test data used when testing via the Azure Portal. + * + * @return the testData value + */ + public String testData() { + return this.testData; + } + + /** + * Set test data used when testing via the Azure Portal. + * + * @param testData the testData value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withTestData(String testData) { + this.testData = testData; + return this; + } + + /** + * Get the invocation URL. + * + * @return the invokeUrlTemplate value + */ + public String invokeUrlTemplate() { + return this.invokeUrlTemplate; + } + + /** + * Set the invocation URL. + * + * @param invokeUrlTemplate the invokeUrlTemplate value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withInvokeUrlTemplate(String invokeUrlTemplate) { + this.invokeUrlTemplate = invokeUrlTemplate; + return this; + } + + /** + * Get the function language. + * + * @return the language value + */ + public String language() { + return this.language; + } + + /** + * Set the function language. + * + * @param language the language value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withLanguage(String language) { + this.language = language; + return this; + } + + /** + * Get gets or sets a value indicating whether the function is disabled. + * + * @return the isDisabled value + */ + public Boolean isDisabled() { + return this.isDisabled; + } + + /** + * Set gets or sets a value indicating whether the function is disabled. + * + * @param isDisabled the isDisabled value to set + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withIsDisabled(Boolean isDisabled) { + this.isDisabled = isDisabled; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/FunctionSecretsImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/FunctionSecretsImpl.java new file mode 100644 index 0000000000000..def4b8b71bc57 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/FunctionSecretsImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.FunctionSecrets; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class FunctionSecretsImpl extends WrapperImpl implements FunctionSecrets { + private final CertificateRegistrationManager manager; + FunctionSecretsImpl(FunctionSecretsInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String keyVal() { + return this.inner().key(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String triggerUrl() { + return this.inner().triggerUrl(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/FunctionSecretsInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/FunctionSecretsInner.java new file mode 100644 index 0000000000000..8b727f3010729 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Function secrets. + */ +@JsonFlatten +public class FunctionSecretsInner extends ProxyOnlyResource { + /** + * Secret key. + */ + @JsonProperty(value = "properties.key") + private String key; + + /** + * Trigger URL. + */ + @JsonProperty(value = "properties.trigger_url") + private String triggerUrl; + + /** + * Get secret key. + * + * @return the key value + */ + public String key() { + return this.key; + } + + /** + * Set secret key. + * + * @param key the key value to set + * @return the FunctionSecretsInner object itself. + */ + public FunctionSecretsInner withKey(String key) { + this.key = key; + return this; + } + + /** + * Get trigger URL. + * + * @return the triggerUrl value + */ + public String triggerUrl() { + return this.triggerUrl; + } + + /** + * Set trigger URL. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/GeoRegionInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/GeoRegionInner.java new file mode 100644 index 0000000000000..a5b8a76c44a87 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Geographical region. + */ +@JsonFlatten +public class GeoRegionInner extends ProxyOnlyResource { + /** + * 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; + + /** + * Display name for region. + */ + @JsonProperty(value = "properties.orgDomain", access = JsonProperty.Access.WRITE_ONLY) + private String orgDomain; + + /** + * Get region description. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Get display name for region. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Get display name for region. + * + * @return the orgDomain value + */ + public String orgDomain() { + return this.orgDomain; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostKeysImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostKeysImpl.java new file mode 100644 index 0000000000000..f8ec1bfdbe731 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostKeysImpl.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.HostKeys; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.Map; + +class HostKeysImpl extends WrapperImpl implements HostKeys { + private final CertificateRegistrationManager manager; + HostKeysImpl(HostKeysInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Map functionKeys() { + return this.inner().functionKeys(); + } + + @Override + public String masterKey() { + return this.inner().masterKey(); + } + + @Override + public Map systemKeys() { + return this.inner().systemKeys(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostKeysInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostKeysInner.java new file mode 100644 index 0000000000000..add62d1f080a4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostKeysInner.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.appservice.v2019_08_01.implementation; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Functions host level keys. + */ +public class HostKeysInner { + /** + * Secret key. + */ + @JsonProperty(value = "masterKey") + private String masterKey; + + /** + * Host level function keys. + */ + @JsonProperty(value = "functionKeys") + private Map functionKeys; + + /** + * System keys. + */ + @JsonProperty(value = "systemKeys") + private Map systemKeys; + + /** + * Get secret key. + * + * @return the masterKey value + */ + public String masterKey() { + return this.masterKey; + } + + /** + * Set secret key. + * + * @param masterKey the masterKey value to set + * @return the HostKeysInner object itself. + */ + public HostKeysInner withMasterKey(String masterKey) { + this.masterKey = masterKey; + return this; + } + + /** + * Get host level function keys. + * + * @return the functionKeys value + */ + public Map functionKeys() { + return this.functionKeys; + } + + /** + * Set host level function keys. + * + * @param functionKeys the functionKeys value to set + * @return the HostKeysInner object itself. + */ + public HostKeysInner withFunctionKeys(Map functionKeys) { + this.functionKeys = functionKeys; + return this; + } + + /** + * Get system keys. + * + * @return the systemKeys value + */ + public Map systemKeys() { + return this.systemKeys; + } + + /** + * Set system keys. + * + * @param systemKeys the systemKeys value to set + * @return the HostKeysInner object itself. + */ + public HostKeysInner withSystemKeys(Map systemKeys) { + this.systemKeys = systemKeys; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostNameBindingImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostNameBindingImpl.java new file mode 100644 index 0000000000000..c7514f34307b6 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostNameBindingImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.HostNameBinding; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.AzureResourceType; +import com.microsoft.azure.management.appservice.v2019_08_01.CustomHostNameDnsRecordType; +import com.microsoft.azure.management.appservice.v2019_08_01.HostNameType; +import com.microsoft.azure.management.appservice.v2019_08_01.SslState; + +class HostNameBindingImpl extends CreatableUpdatableImpl implements HostNameBinding, HostNameBinding.Definition, HostNameBinding.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String hostName; + + HostNameBindingImpl(String name, CertificateRegistrationManager manager) { + super(name, new HostNameBindingInner()); + this.manager = manager; + // Set resource name + this.hostName = name; + // + } + + HostNameBindingImpl(HostNameBindingInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.hostName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.hostName = IdParsingUtils.getValueFromIdByName(inner.id(), "hostNameBindings"); + // + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.createOrUpdateHostNameBindingAsync(this.resourceGroupName, this.name, this.hostName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.createOrUpdateHostNameBindingAsync(this.resourceGroupName, this.name, this.hostName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getHostNameBindingAsync(this.resourceGroupName, this.name, this.hostName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String azureResourceName() { + return this.inner().azureResourceName(); + } + + @Override + public AzureResourceType azureResourceType() { + return this.inner().azureResourceType(); + } + + @Override + public CustomHostNameDnsRecordType customHostNameDnsRecordType() { + return this.inner().customHostNameDnsRecordType(); + } + + @Override + public String domainId() { + return this.inner().domainId(); + } + + @Override + public HostNameType hostNameType() { + return this.inner().hostNameType(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String siteName() { + return this.inner().siteName(); + } + + @Override + public SslState sslState() { + return this.inner().sslState(); + } + + @Override + public String thumbprint() { + return this.inner().thumbprint(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String virtualIP() { + return this.inner().virtualIP(); + } + + @Override + public HostNameBindingImpl withExistingSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + @Override + public HostNameBindingImpl withAzureResourceName(String azureResourceName) { + this.inner().withAzureResourceName(azureResourceName); + return this; + } + + @Override + public HostNameBindingImpl withAzureResourceType(AzureResourceType azureResourceType) { + this.inner().withAzureResourceType(azureResourceType); + return this; + } + + @Override + public HostNameBindingImpl withCustomHostNameDnsRecordType(CustomHostNameDnsRecordType customHostNameDnsRecordType) { + this.inner().withCustomHostNameDnsRecordType(customHostNameDnsRecordType); + return this; + } + + @Override + public HostNameBindingImpl withDomainId(String domainId) { + this.inner().withDomainId(domainId); + return this; + } + + @Override + public HostNameBindingImpl withHostNameType(HostNameType hostNameType) { + this.inner().withHostNameType(hostNameType); + return this; + } + + @Override + public HostNameBindingImpl withKind(String kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public HostNameBindingImpl withSiteName(String siteName) { + this.inner().withSiteName(siteName); + return this; + } + + @Override + public HostNameBindingImpl withSslState(SslState sslState) { + this.inner().withSslState(sslState); + return this; + } + + @Override + public HostNameBindingImpl withThumbprint(String thumbprint) { + this.inner().withThumbprint(thumbprint); + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostNameBindingInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostNameBindingInner.java new file mode 100644 index 0000000000000..d2103ec90ee2d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.AzureResourceType; +import com.microsoft.azure.management.appservice.v2019_08_01.CustomHostNameDnsRecordType; +import com.microsoft.azure.management.appservice.v2019_08_01.HostNameType; +import com.microsoft.azure.management.appservice.v2019_08_01.SslState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 app Service app name. + * + * @return the siteName value + */ + public String siteName() { + return this.siteName; + } + + /** + * Set app Service app name. + * + * @param siteName the siteName value to set + * @return the HostNameBindingInner object itself. + */ + public HostNameBindingInner withSiteName(String siteName) { + this.siteName = siteName; + return this; + } + + /** + * Get fully qualified ARM domain resource URI. + * + * @return the domainId value + */ + public String domainId() { + return this.domainId; + } + + /** + * Set fully qualified ARM domain resource URI. + * + * @param domainId the domainId value to set + * @return the HostNameBindingInner object itself. + */ + public HostNameBindingInner withDomainId(String domainId) { + this.domainId = domainId; + return this; + } + + /** + * Get azure resource name. + * + * @return the azureResourceName value + */ + public String azureResourceName() { + return this.azureResourceName; + } + + /** + * Set azure resource name. + * + * @param azureResourceName the azureResourceName value to set + * @return the HostNameBindingInner object itself. + */ + public HostNameBindingInner withAzureResourceName(String azureResourceName) { + this.azureResourceName = azureResourceName; + return this; + } + + /** + * Get azure resource type. Possible values include: 'Website', 'TrafficManager'. + * + * @return the azureResourceType value + */ + public AzureResourceType azureResourceType() { + return this.azureResourceType; + } + + /** + * Set azure resource type. Possible values include: 'Website', 'TrafficManager'. + * + * @param azureResourceType the azureResourceType value to set + * @return the HostNameBindingInner object itself. + */ + public HostNameBindingInner withAzureResourceType(AzureResourceType azureResourceType) { + this.azureResourceType = azureResourceType; + return this; + } + + /** + * Get custom DNS record type. Possible values include: 'CName', 'A'. + * + * @return the customHostNameDnsRecordType value + */ + public CustomHostNameDnsRecordType customHostNameDnsRecordType() { + return this.customHostNameDnsRecordType; + } + + /** + * Set custom DNS record type. Possible values include: 'CName', 'A'. + * + * @param customHostNameDnsRecordType the customHostNameDnsRecordType value to set + * @return the HostNameBindingInner object itself. + */ + public HostNameBindingInner withCustomHostNameDnsRecordType(CustomHostNameDnsRecordType customHostNameDnsRecordType) { + this.customHostNameDnsRecordType = customHostNameDnsRecordType; + return this; + } + + /** + * Get hostname type. Possible values include: 'Verified', 'Managed'. + * + * @return the hostNameType value + */ + public HostNameType hostNameType() { + return this.hostNameType; + } + + /** + * Set hostname type. Possible values include: 'Verified', 'Managed'. + * + * @param hostNameType the hostNameType value to set + * @return the HostNameBindingInner object itself. + */ + public HostNameBindingInner withHostNameType(HostNameType hostNameType) { + this.hostNameType = hostNameType; + return this; + } + + /** + * Get sSL type. Possible values include: 'Disabled', 'SniEnabled', 'IpBasedEnabled'. + * + * @return the sslState value + */ + public SslState sslState() { + return this.sslState; + } + + /** + * Set sSL type. Possible values include: 'Disabled', 'SniEnabled', 'IpBasedEnabled'. + * + * @param sslState the sslState value to set + * @return the HostNameBindingInner object itself. + */ + public HostNameBindingInner withSslState(SslState sslState) { + this.sslState = sslState; + return this; + } + + /** + * Get sSL certificate thumbprint. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Set sSL certificate thumbprint. + * + * @param thumbprint the thumbprint value to set + * @return the HostNameBindingInner object itself. + */ + public HostNameBindingInner withThumbprint(String thumbprint) { + this.thumbprint = thumbprint; + return this; + } + + /** + * Get virtual IP address assigned to the hostname if IP based SSL is enabled. + * + * @return the virtualIP value + */ + public String virtualIP() { + return this.virtualIP; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostingEnvironmentAppServicePlanImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostingEnvironmentAppServicePlanImpl.java new file mode 100644 index 0000000000000..84fa97068a661 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostingEnvironmentAppServicePlanImpl.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentAppServicePlan; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentProfile; +import com.microsoft.azure.management.appservice.v2019_08_01.ProvisioningState; +import com.microsoft.azure.management.appservice.v2019_08_01.SkuDescription; +import com.microsoft.azure.management.appservice.v2019_08_01.StatusOptions; +import java.util.Map; + +class HostingEnvironmentAppServicePlanImpl extends WrapperImpl implements HostingEnvironmentAppServicePlan { + private final CertificateRegistrationManager manager; + + HostingEnvironmentAppServicePlanImpl(AppServicePlanInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public DateTime freeOfferExpirationTime() { + return this.inner().freeOfferExpirationTime(); + } + + @Override + public String geoRegion() { + return this.inner().geoRegion(); + } + + @Override + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.inner().hostingEnvironmentProfile(); + } + + @Override + public Boolean hyperV() { + return this.inner().hyperV(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Boolean isSpot() { + return this.inner().isSpot(); + } + + @Override + public Boolean isXenon() { + return this.inner().isXenon(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public Integer maximumElasticWorkerCount() { + return this.inner().maximumElasticWorkerCount(); + } + + @Override + public Integer maximumNumberOfWorkers() { + return this.inner().maximumNumberOfWorkers(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Integer numberOfSites() { + return this.inner().numberOfSites(); + } + + @Override + public Boolean perSiteScaling() { + return this.inner().perSiteScaling(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public Boolean reserved() { + return this.inner().reserved(); + } + + @Override + public String resourceGroup() { + return this.inner().resourceGroup(); + } + + @Override + public SkuDescription sku() { + return this.inner().sku(); + } + + @Override + public DateTime spotExpirationTime() { + return this.inner().spotExpirationTime(); + } + + @Override + public StatusOptions status() { + return this.inner().status(); + } + + @Override + public String subscription() { + return this.inner().subscription(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public Integer targetWorkerCount() { + return this.inner().targetWorkerCount(); + } + + @Override + public Integer targetWorkerSizeId() { + return this.inner().targetWorkerSizeId(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String workerTierName() { + return this.inner().workerTierName(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostingEnvironmentDiagnosticsImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostingEnvironmentDiagnosticsImpl.java new file mode 100644 index 0000000000000..4d5e7829ee110 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostingEnvironmentDiagnosticsImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentDiagnostics; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class HostingEnvironmentDiagnosticsImpl extends WrapperImpl implements HostingEnvironmentDiagnostics { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String diagnosticsName; + + HostingEnvironmentDiagnosticsImpl(HostingEnvironmentDiagnosticsInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public String diagnosticsOutput() { + return this.inner().diagnosticsOutput(); + } + + @Override + public String name() { + return this.inner().name(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostingEnvironmentDiagnosticsInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostingEnvironmentDiagnosticsInner.java new file mode 100644 index 0000000000000..0053cdf1942ae --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.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 = "diagnosticsOutput") + private String diagnosticsOutput; + + /** + * Get name/identifier of the diagnostics. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name/identifier of the diagnostics. + * + * @param name the name value to set + * @return the HostingEnvironmentDiagnosticsInner object itself. + */ + public HostingEnvironmentDiagnosticsInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get diagnostics output. + * + * @return the diagnosticsOutput value + */ + public String diagnosticsOutput() { + return this.diagnosticsOutput; + } + + /** + * Set diagnostics output. + * + * @param diagnosticsOutput the diagnosticsOutput value to set + * @return the HostingEnvironmentDiagnosticsInner object itself. + */ + public HostingEnvironmentDiagnosticsInner withDiagnosticsOutput(String diagnosticsOutput) { + this.diagnosticsOutput = diagnosticsOutput; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostingEnvironmentSiteImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostingEnvironmentSiteImpl.java new file mode 100644 index 0000000000000..29c7fea0f2451 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HostingEnvironmentSiteImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentSite; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteAvailabilityState; +import com.microsoft.azure.management.appservice.v2019_08_01.CloningInfo; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentProfile; +import com.microsoft.azure.management.appservice.v2019_08_01.HostNameSslState; +import com.microsoft.azure.management.appservice.v2019_08_01.ManagedServiceIdentity; +import java.util.UUID; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.RedundancyMode; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteConfig; +import com.microsoft.azure.management.appservice.v2019_08_01.SlotSwapStatus; +import java.util.Map; +import com.microsoft.azure.management.appservice.v2019_08_01.UsageState; + +class HostingEnvironmentSiteImpl extends WrapperImpl implements HostingEnvironmentSite { + private final CertificateRegistrationManager manager; + + HostingEnvironmentSiteImpl(SiteInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public SiteAvailabilityState availabilityState() { + return this.inner().availabilityState(); + } + + @Override + public Boolean clientAffinityEnabled() { + return this.inner().clientAffinityEnabled(); + } + + @Override + public Boolean clientCertEnabled() { + return this.inner().clientCertEnabled(); + } + + @Override + public String clientCertExclusionPaths() { + return this.inner().clientCertExclusionPaths(); + } + + @Override + public CloningInfo cloningInfo() { + return this.inner().cloningInfo(); + } + + @Override + public Integer containerSize() { + return this.inner().containerSize(); + } + + @Override + public Integer dailyMemoryTimeQuota() { + return this.inner().dailyMemoryTimeQuota(); + } + + @Override + public String defaultHostName() { + return this.inner().defaultHostName(); + } + + @Override + public Boolean enabled() { + return this.inner().enabled(); + } + + @Override + public List enabledHostNames() { + return this.inner().enabledHostNames(); + } + + @Override + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.inner().hostingEnvironmentProfile(); + } + + @Override + public List hostNames() { + return this.inner().hostNames(); + } + + @Override + public Boolean hostNamesDisabled() { + return this.inner().hostNamesDisabled(); + } + + @Override + public List hostNameSslStates() { + return this.inner().hostNameSslStates(); + } + + @Override + public Boolean httpsOnly() { + return this.inner().httpsOnly(); + } + + @Override + public Boolean hyperV() { + return this.inner().hyperV(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public ManagedServiceIdentity identity() { + return this.inner().identity(); + } + + @Override + public UUID inProgressOperationId() { + return this.inner().inProgressOperationId(); + } + + @Override + public Boolean isDefaultContainer() { + return this.inner().isDefaultContainer(); + } + + @Override + public Boolean isXenon() { + return this.inner().isXenon(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public DateTime lastModifiedTimeUtc() { + return this.inner().lastModifiedTimeUtc(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public Integer maxNumberOfWorkers() { + return this.inner().maxNumberOfWorkers(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String outboundIpAddresses() { + return this.inner().outboundIpAddresses(); + } + + @Override + public String possibleOutboundIpAddresses() { + return this.inner().possibleOutboundIpAddresses(); + } + + @Override + public RedundancyMode redundancyMode() { + return this.inner().redundancyMode(); + } + + @Override + public String repositorySiteName() { + return this.inner().repositorySiteName(); + } + + @Override + public Boolean reserved() { + return this.inner().reserved(); + } + + @Override + public String resourceGroup() { + return this.inner().resourceGroup(); + } + + @Override + public Boolean scmSiteAlsoStopped() { + return this.inner().scmSiteAlsoStopped(); + } + + @Override + public String serverFarmId() { + return this.inner().serverFarmId(); + } + + @Override + public SiteConfig siteConfig() { + return this.inner().siteConfig(); + } + + @Override + public SlotSwapStatus slotSwapStatus() { + return this.inner().slotSwapStatus(); + } + + @Override + public String state() { + return this.inner().state(); + } + + @Override + public DateTime suspendedTill() { + return this.inner().suspendedTill(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String targetSwapSlot() { + return this.inner().targetSwapSlot(); + } + + @Override + public List trafficManagerHostNames() { + return this.inner().trafficManagerHostNames(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public UsageState usageState() { + return this.inner().usageState(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HybridConnectionImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HybridConnectionImpl.java new file mode 100644 index 0000000000000..1ed98f65fc343 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HybridConnectionImpl.java @@ -0,0 +1,90 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.HybridConnection; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class HybridConnectionImpl extends WrapperImpl implements HybridConnection { + private final CertificateRegistrationManager manager; + + HybridConnectionImpl(HybridConnectionInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public String hostname() { + return this.inner().hostname(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Integer port() { + return this.inner().port(); + } + + @Override + public String relayArmUri() { + return this.inner().relayArmUri(); + } + + @Override + public String relayName() { + return this.inner().relayName(); + } + + @Override + public String sendKeyName() { + return this.inner().sendKeyName(); + } + + @Override + public String sendKeyValue() { + return this.inner().sendKeyValue(); + } + + @Override + public String serviceBusNamespace() { + return this.inner().serviceBusNamespace(); + } + + @Override + public String serviceBusSuffix() { + return this.inner().serviceBusSuffix(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HybridConnectionInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HybridConnectionInner.java new file mode 100644 index 0000000000000..7d82401386c26 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HybridConnectionInner.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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 name of the Service Bus namespace. + * + * @return the serviceBusNamespace value + */ + public String serviceBusNamespace() { + return this.serviceBusNamespace; + } + + /** + * Set the name of the Service Bus namespace. + * + * @param serviceBusNamespace the serviceBusNamespace value to set + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withServiceBusNamespace(String serviceBusNamespace) { + this.serviceBusNamespace = serviceBusNamespace; + return this; + } + + /** + * Get the name of the Service Bus relay. + * + * @return the relayName value + */ + public String relayName() { + return this.relayName; + } + + /** + * Set the name of the Service Bus relay. + * + * @param relayName the relayName value to set + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withRelayName(String relayName) { + this.relayName = relayName; + return this; + } + + /** + * Get the ARM URI to the Service Bus relay. + * + * @return the relayArmUri value + */ + public String relayArmUri() { + return this.relayArmUri; + } + + /** + * Set the ARM URI to the Service Bus relay. + * + * @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 of the endpoint. + * + * @return the hostname value + */ + public String hostname() { + return this.hostname; + } + + /** + * Set the hostname of the endpoint. + * + * @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 of the endpoint. + * + * @return the port value + */ + public Integer port() { + return this.port; + } + + /** + * Set the port of the endpoint. + * + * @param port the port value to set + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Get the name of the Service Bus key which has Send permissions. This is used to authenticate to Service Bus. + * + * @return the sendKeyName value + */ + public String sendKeyName() { + return this.sendKeyName; + } + + /** + * Set the name of the Service Bus key which has Send permissions. This is used to authenticate to Service Bus. + * + * @param sendKeyName the sendKeyName value to set + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withSendKeyName(String sendKeyName) { + this.sendKeyName = sendKeyName; + return this; + } + + /** + * Get 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. + * + * @return the sendKeyValue value + */ + public String sendKeyValue() { + return this.sendKeyValue; + } + + /** + * Set 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. + * + * @param sendKeyValue the sendKeyValue value to set + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withSendKeyValue(String sendKeyValue) { + this.sendKeyValue = sendKeyValue; + return this; + } + + /** + * Get the suffix for the service bus endpoint. By default this is .servicebus.windows.net. + * + * @return the serviceBusSuffix value + */ + public String serviceBusSuffix() { + return this.serviceBusSuffix; + } + + /** + * Set the suffix for the service bus endpoint. By default this is .servicebus.windows.net. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HybridConnectionKeyImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HybridConnectionKeyImpl.java new file mode 100644 index 0000000000000..994071c4e4085 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HybridConnectionKeyImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.HybridConnectionKey; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class HybridConnectionKeyImpl extends WrapperImpl implements HybridConnectionKey { + private final CertificateRegistrationManager manager; + HybridConnectionKeyImpl(HybridConnectionKeyInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String sendKeyName() { + return this.inner().sendKeyName(); + } + + @Override + public String sendKeyValue() { + return this.inner().sendKeyValue(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HybridConnectionKeyInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HybridConnectionKeyInner.java new file mode 100644 index 0000000000000..83f6ed8c41a79 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 name of the send key. + * + * @return the sendKeyName value + */ + public String sendKeyName() { + return this.sendKeyName; + } + + /** + * Get the value of the send key. + * + * @return the sendKeyValue value + */ + public String sendKeyValue() { + return this.sendKeyValue; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HybridConnectionLimitsImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HybridConnectionLimitsImpl.java new file mode 100644 index 0000000000000..d0ac18123868f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HybridConnectionLimitsImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.HybridConnectionLimits; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class HybridConnectionLimitsImpl extends WrapperImpl implements HybridConnectionLimits { + private final CertificateRegistrationManager manager; + HybridConnectionLimitsImpl(HybridConnectionLimitsInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Integer current() { + return this.inner().current(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public Integer maximum() { + return this.inner().maximum(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HybridConnectionLimitsInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/HybridConnectionLimitsInner.java new file mode 100644 index 0000000000000..ebd5ed7e31f25 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 number of Hybrid Connections. + * + * @return the current value + */ + public Integer current() { + return this.current; + } + + /** + * Get the maximum number of Hybrid Connections allowed. + * + * @return the maximum value + */ + public Integer maximum() { + return this.maximum; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/IdParsingUtils.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/IdParsingUtils.java new file mode 100644 index 0000000000000..3f81d95d5dbcb --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/IdentifierImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/IdentifierImpl.java new file mode 100644 index 0000000000000..a72163f3ee2d2 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/IdentifierImpl.java @@ -0,0 +1,116 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.Identifier; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; + +class IdentifierImpl extends CreatableUpdatableImpl implements Identifier, Identifier.Definition, Identifier.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String domainOwnershipIdentifierName; + + IdentifierImpl(String name, CertificateRegistrationManager manager) { + super(name, new IdentifierInner()); + this.manager = manager; + // Set resource name + this.domainOwnershipIdentifierName = name; + // + } + + IdentifierImpl(IdentifierInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.domainOwnershipIdentifierName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.domainOwnershipIdentifierName = IdParsingUtils.getValueFromIdByName(inner.id(), "domainOwnershipIdentifiers"); + // + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.createOrUpdateDomainOwnershipIdentifierAsync(this.resourceGroupName, this.name, this.domainOwnershipIdentifierName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.updateDomainOwnershipIdentifierAsync(this.resourceGroupName, this.name, this.domainOwnershipIdentifierName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getDomainOwnershipIdentifierAsync(this.resourceGroupName, this.name, this.domainOwnershipIdentifierName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String value() { + return this.inner().value(); + } + + @Override + public IdentifierImpl withExistingSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + @Override + public IdentifierImpl withKind(String kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public IdentifierImpl withValue(String value) { + this.inner().withValue(value); + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/IdentifierInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/IdentifierInner.java new file mode 100644 index 0000000000000..2fa44121fc578 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * A domain specific resource identifier. + */ +@JsonFlatten +public class IdentifierInner extends ProxyOnlyResource { + /** + * String representation of the identity. + */ + @JsonProperty(value = "properties.id") + private String value; + + /** + * Get string representation of the identity. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set string representation of the identity. + * + * @param value the value value to set + * @return the IdentifierInner object itself. + */ + public IdentifierInner withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/InboundEnvironmentEndpointImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/InboundEnvironmentEndpointImpl.java new file mode 100644 index 0000000000000..022e44d8f5920 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/InboundEnvironmentEndpointImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.InboundEnvironmentEndpoint; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; + +class InboundEnvironmentEndpointImpl extends WrapperImpl implements InboundEnvironmentEndpoint { + private final CertificateRegistrationManager manager; + + InboundEnvironmentEndpointImpl(InboundEnvironmentEndpointInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public List endpoints() { + return this.inner().endpoints(); + } + + @Override + public List ports() { + return this.inner().ports(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/InboundEnvironmentEndpointInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/InboundEnvironmentEndpointInner.java new file mode 100644 index 0000000000000..3fb1f6792810d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/InboundEnvironmentEndpointInner.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.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The IP Addresses and Ports that require inbound network access to and within + * the subnet of the App Service Environment. + */ +public class InboundEnvironmentEndpointInner { + /** + * Short text describing the purpose of the network traffic. + */ + @JsonProperty(value = "description") + private String description; + + /** + * The IP addresses that network traffic will originate from in cidr + * notation. + */ + @JsonProperty(value = "endpoints") + private List endpoints; + + /** + * The ports that network traffic will arrive to the App Service + * Environment at. + */ + @JsonProperty(value = "ports") + private List ports; + + /** + * Get short text describing the purpose of the network traffic. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set short text describing the purpose of the network traffic. + * + * @param description the description value to set + * @return the InboundEnvironmentEndpointInner object itself. + */ + public InboundEnvironmentEndpointInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the IP addresses that network traffic will originate from in cidr notation. + * + * @return the endpoints value + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Set the IP addresses that network traffic will originate from in cidr notation. + * + * @param endpoints the endpoints value to set + * @return the InboundEnvironmentEndpointInner object itself. + */ + public InboundEnvironmentEndpointInner withEndpoints(List endpoints) { + this.endpoints = endpoints; + return this; + } + + /** + * Get the ports that network traffic will arrive to the App Service Environment at. + * + * @return the ports value + */ + public List ports() { + return this.ports; + } + + /** + * Set the ports that network traffic will arrive to the App Service Environment at. + * + * @param ports the ports value to set + * @return the InboundEnvironmentEndpointInner object itself. + */ + public InboundEnvironmentEndpointInner withPorts(List ports) { + this.ports = ports; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyInfoImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyInfoImpl.java new file mode 100644 index 0000000000000..cf65fbc1d41a4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyInfoImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.KeyInfo; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; + +class KeyInfoImpl extends CreatableUpdatableImpl implements KeyInfo, KeyInfo.Definition { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String functionName; + private String keyName; + + KeyInfoImpl(String name, CertificateRegistrationManager manager) { + super(name, new KeyInfoInner()); + this.manager = manager; + // Set resource name + this.keyName = name; + // + } + + KeyInfoImpl(KeyInfoInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.keyName = inner.name(); + // + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.createOrUpdateFunctionSecretAsync(this.resourceGroupName, this.name, this.functionName, this.keyName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return null; // NOP updateResourceAsync implementation as update is not supported + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + @Override + public boolean isInCreateMode() { + // This is a create-only resource + return true; + } + + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String value() { + return this.inner().value(); + } + + @Override + public KeyInfoImpl withExistingFunction(String resourceGroupName, String name, String functionName) { + this.resourceGroupName = resourceGroupName; + this.name = name; + this.functionName = functionName; + return this; + } + + @Override + public KeyInfoImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public KeyInfoImpl withValue(String value) { + this.inner().withValue(value); + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyInfoInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyInfoInner.java new file mode 100644 index 0000000000000..d1d8e15d0c6b2 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyInfoInner.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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Function key info. + */ +public class KeyInfoInner { + /** + * Key name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Key value. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get key name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set key name. + * + * @param name the name value to set + * @return the KeyInfoInner object itself. + */ + public KeyInfoInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get key value. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set key value. + * + * @param value the value value to set + * @return the KeyInfoInner object itself. + */ + public KeyInfoInner withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyVaultReferenceCollectionImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyVaultReferenceCollectionImpl.java new file mode 100644 index 0000000000000..95d54fad87d60 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyVaultReferenceCollectionImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.KeyVaultReferenceCollection; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.Map; +import com.microsoft.azure.management.appservice.v2019_08_01.ApiKVReference; + +class KeyVaultReferenceCollectionImpl extends WrapperImpl implements KeyVaultReferenceCollection { + private final CertificateRegistrationManager manager; + KeyVaultReferenceCollectionImpl(KeyVaultReferenceCollectionInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Map keyToReferenceStatuses() { + return this.inner().keyToReferenceStatuses(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyVaultReferenceCollectionInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyVaultReferenceCollectionInner.java new file mode 100644 index 0000000000000..037c658702bdb --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyVaultReferenceCollectionInner.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import java.util.Map; +import com.microsoft.azure.management.appservice.v2019_08_01.ApiKVReference; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Web app key vault reference and status ARM resource. + */ +@JsonFlatten +public class KeyVaultReferenceCollectionInner extends ProxyOnlyResource { + /** + * The keyToReferenceStatuses property. + */ + @JsonProperty(value = "properties.keyToReferenceStatuses") + private Map keyToReferenceStatuses; + + /** + * Get the keyToReferenceStatuses value. + * + * @return the keyToReferenceStatuses value + */ + public Map keyToReferenceStatuses() { + return this.keyToReferenceStatuses; + } + + /** + * Set the keyToReferenceStatuses value. + * + * @param keyToReferenceStatuses the keyToReferenceStatuses value to set + * @return the KeyVaultReferenceCollectionInner object itself. + */ + public KeyVaultReferenceCollectionInner withKeyToReferenceStatuses(Map keyToReferenceStatuses) { + this.keyToReferenceStatuses = keyToReferenceStatuses; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyVaultReferenceResourceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyVaultReferenceResourceImpl.java new file mode 100644 index 0000000000000..1a39f2c299caa --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyVaultReferenceResourceImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.KeyVaultReferenceResource; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.ManagedServiceIdentityType; +import com.microsoft.azure.management.appservice.v2019_08_01.ConfigReferenceLocation; +import com.microsoft.azure.management.appservice.v2019_08_01.ConfigReferenceSource; +import com.microsoft.azure.management.appservice.v2019_08_01.ResolveStatus; + +class KeyVaultReferenceResourceImpl extends WrapperImpl implements KeyVaultReferenceResource { + private final CertificateRegistrationManager manager; + KeyVaultReferenceResourceImpl(KeyVaultReferenceResourceInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String details() { + return this.inner().details(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public ManagedServiceIdentityType identityType() { + return this.inner().identityType(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public ConfigReferenceLocation location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String reference() { + return this.inner().reference(); + } + + @Override + public String secretName() { + return this.inner().secretName(); + } + + @Override + public String secretVersion() { + return this.inner().secretVersion(); + } + + @Override + public ConfigReferenceSource source() { + return this.inner().source(); + } + + @Override + public ResolveStatus status() { + return this.inner().status(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String vaultName() { + return this.inner().vaultName(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyVaultReferenceResourceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyVaultReferenceResourceInner.java new file mode 100644 index 0000000000000..9892cb1e107ae --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/KeyVaultReferenceResourceInner.java @@ -0,0 +1,261 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ResolveStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.ManagedServiceIdentityType; +import com.microsoft.azure.management.appservice.v2019_08_01.ConfigReferenceSource; +import com.microsoft.azure.management.appservice.v2019_08_01.ConfigReferenceLocation; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Web app key vault reference and status ARM resource. + */ +@JsonFlatten +public class KeyVaultReferenceResourceInner extends ProxyOnlyResource { + /** + * The reference property. + */ + @JsonProperty(value = "properties.reference") + private String reference; + + /** + * Possible values include: 'Initialized', 'Resolved', 'InvalidSyntax', + * 'MSINotEnabled', 'VaultNotFound', 'SecretNotFound', + * 'SecretVersionNotFound', 'AccessToKeyVaultDenied', 'OtherReasons'. + */ + @JsonProperty(value = "properties.status") + private ResolveStatus status; + + /** + * The vaultName property. + */ + @JsonProperty(value = "properties.vaultName") + private String vaultName; + + /** + * The secretName property. + */ + @JsonProperty(value = "properties.secretName") + private String secretName; + + /** + * The secretVersion property. + */ + @JsonProperty(value = "properties.secretVersion") + private String secretVersion; + + /** + * Possible values include: 'SystemAssigned', 'UserAssigned', + * 'SystemAssigned, UserAssigned', 'None'. + */ + @JsonProperty(value = "properties.identityType") + private ManagedServiceIdentityType identityType; + + /** + * The details property. + */ + @JsonProperty(value = "properties.details") + private String details; + + /** + * Possible values include: 'KeyVault'. + */ + @JsonProperty(value = "properties.source") + private ConfigReferenceSource source; + + /** + * Possible values include: 'ApplicationSetting'. + */ + @JsonProperty(value = "properties.location") + private ConfigReferenceLocation location; + + /** + * Get the reference value. + * + * @return the reference value + */ + public String reference() { + return this.reference; + } + + /** + * Set the reference value. + * + * @param reference the reference value to set + * @return the KeyVaultReferenceResourceInner object itself. + */ + public KeyVaultReferenceResourceInner withReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Get possible values include: 'Initialized', 'Resolved', 'InvalidSyntax', 'MSINotEnabled', 'VaultNotFound', 'SecretNotFound', 'SecretVersionNotFound', 'AccessToKeyVaultDenied', 'OtherReasons'. + * + * @return the status value + */ + public ResolveStatus status() { + return this.status; + } + + /** + * Set possible values include: 'Initialized', 'Resolved', 'InvalidSyntax', 'MSINotEnabled', 'VaultNotFound', 'SecretNotFound', 'SecretVersionNotFound', 'AccessToKeyVaultDenied', 'OtherReasons'. + * + * @param status the status value to set + * @return the KeyVaultReferenceResourceInner object itself. + */ + public KeyVaultReferenceResourceInner withStatus(ResolveStatus status) { + this.status = status; + return this; + } + + /** + * Get the vaultName value. + * + * @return the vaultName value + */ + public String vaultName() { + return this.vaultName; + } + + /** + * Set the vaultName value. + * + * @param vaultName the vaultName value to set + * @return the KeyVaultReferenceResourceInner object itself. + */ + public KeyVaultReferenceResourceInner withVaultName(String vaultName) { + this.vaultName = vaultName; + return this; + } + + /** + * Get the secretName value. + * + * @return the secretName value + */ + public String secretName() { + return this.secretName; + } + + /** + * Set the secretName value. + * + * @param secretName the secretName value to set + * @return the KeyVaultReferenceResourceInner object itself. + */ + public KeyVaultReferenceResourceInner withSecretName(String secretName) { + this.secretName = secretName; + return this; + } + + /** + * Get the secretVersion value. + * + * @return the secretVersion value + */ + public String secretVersion() { + return this.secretVersion; + } + + /** + * Set the secretVersion value. + * + * @param secretVersion the secretVersion value to set + * @return the KeyVaultReferenceResourceInner object itself. + */ + public KeyVaultReferenceResourceInner withSecretVersion(String secretVersion) { + this.secretVersion = secretVersion; + return this; + } + + /** + * Get possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. + * + * @return the identityType value + */ + public ManagedServiceIdentityType identityType() { + return this.identityType; + } + + /** + * Set possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'. + * + * @param identityType the identityType value to set + * @return the KeyVaultReferenceResourceInner object itself. + */ + public KeyVaultReferenceResourceInner withIdentityType(ManagedServiceIdentityType identityType) { + this.identityType = identityType; + 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 KeyVaultReferenceResourceInner object itself. + */ + public KeyVaultReferenceResourceInner withDetails(String details) { + this.details = details; + return this; + } + + /** + * Get possible values include: 'KeyVault'. + * + * @return the source value + */ + public ConfigReferenceSource source() { + return this.source; + } + + /** + * Set possible values include: 'KeyVault'. + * + * @param source the source value to set + * @return the KeyVaultReferenceResourceInner object itself. + */ + public KeyVaultReferenceResourceInner withSource(ConfigReferenceSource source) { + this.source = source; + return this; + } + + /** + * Get possible values include: 'ApplicationSetting'. + * + * @return the location value + */ + public ConfigReferenceLocation location() { + return this.location; + } + + /** + * Set possible values include: 'ApplicationSetting'. + * + * @param location the location value to set + * @return the KeyVaultReferenceResourceInner object itself. + */ + public KeyVaultReferenceResourceInner withLocation(ConfigReferenceLocation location) { + this.location = location; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MSDeployLogImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MSDeployLogImpl.java new file mode 100644 index 0000000000000..8437fa2b28e22 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MSDeployLogImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.MSDeployLog; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.MSDeployLogEntry; + +class MSDeployLogImpl extends WrapperImpl implements MSDeployLog { + private final CertificateRegistrationManager manager; + MSDeployLogImpl(MSDeployLogInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public List entries() { + return this.inner().entries(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MSDeployLogInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MSDeployLogInner.java new file mode 100644 index 0000000000000..50a814a9a1870 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.MSDeployLogEntry; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 list of log entry messages. + * + * @return the entries value + */ + public List entries() { + return this.entries; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MSDeployStatusImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MSDeployStatusImpl.java new file mode 100644 index 0000000000000..9036b51c69b78 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MSDeployStatusImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.MSDeployStatus; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.MSDeployProvisioningState; + +class MSDeployStatusImpl extends WrapperImpl implements MSDeployStatus { + private final CertificateRegistrationManager manager; + MSDeployStatusImpl(MSDeployStatusInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Boolean complete() { + return this.inner().complete(); + } + + @Override + public String deployer() { + return this.inner().deployer(); + } + + @Override + public DateTime endTime() { + return this.inner().endTime(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public MSDeployProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public DateTime startTime() { + return this.inner().startTime(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MSDeployStatusInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MSDeployStatusInner.java new file mode 100644 index 0000000000000..7fc3ed21d2fbe --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.MSDeployProvisioningState; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 username of deployer. + * + * @return the deployer value + */ + public String deployer() { + return this.deployer; + } + + /** + * Get provisioning state. Possible values include: 'accepted', 'running', 'succeeded', 'failed', 'canceled'. + * + * @return the provisioningState value + */ + public MSDeployProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get start time of deploy operation. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Get end time of deploy operation. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Get whether the deployment operation has completed. + * + * @return the complete value + */ + public Boolean complete() { + return this.complete; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MigrateMySqlStatusImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MigrateMySqlStatusImpl.java new file mode 100644 index 0000000000000..a3befe0bef6ab --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MigrateMySqlStatusImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.MigrateMySqlStatus; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.OperationStatus; + +class MigrateMySqlStatusImpl extends WrapperImpl implements MigrateMySqlStatus { + private final CertificateRegistrationManager manager; + MigrateMySqlStatusImpl(MigrateMySqlStatusInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public Boolean localMySqlEnabled() { + return this.inner().localMySqlEnabled(); + } + + @Override + public OperationStatus migrationOperationStatus() { + return this.inner().migrationOperationStatus(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String operationId() { + return this.inner().operationId(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MigrateMySqlStatusInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MigrateMySqlStatusInner.java new file mode 100644 index 0000000000000..25d2df030bacb --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.OperationStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 status of the migration task. Possible values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created'. + * + * @return the migrationOperationStatus value + */ + public OperationStatus migrationOperationStatus() { + return this.migrationOperationStatus; + } + + /** + * Get operation ID for the migration task. + * + * @return the operationId value + */ + public String operationId() { + return this.operationId; + } + + /** + * Get true if the web app has in app MySql enabled. + * + * @return the localMySqlEnabled value + */ + public Boolean localMySqlEnabled() { + return this.localMySqlEnabled; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MultiRolePoolsImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MultiRolePoolsImpl.java new file mode 100644 index 0000000000000..125ba179c88a8 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/MultiRolePoolsImpl.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.MultiRolePools; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.ComputeModeOptions; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.SkuDescription; + +class MultiRolePoolsImpl extends WrapperImpl implements MultiRolePools { + private final CertificateRegistrationManager manager; + + MultiRolePoolsImpl(WorkerPoolResourceInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public ComputeModeOptions computeMode() { + return this.inner().computeMode(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public List instanceNames() { + return this.inner().instanceNames(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public SkuDescription sku() { + return this.inner().sku(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public Integer workerCount() { + return this.inner().workerCount(); + } + + @Override + public String workerSize() { + return this.inner().workerSize(); + } + + @Override + public Integer workerSizeId() { + return this.inner().workerSizeId(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/NameIdentifierImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/NameIdentifierImpl.java new file mode 100644 index 0000000000000..ddcf537d46586 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/NameIdentifierImpl.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.NameIdentifier; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class NameIdentifierImpl extends WrapperImpl implements NameIdentifier { + private final CertificateRegistrationManager manager; + NameIdentifierImpl(NameIdentifierInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String name() { + return this.inner().name(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/NameIdentifierInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/NameIdentifierInner.java new file mode 100644 index 0000000000000..7d8e5354c396d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Identifies an object. + */ +public class NameIdentifierInner { + /** + * Name of the object. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Get name of the object. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the object. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/NetworkFeaturesImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/NetworkFeaturesImpl.java new file mode 100644 index 0000000000000..69947f8086b43 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/NetworkFeaturesImpl.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.NetworkFeatures; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import java.util.ArrayList; +import com.microsoft.azure.management.appservice.v2019_08_01.RelayServiceConnectionEntity; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteHybridConnection; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteVnetInfo; + +class NetworkFeaturesImpl extends IndexableRefreshableWrapperImpl implements NetworkFeatures { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String view; + + NetworkFeaturesImpl(NetworkFeaturesInner inner, CertificateRegistrationManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.view = IdParsingUtils.getValueFromIdByName(inner.id(), "networkFeatures"); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.listNetworkFeaturesAsync(this.resourceGroupName, this.name, this.view); + } + + + + @Override + public List hybridConnections() { + List lst = new ArrayList(); + if (this.inner().hybridConnections() != null) { + for (RelayServiceConnectionEntityInner inner : this.inner().hybridConnections()) { + lst.add( new RelayServiceConnectionEntityImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List hybridConnectionsV2() { + List lst = new ArrayList(); + if (this.inner().hybridConnectionsV2() != null) { + for (HybridConnectionInner inner : this.inner().hybridConnectionsV2()) { + lst.add( new SiteHybridConnectionImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public SiteVnetInfo virtualNetworkConnection() { + VnetInfoInner inner = this.inner().virtualNetworkConnection(); + if (inner != null) { + return new SiteVnetInfoImpl(inner, manager()); + } else { + return null; + } + } + + @Override + public String virtualNetworkName() { + return this.inner().virtualNetworkName(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/NetworkFeaturesInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/NetworkFeaturesInner.java new file mode 100644 index 0000000000000..ffdb85f18f755 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 Virtual Network name. + * + * @return the virtualNetworkName value + */ + public String virtualNetworkName() { + return this.virtualNetworkName; + } + + /** + * Get the Virtual Network summary view. + * + * @return the virtualNetworkConnection value + */ + public VnetInfoInner virtualNetworkConnection() { + return this.virtualNetworkConnection; + } + + /** + * Get the Hybrid Connections summary view. + * + * @return the hybridConnections value + */ + public List hybridConnections() { + return this.hybridConnections; + } + + /** + * Get the Hybrid Connection V2 (Service Bus) view. + * + * @return the hybridConnectionsV2 value + */ + public List hybridConnectionsV2() { + return this.hybridConnectionsV2; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/NetworkTraceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/NetworkTraceImpl.java new file mode 100644 index 0000000000000..7fbb300b55cee --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/NetworkTraceImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.NetworkTrace; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class NetworkTraceImpl extends WrapperImpl implements NetworkTrace { + private final CertificateRegistrationManager manager; + NetworkTraceImpl(NetworkTraceInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String message() { + return this.inner().message(); + } + + @Override + public String path() { + return this.inner().path(); + } + + @Override + public String status() { + return this.inner().status(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/NetworkTraceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/NetworkTraceInner.java new file mode 100644 index 0000000000000..04fe3040902da --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/NetworkTraceInner.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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Network trace. + */ +public class NetworkTraceInner { + /** + * Local file path for the captured network trace file. + */ + @JsonProperty(value = "path") + private String path; + + /** + * Current status of the network trace operation, same as Operation.Status + * (InProgress/Succeeded/Failed). + */ + @JsonProperty(value = "status") + private String status; + + /** + * Detailed message of a network trace operation, e.g. error message in + * case of failure. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get local file path for the captured network trace file. + * + * @return the path value + */ + public String path() { + return this.path; + } + + /** + * Set local file path for the captured network trace file. + * + * @param path the path value to set + * @return the NetworkTraceInner object itself. + */ + public NetworkTraceInner withPath(String path) { + this.path = path; + return this; + } + + /** + * Get current status of the network trace operation, same as Operation.Status (InProgress/Succeeded/Failed). + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set current status of the network trace operation, same as Operation.Status (InProgress/Succeeded/Failed). + * + * @param status the status value to set + * @return the NetworkTraceInner object itself. + */ + public NetworkTraceInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get detailed message of a network trace operation, e.g. error message in case of failure. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set detailed message of a network trace operation, e.g. error message in case of failure. + * + * @param message the message value to set + * @return the NetworkTraceInner object itself. + */ + public NetworkTraceInner withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/OperationImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/OperationImpl.java new file mode 100644 index 0000000000000..261607af108b2 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/OperationImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.Operation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.ErrorEntity; +import java.util.UUID; +import com.microsoft.azure.management.appservice.v2019_08_01.OperationStatus; + +class OperationImpl extends WrapperImpl implements Operation { + private final CertificateRegistrationManager manager; + + OperationImpl(OperationInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public DateTime createdTime() { + return this.inner().createdTime(); + } + + @Override + public List errors() { + return this.inner().errors(); + } + + @Override + public DateTime expirationTime() { + return this.inner().expirationTime(); + } + + @Override + public UUID geoMasterOperationId() { + return this.inner().geoMasterOperationId(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public DateTime modifiedTime() { + return this.inner().modifiedTime(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public OperationStatus status() { + return this.inner().status(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/OperationInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/OperationInner.java new file mode 100644 index 0000000000000..05b2b0df1b883 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.OperationStatus; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.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 operation ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set operation ID. + * + * @param id the id value to set + * @return the OperationInner object itself. + */ + public OperationInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get operation name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set operation name. + * + * @param name the name value to set + * @return the OperationInner object itself. + */ + public OperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the current status of the operation. Possible values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created'. + * + * @return the status value + */ + public OperationStatus status() { + return this.status; + } + + /** + * Set the current status of the operation. Possible values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created'. + * + * @param status the status value to set + * @return the OperationInner object itself. + */ + public OperationInner withStatus(OperationStatus status) { + this.status = status; + return this; + } + + /** + * Get any errors associate with the operation. + * + * @return the errors value + */ + public List errors() { + return this.errors; + } + + /** + * Set any errors associate with the operation. + * + * @param errors the errors value to set + * @return the OperationInner object itself. + */ + public OperationInner withErrors(List errors) { + this.errors = errors; + return this; + } + + /** + * Get time when operation has started. + * + * @return the createdTime value + */ + public DateTime createdTime() { + return this.createdTime; + } + + /** + * Set time when operation has started. + * + * @param createdTime the createdTime value to set + * @return the OperationInner object itself. + */ + public OperationInner withCreatedTime(DateTime createdTime) { + this.createdTime = createdTime; + return this; + } + + /** + * Get time when operation has been updated. + * + * @return the modifiedTime value + */ + public DateTime modifiedTime() { + return this.modifiedTime; + } + + /** + * Set time when operation has been updated. + * + * @param modifiedTime the modifiedTime value to set + * @return the OperationInner object itself. + */ + public OperationInner withModifiedTime(DateTime modifiedTime) { + this.modifiedTime = modifiedTime; + return this; + } + + /** + * Get time when operation will expire. + * + * @return the expirationTime value + */ + public DateTime expirationTime() { + return this.expirationTime; + } + + /** + * Set time when operation will expire. + * + * @param expirationTime the expirationTime value to set + * @return the OperationInner object itself. + */ + public OperationInner withExpirationTime(DateTime expirationTime) { + this.expirationTime = expirationTime; + return this; + } + + /** + * Get applicable only for stamp operation ids. + * + * @return the geoMasterOperationId value + */ + public UUID geoMasterOperationId() { + return this.geoMasterOperationId; + } + + /** + * Set applicable only for stamp operation ids. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/OutboundEnvironmentEndpointImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/OutboundEnvironmentEndpointImpl.java new file mode 100644 index 0000000000000..c7630828e0148 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/OutboundEnvironmentEndpointImpl.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.OutboundEnvironmentEndpoint; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.EndpointDependency; + +class OutboundEnvironmentEndpointImpl extends WrapperImpl implements OutboundEnvironmentEndpoint { + private final CertificateRegistrationManager manager; + + OutboundEnvironmentEndpointImpl(OutboundEnvironmentEndpointInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public String category() { + return this.inner().category(); + } + + @Override + public List endpoints() { + return this.inner().endpoints(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/OutboundEnvironmentEndpointInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/OutboundEnvironmentEndpointInner.java new file mode 100644 index 0000000000000..58bdf15c9bfe4 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/OutboundEnvironmentEndpointInner.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.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.EndpointDependency; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Endpoints accessed for a common purpose that the App Service Environment + * requires outbound network access to. + */ +public class OutboundEnvironmentEndpointInner { + /** + * The type of service accessed by the App Service Environment, e.g., Azure + * Storage, Azure SQL Database, and Azure Active Directory. + */ + @JsonProperty(value = "category") + private String category; + + /** + * The endpoints that the App Service Environment reaches the service at. + */ + @JsonProperty(value = "endpoints") + private List endpoints; + + /** + * Get the type of service accessed by the App Service Environment, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. + * + * @return the category value + */ + public String category() { + return this.category; + } + + /** + * Set the type of service accessed by the App Service Environment, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. + * + * @param category the category value to set + * @return the OutboundEnvironmentEndpointInner object itself. + */ + public OutboundEnvironmentEndpointInner withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get the endpoints that the App Service Environment reaches the service at. + * + * @return the endpoints value + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Set the endpoints that the App Service Environment reaches the service at. + * + * @param endpoints the endpoints value to set + * @return the OutboundEnvironmentEndpointInner object itself. + */ + public OutboundEnvironmentEndpointInner withEndpoints(List endpoints) { + this.endpoints = endpoints; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PageImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PageImpl.java new file mode 100644 index 0000000000000..4ef59aee1cf39 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PerfMonResponseImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PerfMonResponseImpl.java new file mode 100644 index 0000000000000..ee82538c4c675 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PerfMonResponseImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.PerfMonResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.PerfMonSet; + +class PerfMonResponseImpl extends WrapperImpl implements PerfMonResponse { + private final CertificateRegistrationManager manager; + + PerfMonResponseImpl(PerfMonResponseInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public String code() { + return this.inner().code(); + } + + @Override + public PerfMonSet data() { + return this.inner().data(); + } + + @Override + public String message() { + return this.inner().message(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PerfMonResponseInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PerfMonResponseInner.java new file mode 100644 index 0000000000000..606372d8afaed --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.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 response code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the response code. + * + * @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. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the message. + * + * @param message the message value to set + * @return the PerfMonResponseInner object itself. + */ + public PerfMonResponseInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the performance monitor counters. + * + * @return the data value + */ + public PerfMonSet data() { + return this.data; + } + + /** + * Set the performance monitor counters. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PremierAddOnImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PremierAddOnImpl.java new file mode 100644 index 0000000000000..cab2bd8ca2cda --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PremierAddOnImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.PremierAddOn; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.PremierAddOnPatchResource; +import java.util.Map; +import rx.functions.Func1; + +class PremierAddOnImpl extends CreatableUpdatableImpl implements PremierAddOn, PremierAddOn.Definition, PremierAddOn.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String premierAddOnName; + private PremierAddOnPatchResource updateParameter; + + PremierAddOnImpl(String name, CertificateRegistrationManager manager) { + super(name, new PremierAddOnInner()); + this.manager = manager; + // Set resource name + this.premierAddOnName = name; + // + this.updateParameter = new PremierAddOnPatchResource(); + } + + PremierAddOnImpl(PremierAddOnInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.premierAddOnName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.premierAddOnName = IdParsingUtils.getValueFromIdByName(inner.id(), "premieraddons"); + // + this.updateParameter = new PremierAddOnPatchResource(); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.addPremierAddOnAsync(this.resourceGroupName, this.name, this.premierAddOnName, this.inner()) + .map(new Func1() { + @Override + public PremierAddOnInner call(PremierAddOnInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.updatePremierAddOnAsync(this.resourceGroupName, this.name, this.premierAddOnName, this.updateParameter) + .map(new Func1() { + @Override + public PremierAddOnInner call(PremierAddOnInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getPremierAddOnAsync(this.resourceGroupName, this.name, this.premierAddOnName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.updateParameter = new PremierAddOnPatchResource(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String marketplaceOffer() { + return this.inner().marketplaceOffer(); + } + + @Override + public String marketplacePublisher() { + return this.inner().marketplacePublisher(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String product() { + return this.inner().product(); + } + + @Override + public String sku() { + return this.inner().sku(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String vendor() { + return this.inner().vendor(); + } + + @Override + public PremierAddOnImpl withExistingSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + @Override + public PremierAddOnImpl withLocation(String location) { + this.inner().withLocation(location); + return this; + } + + @Override + public PremierAddOnImpl withTags(Map tags) { + this.inner().withTags(tags); + return this; + } + + @Override + public PremierAddOnImpl withKind(String kind) { + if (isInCreateMode()) { + this.inner().withKind(kind); + } else { + this.updateParameter.withKind(kind); + } + return this; + } + + @Override + public PremierAddOnImpl withMarketplaceOffer(String marketplaceOffer) { + if (isInCreateMode()) { + this.inner().withMarketplaceOffer(marketplaceOffer); + } else { + this.updateParameter.withMarketplaceOffer(marketplaceOffer); + } + return this; + } + + @Override + public PremierAddOnImpl withMarketplacePublisher(String marketplacePublisher) { + if (isInCreateMode()) { + this.inner().withMarketplacePublisher(marketplacePublisher); + } else { + this.updateParameter.withMarketplacePublisher(marketplacePublisher); + } + return this; + } + + @Override + public PremierAddOnImpl withProduct(String product) { + if (isInCreateMode()) { + this.inner().withProduct(product); + } else { + this.updateParameter.withProduct(product); + } + return this; + } + + @Override + public PremierAddOnImpl withSku(String sku) { + if (isInCreateMode()) { + this.inner().withSku(sku); + } else { + this.updateParameter.withSku(sku); + } + return this; + } + + @Override + public PremierAddOnImpl withVendor(String vendor) { + if (isInCreateMode()) { + this.inner().withVendor(vendor); + } else { + this.updateParameter.withVendor(vendor); + } + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PremierAddOnInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PremierAddOnInner.java new file mode 100644 index 0000000000000..037e706b7be40 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PremierAddOnInner.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +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 Marketplace publisher. + */ + @JsonProperty(value = "properties.marketplacePublisher") + private String marketplacePublisher; + + /** + * Premier add on Marketplace offer. + */ + @JsonProperty(value = "properties.marketplaceOffer") + private String marketplaceOffer; + + /** + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get premier add on SKU. + * + * @return the sku value + */ + public String sku() { + return this.sku; + } + + /** + * Set premier add on SKU. + * + * @param sku the sku value to set + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withSku(String sku) { + this.sku = sku; + return this; + } + + /** + * Get premier add on Product. + * + * @return the product value + */ + public String product() { + return this.product; + } + + /** + * Set premier add on Product. + * + * @param product the product value to set + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get premier add on Vendor. + * + * @return the vendor value + */ + public String vendor() { + return this.vendor; + } + + /** + * Set premier add on Vendor. + * + * @param vendor the vendor value to set + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withVendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Get premier add on Marketplace publisher. + * + * @return the marketplacePublisher value + */ + public String marketplacePublisher() { + return this.marketplacePublisher; + } + + /** + * Set premier add on Marketplace publisher. + * + * @param marketplacePublisher the marketplacePublisher value to set + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withMarketplacePublisher(String marketplacePublisher) { + this.marketplacePublisher = marketplacePublisher; + return this; + } + + /** + * Get premier add on Marketplace offer. + * + * @return the marketplaceOffer value + */ + public String marketplaceOffer() { + return this.marketplaceOffer; + } + + /** + * Set premier add on Marketplace offer. + * + * @param marketplaceOffer the marketplaceOffer value to set + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withMarketplaceOffer(String marketplaceOffer) { + this.marketplaceOffer = marketplaceOffer; + return this; + } + + /** + * Get kind of resource. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Set kind of resource. + * + * @param kind the kind value to set + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withKind(String kind) { + this.kind = kind; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PremierAddOnOfferInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PremierAddOnOfferInner.java new file mode 100644 index 0000000000000..f6bc2c7536d13 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PremierAddOnOfferInner.java @@ -0,0 +1,283 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.AppServicePlanRestrictions; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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; + + /** + * <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 premier add on SKU. + * + * @return the sku value + */ + public String sku() { + return this.sku; + } + + /** + * Set premier add on SKU. + * + * @param sku the sku value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withSku(String sku) { + this.sku = sku; + return this; + } + + /** + * Get premier add on offer Product. + * + * @return the product value + */ + public String product() { + return this.product; + } + + /** + * Set premier add on offer Product. + * + * @param product the product value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get premier add on offer Vendor. + * + * @return the vendor value + */ + public String vendor() { + return this.vendor; + } + + /** + * Set premier add on offer Vendor. + * + * @param vendor the vendor value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withVendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Get <code>true</code> if promotion code is required; otherwise, <code>false</code>. + * + * @return the promoCodeRequired value + */ + public Boolean promoCodeRequired() { + return this.promoCodeRequired; + } + + /** + * Set <code>true</code> if promotion code is required; otherwise, <code>false</code>. + * + * @param promoCodeRequired the promoCodeRequired value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withPromoCodeRequired(Boolean promoCodeRequired) { + this.promoCodeRequired = promoCodeRequired; + return this; + } + + /** + * Get premier add on offer Quota. + * + * @return the quota value + */ + public Integer quota() { + return this.quota; + } + + /** + * Set premier add on offer Quota. + * + * @param quota the quota value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withQuota(Integer quota) { + this.quota = quota; + return this; + } + + /** + * Get app Service plans this offer is restricted to. Possible values include: 'None', 'Free', 'Shared', 'Basic', 'Standard', 'Premium'. + * + * @return the webHostingPlanRestrictions value + */ + public AppServicePlanRestrictions webHostingPlanRestrictions() { + return this.webHostingPlanRestrictions; + } + + /** + * Set app Service plans this offer is restricted to. Possible values include: 'None', 'Free', 'Shared', 'Basic', 'Standard', 'Premium'. + * + * @param webHostingPlanRestrictions the webHostingPlanRestrictions value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withWebHostingPlanRestrictions(AppServicePlanRestrictions webHostingPlanRestrictions) { + this.webHostingPlanRestrictions = webHostingPlanRestrictions; + return this; + } + + /** + * Get privacy policy URL. + * + * @return the privacyPolicyUrl value + */ + public String privacyPolicyUrl() { + return this.privacyPolicyUrl; + } + + /** + * Set privacy policy URL. + * + * @param privacyPolicyUrl the privacyPolicyUrl value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withPrivacyPolicyUrl(String privacyPolicyUrl) { + this.privacyPolicyUrl = privacyPolicyUrl; + return this; + } + + /** + * Get legal terms URL. + * + * @return the legalTermsUrl value + */ + public String legalTermsUrl() { + return this.legalTermsUrl; + } + + /** + * Set legal terms URL. + * + * @param legalTermsUrl the legalTermsUrl value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withLegalTermsUrl(String legalTermsUrl) { + this.legalTermsUrl = legalTermsUrl; + return this; + } + + /** + * Get marketplace publisher. + * + * @return the marketplacePublisher value + */ + public String marketplacePublisher() { + return this.marketplacePublisher; + } + + /** + * Set marketplace publisher. + * + * @param marketplacePublisher the marketplacePublisher value to set + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withMarketplacePublisher(String marketplacePublisher) { + this.marketplacePublisher = marketplacePublisher; + return this; + } + + /** + * Get marketplace offer. + * + * @return the marketplaceOffer value + */ + public String marketplaceOffer() { + return this.marketplaceOffer; + } + + /** + * Set marketplace offer. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateAccessImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateAccessImpl.java new file mode 100644 index 0000000000000..be8e135e5f313 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateAccessImpl.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.PrivateAccess; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.PrivateAccessVirtualNetwork; + +class PrivateAccessImpl extends WrapperImpl implements PrivateAccess { + private final CertificateRegistrationManager manager; + PrivateAccessImpl(PrivateAccessInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Boolean enabled() { + return this.inner().enabled(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public List virtualNetworks() { + return this.inner().virtualNetworks(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateAccessInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateAccessInner.java new file mode 100644 index 0000000000000..e988ecd158c9c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateAccessInner.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.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.PrivateAccessVirtualNetwork; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Description of the parameters of Private Access for a Web Site. + */ +@JsonFlatten +public class PrivateAccessInner extends ProxyOnlyResource { + /** + * Whether private access is enabled or not. + */ + @JsonProperty(value = "properties.enabled") + private Boolean enabled; + + /** + * The Virtual Networks (and subnets) allowed to access the site privately. + */ + @JsonProperty(value = "properties.virtualNetworks") + private List virtualNetworks; + + /** + * Get whether private access is enabled or not. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set whether private access is enabled or not. + * + * @param enabled the enabled value to set + * @return the PrivateAccessInner object itself. + */ + public PrivateAccessInner withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the Virtual Networks (and subnets) allowed to access the site privately. + * + * @return the virtualNetworks value + */ + public List virtualNetworks() { + return this.virtualNetworks; + } + + /** + * Set the Virtual Networks (and subnets) allowed to access the site privately. + * + * @param virtualNetworks the virtualNetworks value to set + * @return the PrivateAccessInner object itself. + */ + public PrivateAccessInner withVirtualNetworks(List virtualNetworks) { + this.virtualNetworks = virtualNetworks; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateEndpointConnectionResourceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateEndpointConnectionResourceImpl.java new file mode 100644 index 0000000000000..c3bd803a2ab23 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateEndpointConnectionResourceImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.PrivateEndpointConnectionResource; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.PrivateLinkConnectionApprovalRequestResource; +import com.microsoft.azure.management.appservice.v2019_08_01.ArmIdWrapper; +import com.microsoft.azure.management.appservice.v2019_08_01.PrivateLinkConnectionState; +import rx.functions.Func1; + +class PrivateEndpointConnectionResourceImpl extends CreatableUpdatableImpl implements PrivateEndpointConnectionResource, PrivateEndpointConnectionResource.Definition, PrivateEndpointConnectionResource.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String privateEndpointConnectionName; + private PrivateLinkConnectionApprovalRequestResource createOrUpdateParameter; + + PrivateEndpointConnectionResourceImpl(String name, CertificateRegistrationManager manager) { + super(name, new PrivateEndpointConnectionResourceInner()); + this.manager = manager; + // Set resource name + this.privateEndpointConnectionName = name; + // + this.createOrUpdateParameter = new PrivateLinkConnectionApprovalRequestResource(); + } + + PrivateEndpointConnectionResourceImpl(PrivateEndpointConnectionResourceInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.privateEndpointConnectionName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.privateEndpointConnectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "privateEndpointConnections"); + // + this.createOrUpdateParameter = new PrivateLinkConnectionApprovalRequestResource(); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.approveOrRejectPrivateEndpointConnectionAsync(this.resourceGroupName, this.name, this.privateEndpointConnectionName, this.createOrUpdateParameter) + .map(new Func1() { + @Override + public PrivateEndpointConnectionResourceInner call(PrivateEndpointConnectionResourceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.approveOrRejectPrivateEndpointConnectionAsync(this.resourceGroupName, this.name, this.privateEndpointConnectionName, this.createOrUpdateParameter) + .map(new Func1() { + @Override + public PrivateEndpointConnectionResourceInner call(PrivateEndpointConnectionResourceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getPrivateEndpointConnectionAsync(this.resourceGroupName, this.name, this.privateEndpointConnectionName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.createOrUpdateParameter = new PrivateLinkConnectionApprovalRequestResource(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public ArmIdWrapper privateEndpoint() { + return this.inner().privateEndpoint(); + } + + @Override + public PrivateLinkConnectionState privateLinkServiceConnectionState() { + return this.inner().privateLinkServiceConnectionState(); + } + + @Override + public String provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public PrivateEndpointConnectionResourceImpl withExistingSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + @Override + public PrivateEndpointConnectionResourceImpl withKind(String kind) { + this.createOrUpdateParameter.withKind(kind); + return this; + } + + @Override + public PrivateEndpointConnectionResourceImpl withPrivateLinkServiceConnectionState(PrivateLinkConnectionState privateLinkServiceConnectionState) { + this.createOrUpdateParameter.withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateEndpointConnectionResourceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateEndpointConnectionResourceInner.java new file mode 100644 index 0000000000000..e67a1fdb14c77 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateEndpointConnectionResourceInner.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ArmIdWrapper; +import com.microsoft.azure.management.appservice.v2019_08_01.PrivateLinkConnectionState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Private Endpoint Connection ARM resource. + */ +@JsonFlatten +public class PrivateEndpointConnectionResourceInner extends ProxyOnlyResource { + /** + * The provisioningState property. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * PrivateEndpoint of a remote private endpoint connection. + */ + @JsonProperty(value = "properties.privateEndpoint") + private ArmIdWrapper privateEndpoint; + + /** + * The privateLinkServiceConnectionState property. + */ + @JsonProperty(value = "properties.privateLinkServiceConnectionState") + private PrivateLinkConnectionState privateLinkServiceConnectionState; + + /** + * Get the provisioningState value. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get privateEndpoint of a remote private endpoint connection. + * + * @return the privateEndpoint value + */ + public ArmIdWrapper privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set privateEndpoint of a remote private endpoint connection. + * + * @param privateEndpoint the privateEndpoint value to set + * @return the PrivateEndpointConnectionResourceInner object itself. + */ + public PrivateEndpointConnectionResourceInner withPrivateEndpoint(ArmIdWrapper privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the privateLinkServiceConnectionState value. + * + * @return the privateLinkServiceConnectionState value + */ + public PrivateLinkConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState value. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set + * @return the PrivateEndpointConnectionResourceInner object itself. + */ + public PrivateEndpointConnectionResourceInner withPrivateLinkServiceConnectionState(PrivateLinkConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateLinkResourcesWrapperImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateLinkResourcesWrapperImpl.java new file mode 100644 index 0000000000000..0a0ce559a8c3f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateLinkResourcesWrapperImpl.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.PrivateLinkResourcesWrapper; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.PrivateLinkResource; + +class PrivateLinkResourcesWrapperImpl extends WrapperImpl implements PrivateLinkResourcesWrapper { + private final CertificateRegistrationManager manager; + PrivateLinkResourcesWrapperImpl(PrivateLinkResourcesWrapperInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateLinkResourcesWrapperInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateLinkResourcesWrapperInner.java new file mode 100644 index 0000000000000..a1d707f9ef053 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PrivateLinkResourcesWrapperInner.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.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.PrivateLinkResource; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Wrapper for a collection of private link resources. + */ +public class PrivateLinkResourcesWrapperInner { + /** + * The value property. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /** + * Get the value value. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the PrivateLinkResourcesWrapperInner object itself. + */ + public PrivateLinkResourcesWrapperInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessInfoImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessInfoImpl.java new file mode 100644 index 0000000000000..f9391cac0a21a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessInfoImpl.java @@ -0,0 +1,263 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ProcessInfo; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import java.util.List; +import java.util.Map; +import java.util.ArrayList; +import com.microsoft.azure.management.appservice.v2019_08_01.ProcessModuleInfo; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.ProcessThreadInfo; + +class ProcessInfoImpl extends IndexableRefreshableWrapperImpl implements ProcessInfo { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String processId; + private String instanceId; + + ProcessInfoImpl(ProcessInfoInner inner, CertificateRegistrationManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.processId = IdParsingUtils.getValueFromIdByName(inner.id(), "processes"); + this.instanceId = IdParsingUtils.getValueFromIdByName(inner.id(), "instances"); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getInstanceProcessAsync(this.resourceGroupName, this.name, this.processId, this.instanceId); + } + + + + @Override + public List children() { + return this.inner().children(); + } + + @Override + public String commandLine() { + return this.inner().commandLine(); + } + + @Override + public String deploymentName() { + return this.inner().deploymentName(); + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public Map environmentVariables() { + return this.inner().environmentVariables(); + } + + @Override + public String fileName() { + return this.inner().fileName(); + } + + @Override + public Integer handleCount() { + return this.inner().handleCount(); + } + + @Override + public String href() { + return this.inner().href(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Integer identifier() { + return this.inner().identifier(); + } + + @Override + public Double iisProfileTimeoutInSeconds() { + return this.inner().iisProfileTimeoutInSeconds(); + } + + @Override + public Boolean isIisProfileRunning() { + return this.inner().isIisProfileRunning(); + } + + @Override + public Boolean isProfileRunning() { + return this.inner().isProfileRunning(); + } + + @Override + public Boolean isScmSite() { + return this.inner().isScmSite(); + } + + @Override + public Boolean isWebjob() { + return this.inner().isWebjob(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String minidump() { + return this.inner().minidump(); + } + + @Override + public Integer moduleCount() { + return this.inner().moduleCount(); + } + + @Override + public List modules() { + List lst = new ArrayList(); + if (this.inner().modules() != null) { + for (ProcessModuleInfoInner inner : this.inner().modules()) { + lst.add( new ProcessModuleInfoImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Long nonPagedSystemMemory() { + return this.inner().nonPagedSystemMemory(); + } + + @Override + public List openFileHandles() { + return this.inner().openFileHandles(); + } + + @Override + public Long pagedMemory() { + return this.inner().pagedMemory(); + } + + @Override + public Long pagedSystemMemory() { + return this.inner().pagedSystemMemory(); + } + + @Override + public String parent() { + return this.inner().parent(); + } + + @Override + public Long peakPagedMemory() { + return this.inner().peakPagedMemory(); + } + + @Override + public Long peakVirtualMemory() { + return this.inner().peakVirtualMemory(); + } + + @Override + public Long peakWorkingSet() { + return this.inner().peakWorkingSet(); + } + + @Override + public Long privateMemory() { + return this.inner().privateMemory(); + } + + @Override + public String privilegedCpuTime() { + return this.inner().privilegedCpuTime(); + } + + @Override + public DateTime startTime() { + return this.inner().startTime(); + } + + @Override + public Integer threadCount() { + return this.inner().threadCount(); + } + + @Override + public List threads() { + List lst = new ArrayList(); + if (this.inner().threads() != null) { + for (ProcessThreadInfoInner inner : this.inner().threads()) { + lst.add( new ProcessThreadInfoImpl(inner, manager())); + } + } + return lst; + } + + @Override + public DateTime timeStamp() { + return this.inner().timeStamp(); + } + + @Override + public String totalCpuTime() { + return this.inner().totalCpuTime(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String userCpuTime() { + return this.inner().userCpuTime(); + } + + @Override + public String userName() { + return this.inner().userName(); + } + + @Override + public Long virtualMemory() { + return this.inner().virtualMemory(); + } + + @Override + public Long workingSet() { + return this.inner().workingSet(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessInfoInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessInfoInner.java new file mode 100644 index 0000000000000..0a1bfea803081 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessInfoInner.java @@ -0,0 +1,948 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Process Information. + */ +@JsonFlatten +public class ProcessInfoInner extends ProxyOnlyResource { + /** + * ARM Identifier for deployment. + */ + @JsonProperty(value = "properties.identifier", access = JsonProperty.Access.WRITE_ONLY) + private Integer identifier; + + /** + * Deployment name. + */ + @JsonProperty(value = "properties.deployment_name") + private String deploymentName; + + /** + * HRef URI. + */ + @JsonProperty(value = "properties.href") + private String href; + + /** + * Minidump URI. + */ + @JsonProperty(value = "properties.minidump") + private String minidump; + + /** + * Is profile running?. + */ + @JsonProperty(value = "properties.is_profile_running") + private Boolean isProfileRunning; + + /** + * Is the IIS Profile running?. + */ + @JsonProperty(value = "properties.is_iis_profile_running") + private Boolean isIisProfileRunning; + + /** + * IIS Profile timeout (seconds). + */ + @JsonProperty(value = "properties.iis_profile_timeout_in_seconds") + 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.open_file_handles") + private List openFileHandles; + + /** + * List of modules. + */ + @JsonProperty(value = "properties.modules") + private List modules; + + /** + * File name of this process. + */ + @JsonProperty(value = "properties.file_name") + private String fileName; + + /** + * Command line. + */ + @JsonProperty(value = "properties.command_line") + private String commandLine; + + /** + * User name. + */ + @JsonProperty(value = "properties.user_name") + private String userName; + + /** + * Handle count. + */ + @JsonProperty(value = "properties.handle_count") + private Integer handleCount; + + /** + * Module count. + */ + @JsonProperty(value = "properties.module_count") + private Integer moduleCount; + + /** + * Thread count. + */ + @JsonProperty(value = "properties.thread_count") + private Integer threadCount; + + /** + * Start time. + */ + @JsonProperty(value = "properties.start_time") + private DateTime startTime; + + /** + * Total CPU time. + */ + @JsonProperty(value = "properties.total_cpu_time") + private String totalCpuTime; + + /** + * User CPU time. + */ + @JsonProperty(value = "properties.user_cpu_time") + private String userCpuTime; + + /** + * Privileged CPU time. + */ + @JsonProperty(value = "properties.privileged_cpu_time") + private String privilegedCpuTime; + + /** + * Working set. + */ + @JsonProperty(value = "properties.working_set") + private Long workingSet; + + /** + * Peak working set. + */ + @JsonProperty(value = "properties.peak_working_set") + private Long peakWorkingSet; + + /** + * Private memory size. + */ + @JsonProperty(value = "properties.private_memory") + private Long privateMemory; + + /** + * Virtual memory size. + */ + @JsonProperty(value = "properties.virtual_memory") + private Long virtualMemory; + + /** + * Peak virtual memory usage. + */ + @JsonProperty(value = "properties.peak_virtual_memory") + private Long peakVirtualMemory; + + /** + * Paged system memory. + */ + @JsonProperty(value = "properties.paged_system_memory") + private Long pagedSystemMemory; + + /** + * Non-paged system memory. + */ + @JsonProperty(value = "properties.non_paged_system_memory") + private Long nonPagedSystemMemory; + + /** + * Paged memory. + */ + @JsonProperty(value = "properties.paged_memory") + private Long pagedMemory; + + /** + * Peak paged memory. + */ + @JsonProperty(value = "properties.peak_paged_memory") + private Long peakPagedMemory; + + /** + * Time stamp. + */ + @JsonProperty(value = "properties.time_stamp") + private DateTime timeStamp; + + /** + * List of environment variables. + */ + @JsonProperty(value = "properties.environment_variables") + private Map environmentVariables; + + /** + * Is this the SCM site?. + */ + @JsonProperty(value = "properties.is_scm_site") + private Boolean isScmSite; + + /** + * Is this a Web Job?. + */ + @JsonProperty(value = "properties.is_webjob") + private Boolean isWebjob; + + /** + * Description of process. + */ + @JsonProperty(value = "properties.description") + private String description; + + /** + * Get aRM Identifier for deployment. + * + * @return the identifier value + */ + public Integer identifier() { + return this.identifier; + } + + /** + * Get deployment name. + * + * @return the deploymentName value + */ + public String deploymentName() { + return this.deploymentName; + } + + /** + * Set deployment name. + * + * @param deploymentName the deploymentName value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withDeploymentName(String deploymentName) { + this.deploymentName = deploymentName; + return this; + } + + /** + * Get hRef URI. + * + * @return the href value + */ + public String href() { + return this.href; + } + + /** + * Set hRef URI. + * + * @param href the href value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withHref(String href) { + this.href = href; + return this; + } + + /** + * Get minidump URI. + * + * @return the minidump value + */ + public String minidump() { + return this.minidump; + } + + /** + * Set minidump URI. + * + * @param minidump the minidump value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withMinidump(String minidump) { + this.minidump = minidump; + return this; + } + + /** + * Get is profile running?. + * + * @return the isProfileRunning value + */ + public Boolean isProfileRunning() { + return this.isProfileRunning; + } + + /** + * Set is profile running?. + * + * @param isProfileRunning the isProfileRunning value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withIsProfileRunning(Boolean isProfileRunning) { + this.isProfileRunning = isProfileRunning; + return this; + } + + /** + * Get is the IIS Profile running?. + * + * @return the isIisProfileRunning value + */ + public Boolean isIisProfileRunning() { + return this.isIisProfileRunning; + } + + /** + * Set is the IIS Profile running?. + * + * @param isIisProfileRunning the isIisProfileRunning value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withIsIisProfileRunning(Boolean isIisProfileRunning) { + this.isIisProfileRunning = isIisProfileRunning; + return this; + } + + /** + * Get iIS Profile timeout (seconds). + * + * @return the iisProfileTimeoutInSeconds value + */ + public Double iisProfileTimeoutInSeconds() { + return this.iisProfileTimeoutInSeconds; + } + + /** + * Set iIS Profile timeout (seconds). + * + * @param iisProfileTimeoutInSeconds the iisProfileTimeoutInSeconds value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withIisProfileTimeoutInSeconds(Double iisProfileTimeoutInSeconds) { + this.iisProfileTimeoutInSeconds = iisProfileTimeoutInSeconds; + return this; + } + + /** + * Get parent process. + * + * @return the parent value + */ + public String parent() { + return this.parent; + } + + /** + * Set parent process. + * + * @param parent the parent value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withParent(String parent) { + this.parent = parent; + return this; + } + + /** + * Get child process list. + * + * @return the children value + */ + public List children() { + return this.children; + } + + /** + * Set child process list. + * + * @param children the children value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withChildren(List children) { + this.children = children; + return this; + } + + /** + * Get thread list. + * + * @return the threads value + */ + public List threads() { + return this.threads; + } + + /** + * Set thread list. + * + * @param threads the threads value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withThreads(List threads) { + this.threads = threads; + return this; + } + + /** + * Get list of open files. + * + * @return the openFileHandles value + */ + public List openFileHandles() { + return this.openFileHandles; + } + + /** + * Set list of open files. + * + * @param openFileHandles the openFileHandles value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withOpenFileHandles(List openFileHandles) { + this.openFileHandles = openFileHandles; + return this; + } + + /** + * Get list of modules. + * + * @return the modules value + */ + public List modules() { + return this.modules; + } + + /** + * Set list of modules. + * + * @param modules the modules value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withModules(List modules) { + this.modules = modules; + return this; + } + + /** + * Get file name of this process. + * + * @return the fileName value + */ + public String fileName() { + return this.fileName; + } + + /** + * Set file name of this process. + * + * @param fileName the fileName value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withFileName(String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Get command line. + * + * @return the commandLine value + */ + public String commandLine() { + return this.commandLine; + } + + /** + * Set command line. + * + * @param commandLine the commandLine value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withCommandLine(String commandLine) { + this.commandLine = commandLine; + return this; + } + + /** + * Get user name. + * + * @return the userName value + */ + public String userName() { + return this.userName; + } + + /** + * Set user name. + * + * @param userName the userName value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withUserName(String userName) { + this.userName = userName; + return this; + } + + /** + * Get handle count. + * + * @return the handleCount value + */ + public Integer handleCount() { + return this.handleCount; + } + + /** + * Set handle count. + * + * @param handleCount the handleCount value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withHandleCount(Integer handleCount) { + this.handleCount = handleCount; + return this; + } + + /** + * Get module count. + * + * @return the moduleCount value + */ + public Integer moduleCount() { + return this.moduleCount; + } + + /** + * Set module count. + * + * @param moduleCount the moduleCount value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withModuleCount(Integer moduleCount) { + this.moduleCount = moduleCount; + return this; + } + + /** + * Get thread count. + * + * @return the threadCount value + */ + public Integer threadCount() { + return this.threadCount; + } + + /** + * Set thread count. + * + * @param threadCount the threadCount value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withThreadCount(Integer threadCount) { + this.threadCount = threadCount; + return this; + } + + /** + * Get start time. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set start time. + * + * @param startTime the startTime value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get total CPU time. + * + * @return the totalCpuTime value + */ + public String totalCpuTime() { + return this.totalCpuTime; + } + + /** + * Set total CPU time. + * + * @param totalCpuTime the totalCpuTime value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withTotalCpuTime(String totalCpuTime) { + this.totalCpuTime = totalCpuTime; + return this; + } + + /** + * Get user CPU time. + * + * @return the userCpuTime value + */ + public String userCpuTime() { + return this.userCpuTime; + } + + /** + * Set user CPU time. + * + * @param userCpuTime the userCpuTime value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withUserCpuTime(String userCpuTime) { + this.userCpuTime = userCpuTime; + return this; + } + + /** + * Get privileged CPU time. + * + * @return the privilegedCpuTime value + */ + public String privilegedCpuTime() { + return this.privilegedCpuTime; + } + + /** + * Set privileged CPU time. + * + * @param privilegedCpuTime the privilegedCpuTime value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPrivilegedCpuTime(String privilegedCpuTime) { + this.privilegedCpuTime = privilegedCpuTime; + return this; + } + + /** + * Get working set. + * + * @return the workingSet value + */ + public Long workingSet() { + return this.workingSet; + } + + /** + * Set working set. + * + * @param workingSet the workingSet value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withWorkingSet(Long workingSet) { + this.workingSet = workingSet; + return this; + } + + /** + * Get peak working set. + * + * @return the peakWorkingSet value + */ + public Long peakWorkingSet() { + return this.peakWorkingSet; + } + + /** + * Set peak working set. + * + * @param peakWorkingSet the peakWorkingSet value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPeakWorkingSet(Long peakWorkingSet) { + this.peakWorkingSet = peakWorkingSet; + return this; + } + + /** + * Get private memory size. + * + * @return the privateMemory value + */ + public Long privateMemory() { + return this.privateMemory; + } + + /** + * Set private memory size. + * + * @param privateMemory the privateMemory value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPrivateMemory(Long privateMemory) { + this.privateMemory = privateMemory; + return this; + } + + /** + * Get virtual memory size. + * + * @return the virtualMemory value + */ + public Long virtualMemory() { + return this.virtualMemory; + } + + /** + * Set virtual memory size. + * + * @param virtualMemory the virtualMemory value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withVirtualMemory(Long virtualMemory) { + this.virtualMemory = virtualMemory; + return this; + } + + /** + * Get peak virtual memory usage. + * + * @return the peakVirtualMemory value + */ + public Long peakVirtualMemory() { + return this.peakVirtualMemory; + } + + /** + * Set peak virtual memory usage. + * + * @param peakVirtualMemory the peakVirtualMemory value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPeakVirtualMemory(Long peakVirtualMemory) { + this.peakVirtualMemory = peakVirtualMemory; + return this; + } + + /** + * Get paged system memory. + * + * @return the pagedSystemMemory value + */ + public Long pagedSystemMemory() { + return this.pagedSystemMemory; + } + + /** + * Set paged system memory. + * + * @param pagedSystemMemory the pagedSystemMemory value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPagedSystemMemory(Long pagedSystemMemory) { + this.pagedSystemMemory = pagedSystemMemory; + return this; + } + + /** + * Get non-paged system memory. + * + * @return the nonPagedSystemMemory value + */ + public Long nonPagedSystemMemory() { + return this.nonPagedSystemMemory; + } + + /** + * Set non-paged system memory. + * + * @param nonPagedSystemMemory the nonPagedSystemMemory value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withNonPagedSystemMemory(Long nonPagedSystemMemory) { + this.nonPagedSystemMemory = nonPagedSystemMemory; + return this; + } + + /** + * Get paged memory. + * + * @return the pagedMemory value + */ + public Long pagedMemory() { + return this.pagedMemory; + } + + /** + * Set paged memory. + * + * @param pagedMemory the pagedMemory value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPagedMemory(Long pagedMemory) { + this.pagedMemory = pagedMemory; + return this; + } + + /** + * Get peak paged memory. + * + * @return the peakPagedMemory value + */ + public Long peakPagedMemory() { + return this.peakPagedMemory; + } + + /** + * Set peak paged memory. + * + * @param peakPagedMemory the peakPagedMemory value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPeakPagedMemory(Long peakPagedMemory) { + this.peakPagedMemory = peakPagedMemory; + return this; + } + + /** + * Get time stamp. + * + * @return the timeStamp value + */ + public DateTime timeStamp() { + return this.timeStamp; + } + + /** + * Set time stamp. + * + * @param timeStamp the timeStamp value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withTimeStamp(DateTime timeStamp) { + this.timeStamp = timeStamp; + return this; + } + + /** + * Get list of environment variables. + * + * @return the environmentVariables value + */ + public Map environmentVariables() { + return this.environmentVariables; + } + + /** + * Set list of environment variables. + * + * @param environmentVariables the environmentVariables value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get is this the SCM site?. + * + * @return the isScmSite value + */ + public Boolean isScmSite() { + return this.isScmSite; + } + + /** + * Set is this the SCM site?. + * + * @param isScmSite the isScmSite value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withIsScmSite(Boolean isScmSite) { + this.isScmSite = isScmSite; + return this; + } + + /** + * Get is this a Web Job?. + * + * @return the isWebjob value + */ + public Boolean isWebjob() { + return this.isWebjob; + } + + /** + * Set is this a Web Job?. + * + * @param isWebjob the isWebjob value to set + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withIsWebjob(Boolean isWebjob) { + this.isWebjob = isWebjob; + return this; + } + + /** + * Get description of process. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of process. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessModuleInfoImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessModuleInfoImpl.java new file mode 100644 index 0000000000000..9e81342786edd --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessModuleInfoImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ProcessModuleInfo; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; + +class ProcessModuleInfoImpl extends IndexableRefreshableWrapperImpl implements ProcessModuleInfo { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String processId; + private String baseAddress; + private String instanceId; + + ProcessModuleInfoImpl(ProcessModuleInfoInner inner, CertificateRegistrationManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.processId = IdParsingUtils.getValueFromIdByName(inner.id(), "processes"); + this.baseAddress = IdParsingUtils.getValueFromIdByName(inner.id(), "modules"); + this.instanceId = IdParsingUtils.getValueFromIdByName(inner.id(), "instances"); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getInstanceProcessModuleAsync(this.resourceGroupName, this.name, this.processId, this.baseAddress, this.instanceId); + } + + + + @Override + public String baseAddress() { + return this.inner().baseAddress(); + } + + @Override + public String fileDescription() { + return this.inner().fileDescription(); + } + + @Override + public String fileName() { + return this.inner().fileName(); + } + + @Override + public String filePath() { + return this.inner().filePath(); + } + + @Override + public String fileVersion() { + return this.inner().fileVersion(); + } + + @Override + public String href() { + return this.inner().href(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Boolean isDebug() { + return this.inner().isDebug(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String language() { + return this.inner().language(); + } + + @Override + public Integer moduleMemorySize() { + return this.inner().moduleMemorySize(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String product() { + return this.inner().product(); + } + + @Override + public String productVersion() { + return this.inner().productVersion(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessModuleInfoInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessModuleInfoInner.java new file mode 100644 index 0000000000000..b2f568a63cad2 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Process Module Information. + */ +@JsonFlatten +public class ProcessModuleInfoInner extends ProxyOnlyResource { + /** + * Base address. Used as module identifier in ARM resource URI. + */ + @JsonProperty(value = "properties.base_address") + private String baseAddress; + + /** + * File name. + */ + @JsonProperty(value = "properties.file_name") + private String fileName; + + /** + * HRef URI. + */ + @JsonProperty(value = "properties.href") + private String href; + + /** + * File path. + */ + @JsonProperty(value = "properties.file_path") + private String filePath; + + /** + * Module memory size. + */ + @JsonProperty(value = "properties.module_memory_size") + private Integer moduleMemorySize; + + /** + * File version. + */ + @JsonProperty(value = "properties.file_version") + private String fileVersion; + + /** + * File description. + */ + @JsonProperty(value = "properties.file_description") + private String fileDescription; + + /** + * Product name. + */ + @JsonProperty(value = "properties.product") + private String product; + + /** + * Product version. + */ + @JsonProperty(value = "properties.product_version") + private String productVersion; + + /** + * Is debug?. + */ + @JsonProperty(value = "properties.is_debug") + private Boolean isDebug; + + /** + * Module language (locale). + */ + @JsonProperty(value = "properties.language") + private String language; + + /** + * Get base address. Used as module identifier in ARM resource URI. + * + * @return the baseAddress value + */ + public String baseAddress() { + return this.baseAddress; + } + + /** + * Set base address. Used as module identifier in ARM resource URI. + * + * @param baseAddress the baseAddress value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withBaseAddress(String baseAddress) { + this.baseAddress = baseAddress; + return this; + } + + /** + * Get file name. + * + * @return the fileName value + */ + public String fileName() { + return this.fileName; + } + + /** + * Set file name. + * + * @param fileName the fileName value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withFileName(String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Get hRef URI. + * + * @return the href value + */ + public String href() { + return this.href; + } + + /** + * Set hRef URI. + * + * @param href the href value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withHref(String href) { + this.href = href; + return this; + } + + /** + * Get file path. + * + * @return the filePath value + */ + public String filePath() { + return this.filePath; + } + + /** + * Set file path. + * + * @param filePath the filePath value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Get module memory size. + * + * @return the moduleMemorySize value + */ + public Integer moduleMemorySize() { + return this.moduleMemorySize; + } + + /** + * Set module memory size. + * + * @param moduleMemorySize the moduleMemorySize value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withModuleMemorySize(Integer moduleMemorySize) { + this.moduleMemorySize = moduleMemorySize; + return this; + } + + /** + * Get file version. + * + * @return the fileVersion value + */ + public String fileVersion() { + return this.fileVersion; + } + + /** + * Set file version. + * + * @param fileVersion the fileVersion value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withFileVersion(String fileVersion) { + this.fileVersion = fileVersion; + return this; + } + + /** + * Get file description. + * + * @return the fileDescription value + */ + public String fileDescription() { + return this.fileDescription; + } + + /** + * Set file description. + * + * @param fileDescription the fileDescription value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withFileDescription(String fileDescription) { + this.fileDescription = fileDescription; + return this; + } + + /** + * Get product name. + * + * @return the product value + */ + public String product() { + return this.product; + } + + /** + * Set product name. + * + * @param product the product value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get product version. + * + * @return the productVersion value + */ + public String productVersion() { + return this.productVersion; + } + + /** + * Set product version. + * + * @param productVersion the productVersion value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withProductVersion(String productVersion) { + this.productVersion = productVersion; + return this; + } + + /** + * Get is debug?. + * + * @return the isDebug value + */ + public Boolean isDebug() { + return this.isDebug; + } + + /** + * Set is debug?. + * + * @param isDebug the isDebug value to set + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withIsDebug(Boolean isDebug) { + this.isDebug = isDebug; + return this; + } + + /** + * Get module language (locale). + * + * @return the language value + */ + public String language() { + return this.language; + } + + /** + * Set module language (locale). + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessThreadInfoImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessThreadInfoImpl.java new file mode 100644 index 0000000000000..a213a6ef6fe56 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessThreadInfoImpl.java @@ -0,0 +1,111 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ProcessThreadInfo; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; + +class ProcessThreadInfoImpl extends WrapperImpl implements ProcessThreadInfo { + private final CertificateRegistrationManager manager; + + ProcessThreadInfoImpl(ProcessThreadInfoInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public Integer basePriority() { + return this.inner().basePriority(); + } + + @Override + public Integer currentPriority() { + return this.inner().currentPriority(); + } + + @Override + public String href() { + return this.inner().href(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Integer identifier() { + return this.inner().identifier(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String priorityLevel() { + return this.inner().priorityLevel(); + } + + @Override + public String process() { + return this.inner().process(); + } + + @Override + public String startAddress() { + return this.inner().startAddress(); + } + + @Override + public DateTime startTime() { + return this.inner().startTime(); + } + + @Override + public String state() { + return this.inner().state(); + } + + @Override + public String totalProcessorTime() { + return this.inner().totalProcessorTime(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String userProcessorTime() { + return this.inner().userProcessorTime(); + } + + @Override + public String waitReason() { + return this.inner().waitReason(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessThreadInfoInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessThreadInfoInner.java new file mode 100644 index 0000000000000..82c96f64630a3 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProcessThreadInfoInner.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.appservice.v2019_08_01.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Process Thread Information. + */ +@JsonFlatten +public class ProcessThreadInfoInner extends ProxyOnlyResource { + /** + * Site extension ID. + */ + @JsonProperty(value = "properties.identifier", access = JsonProperty.Access.WRITE_ONLY) + private Integer identifier; + + /** + * HRef URI. + */ + @JsonProperty(value = "properties.href") + private String href; + + /** + * Process URI. + */ + @JsonProperty(value = "properties.process") + private String process; + + /** + * Start address. + */ + @JsonProperty(value = "properties.start_address") + private String startAddress; + + /** + * Current thread priority. + */ + @JsonProperty(value = "properties.current_priority") + private Integer currentPriority; + + /** + * Thread priority level. + */ + @JsonProperty(value = "properties.priority_level") + private String priorityLevel; + + /** + * Base priority. + */ + @JsonProperty(value = "properties.base_priority") + private Integer basePriority; + + /** + * Start time. + */ + @JsonProperty(value = "properties.start_time") + private DateTime startTime; + + /** + * Total processor time. + */ + @JsonProperty(value = "properties.total_processor_time") + private String totalProcessorTime; + + /** + * User processor time. + */ + @JsonProperty(value = "properties.user_processor_time") + private String userProcessorTime; + + /** + * Thread state. + */ + @JsonProperty(value = "properties.state") + private String state; + + /** + * Wait reason. + */ + @JsonProperty(value = "properties.wait_reason") + private String waitReason; + + /** + * Get site extension ID. + * + * @return the identifier value + */ + public Integer identifier() { + return this.identifier; + } + + /** + * Get hRef URI. + * + * @return the href value + */ + public String href() { + return this.href; + } + + /** + * Set hRef URI. + * + * @param href the href value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withHref(String href) { + this.href = href; + return this; + } + + /** + * Get process URI. + * + * @return the process value + */ + public String process() { + return this.process; + } + + /** + * Set process URI. + * + * @param process the process value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withProcess(String process) { + this.process = process; + return this; + } + + /** + * Get start address. + * + * @return the startAddress value + */ + public String startAddress() { + return this.startAddress; + } + + /** + * Set start address. + * + * @param startAddress the startAddress value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withStartAddress(String startAddress) { + this.startAddress = startAddress; + return this; + } + + /** + * Get current thread priority. + * + * @return the currentPriority value + */ + public Integer currentPriority() { + return this.currentPriority; + } + + /** + * Set current thread priority. + * + * @param currentPriority the currentPriority value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withCurrentPriority(Integer currentPriority) { + this.currentPriority = currentPriority; + return this; + } + + /** + * Get thread priority level. + * + * @return the priorityLevel value + */ + public String priorityLevel() { + return this.priorityLevel; + } + + /** + * Set thread priority level. + * + * @param priorityLevel the priorityLevel value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withPriorityLevel(String priorityLevel) { + this.priorityLevel = priorityLevel; + return this; + } + + /** + * Get base priority. + * + * @return the basePriority value + */ + public Integer basePriority() { + return this.basePriority; + } + + /** + * Set base priority. + * + * @param basePriority the basePriority value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withBasePriority(Integer basePriority) { + this.basePriority = basePriority; + return this; + } + + /** + * Get start time. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set start time. + * + * @param startTime the startTime value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get total processor time. + * + * @return the totalProcessorTime value + */ + public String totalProcessorTime() { + return this.totalProcessorTime; + } + + /** + * Set total processor time. + * + * @param totalProcessorTime the totalProcessorTime value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withTotalProcessorTime(String totalProcessorTime) { + this.totalProcessorTime = totalProcessorTime; + return this; + } + + /** + * Get user processor time. + * + * @return the userProcessorTime value + */ + public String userProcessorTime() { + return this.userProcessorTime; + } + + /** + * Set user processor time. + * + * @param userProcessorTime the userProcessorTime value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withUserProcessorTime(String userProcessorTime) { + this.userProcessorTime = userProcessorTime; + return this; + } + + /** + * Get thread state. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Set thread state. + * + * @param state the state value to set + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withState(String state) { + this.state = state; + return this; + } + + /** + * Get wait reason. + * + * @return the waitReason value + */ + public String waitReason() { + return this.waitReason; + } + + /** + * Set wait reason. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProvidersImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProvidersImpl.java new file mode 100644 index 0000000000000..27b2ada2c31d3 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProvidersImpl.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.Providers; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.appservice.v2019_08_01.ApplicationStackResource; +import com.microsoft.azure.management.appservice.v2019_08_01.CsmOperationDescription; + +class ProvidersImpl extends WrapperImpl implements Providers { + private final CertificateRegistrationManager manager; + + ProvidersImpl(CertificateRegistrationManager manager) { + super(manager.inner().providers()); + this.manager = manager; + } + + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable getAvailableStacksAsync() { + ProvidersInner client = this.inner(); + return client.getAvailableStacksAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ApplicationStackResource call(ApplicationStackResourceInner inner) { + return new ApplicationStackResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync() { + ProvidersInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ApplicationStackResource call(ApplicationStackResourceInner inner) { + return new ApplicationStackResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable listOperationsAsync() { + ProvidersInner client = this.inner(); + return client.listOperationsAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public CsmOperationDescription call(CsmOperationDescriptionInner inner) { + return new CsmOperationDescriptionImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProvidersInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProvidersInner.java new file mode 100644 index 0000000000000..7223e766a6dc0 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ProvidersInner.java @@ -0,0 +1,982 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.appservice.v2019_08_01.DefaultErrorResponseException; +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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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. + * Description for Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationStackResourceInner> 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. + * Description for 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. + * Description for Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackResourceInner> 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. + * Description for Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackResourceInner> 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. + * Description for Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationStackResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getAvailableStacksSinglePageAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String osTypeSelected = null; + return service.getAvailableStacks(osTypeSelected, this.client.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. + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected Possible values include: 'Windows', 'Linux', 'WindowsFunctions', 'LinuxFunctions' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationStackResourceInner> 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. + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected Possible values include: 'Windows', 'Linux', 'WindowsFunctions', 'LinuxFunctions' + * @param serviceCallback 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. + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected Possible values include: 'Windows', 'Linux', 'WindowsFunctions', 'LinuxFunctions' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackResourceInner> 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. + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected Possible values include: 'Windows', 'Linux', 'WindowsFunctions', 'LinuxFunctions' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackResourceInner> 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. + * Description for Get available application frameworks and their versions. + * + ServiceResponse> * @param osTypeSelected Possible values include: 'Windows', 'Linux', 'WindowsFunctions', 'LinuxFunctions' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationStackResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getAvailableStacksSinglePageAsync(final String osTypeSelected) { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getAvailableStacks(osTypeSelected, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * Description for Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listOperations(this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get available application frameworks and their versions. + * Description for Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationStackResourceInner> 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. + * Description for 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. + * Description for Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackResourceInner> 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. + * Description for Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackResourceInner> 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. + * Description for Get available application frameworks and their versions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationStackResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String osTypeSelected = null; + return service.list(this.client.subscriptionId(), osTypeSelected, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get available application frameworks and their versions. + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected Possible values include: 'Windows', 'Linux', 'WindowsFunctions', 'LinuxFunctions' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationStackResourceInner> 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. + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected Possible values include: 'Windows', 'Linux', 'WindowsFunctions', 'LinuxFunctions' + * @param serviceCallback 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. + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected Possible values include: 'Windows', 'Linux', 'WindowsFunctions', 'LinuxFunctions' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackResourceInner> 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. + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected Possible values include: 'Windows', 'Linux', 'WindowsFunctions', 'LinuxFunctions' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ApplicationStackResourceInner> 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. + * Description for Get available application frameworks and their versions. + * + ServiceResponse> * @param osTypeSelected Possible values include: 'Windows', 'Linux', 'WindowsFunctions', 'LinuxFunctions' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ApplicationStackResourceInner> 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), osTypeSelected, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get available application frameworks and their versions. + * Description for 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationStackResourceInner> 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. + * Description for 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. + * Description for 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<ApplicationStackResourceInner> 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. + * Description for 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<ApplicationStackResourceInner> 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. + * Description for 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<ApplicationStackResourceInner> 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all available operations for the Microsoft.Web resource provider. Also exposes resource metric definitions. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get available application frameworks and their versions. + * Description for 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ApplicationStackResourceInner> 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. + * Description for 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. + * Description for 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<ApplicationStackResourceInner> 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. + * Description for 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<ApplicationStackResourceInner> 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. + * Description for 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<ApplicationStackResourceInner> 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PublicCertificateImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PublicCertificateImpl.java new file mode 100644 index 0000000000000..729892206862f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PublicCertificateImpl.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.PublicCertificate; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.PublicCertificateLocation; + +class PublicCertificateImpl extends CreatableUpdatableImpl implements PublicCertificate, PublicCertificate.Definition, PublicCertificate.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String publicCertificateName; + + PublicCertificateImpl(String name, CertificateRegistrationManager manager) { + super(name, new PublicCertificateInner()); + this.manager = manager; + // Set resource name + this.publicCertificateName = name; + // + } + + PublicCertificateImpl(PublicCertificateInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.publicCertificateName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.publicCertificateName = IdParsingUtils.getValueFromIdByName(inner.id(), "publicCertificates"); + // + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.createOrUpdatePublicCertificateAsync(this.resourceGroupName, this.name, this.publicCertificateName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.createOrUpdatePublicCertificateAsync(this.resourceGroupName, this.name, this.publicCertificateName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getPublicCertificateAsync(this.resourceGroupName, this.name, this.publicCertificateName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public byte[] blob() { + return this.inner().blob(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public PublicCertificateLocation publicCertificateLocation() { + return this.inner().publicCertificateLocation(); + } + + @Override + public String thumbprint() { + return this.inner().thumbprint(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public PublicCertificateImpl withExistingSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + @Override + public PublicCertificateImpl withBlob(byte[] blob) { + this.inner().withBlob(blob); + return this; + } + + @Override + public PublicCertificateImpl withKind(String kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public PublicCertificateImpl withPublicCertificateLocation(PublicCertificateLocation publicCertificateLocation) { + this.inner().withPublicCertificateLocation(publicCertificateLocation); + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PublicCertificateInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PublicCertificateInner.java new file mode 100644 index 0000000000000..898c8907d2dbe --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.PublicCertificateLocation; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 public Certificate byte array. + * + * @return the blob value + */ + public byte[] blob() { + return this.blob; + } + + /** + * Set public Certificate byte array. + * + * @param blob the blob value to set + * @return the PublicCertificateInner object itself. + */ + public PublicCertificateInner withBlob(byte[] blob) { + this.blob = blob; + return this; + } + + /** + * Get public Certificate Location. Possible values include: 'CurrentUserMy', 'LocalMachineMy', 'Unknown'. + * + * @return the publicCertificateLocation value + */ + public PublicCertificateLocation publicCertificateLocation() { + return this.publicCertificateLocation; + } + + /** + * Set public Certificate Location. Possible values include: 'CurrentUserMy', 'LocalMachineMy', 'Unknown'. + * + * @param publicCertificateLocation the publicCertificateLocation value to set + * @return the PublicCertificateInner object itself. + */ + public PublicCertificateInner withPublicCertificateLocation(PublicCertificateLocation publicCertificateLocation) { + this.publicCertificateLocation = publicCertificateLocation; + return this; + } + + /** + * Get certificate Thumbprint. + * + * @return the thumbprint value + */ + public String thumbprint() { + return this.thumbprint; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PushSettingsImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PushSettingsImpl.java new file mode 100644 index 0000000000000..778dcbcc44f43 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PushSettingsImpl.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.PushSettings; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class PushSettingsImpl extends WrapperImpl implements PushSettings { + private final CertificateRegistrationManager manager; + PushSettingsImpl(PushSettingsInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String dynamicTagsJson() { + return this.inner().dynamicTagsJson(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public boolean isPushEnabled() { + return this.inner().isPushEnabled(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String tagsRequiringAuth() { + return this.inner().tagsRequiringAuth(); + } + + @Override + public String tagWhitelistJson() { + return this.inner().tagWhitelistJson(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PushSettingsInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PushSettingsInner.java new file mode 100644 index 0000000000000..6581c02a81962 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/PushSettingsInner.java @@ -0,0 +1,136 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 gets or sets a flag indicating whether the Push endpoint is enabled. + * + * @return the isPushEnabled value + */ + public boolean isPushEnabled() { + return this.isPushEnabled; + } + + /** + * Set gets or sets a flag indicating whether the Push endpoint is enabled. + * + * @param isPushEnabled the isPushEnabled value to set + * @return the PushSettingsInner object itself. + */ + public PushSettingsInner withIsPushEnabled(boolean isPushEnabled) { + this.isPushEnabled = isPushEnabled; + return this; + } + + /** + * Get gets or sets a JSON string containing a list of tags that are whitelisted for use by the push registration endpoint. + * + * @return the tagWhitelistJson value + */ + public String tagWhitelistJson() { + return this.tagWhitelistJson; + } + + /** + * Set gets or sets a JSON string containing a list of tags that are whitelisted for use by the push registration endpoint. + * + * @param tagWhitelistJson the tagWhitelistJson value to set + * @return the PushSettingsInner object itself. + */ + public PushSettingsInner withTagWhitelistJson(String tagWhitelistJson) { + this.tagWhitelistJson = tagWhitelistJson; + return this; + } + + /** + * Get 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. + * + * @return the tagsRequiringAuth value + */ + public String tagsRequiringAuth() { + return this.tagsRequiringAuth; + } + + /** + * Set 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. + * + * @param tagsRequiringAuth the tagsRequiringAuth value to set + * @return the PushSettingsInner object itself. + */ + public PushSettingsInner withTagsRequiringAuth(String tagsRequiringAuth) { + this.tagsRequiringAuth = tagsRequiringAuth; + return this; + } + + /** + * Get gets or sets a JSON string containing a list of dynamic tags that will be evaluated from user claims in the push registration endpoint. + * + * @return the dynamicTagsJson value + */ + public String dynamicTagsJson() { + return this.dynamicTagsJson; + } + + /** + * Set gets or sets a JSON string containing a list of dynamic tags that will be evaluated from user claims in the push registration endpoint. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationImpl.java new file mode 100644 index 0000000000000..d7265faec274a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationImpl.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.Recommendation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.Channels; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.NotificationLevel; +import java.util.UUID; +import com.microsoft.azure.management.appservice.v2019_08_01.ResourceScopeType; + +class RecommendationImpl extends WrapperImpl implements Recommendation { + private final CertificateRegistrationManager manager; + + RecommendationImpl(RecommendationInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public String actionName() { + return this.inner().actionName(); + } + + @Override + public String bladeName() { + return this.inner().bladeName(); + } + + @Override + public List categoryTags() { + return this.inner().categoryTags(); + } + + @Override + public Channels channels() { + return this.inner().channels(); + } + + @Override + public DateTime creationTime() { + return this.inner().creationTime(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public Integer enabled() { + return this.inner().enabled(); + } + + @Override + public DateTime endTime() { + return this.inner().endTime(); + } + + @Override + public String extensionName() { + return this.inner().extensionName(); + } + + @Override + public String forwardLink() { + return this.inner().forwardLink(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Boolean isDynamic() { + return this.inner().isDynamic(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public NotificationLevel level() { + return this.inner().level(); + } + + @Override + public String message() { + return this.inner().message(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public DateTime nextNotificationTime() { + return this.inner().nextNotificationTime(); + } + + @Override + public DateTime notificationExpirationTime() { + return this.inner().notificationExpirationTime(); + } + + @Override + public DateTime notifiedTime() { + return this.inner().notifiedTime(); + } + + @Override + public UUID recommendationId() { + return this.inner().recommendationId(); + } + + @Override + public String resourceId() { + return this.inner().resourceId(); + } + + @Override + public ResourceScopeType resourceScope() { + return this.inner().resourceScope(); + } + + @Override + public String ruleName() { + return this.inner().ruleName(); + } + + @Override + public Double score() { + return this.inner().score(); + } + + @Override + public DateTime startTime() { + return this.inner().startTime(); + } + + @Override + public List states() { + return this.inner().states(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationInner.java new file mode 100644 index 0000000000000..a72adc6ac9124 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationInner.java @@ -0,0 +1,623 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import org.joda.time.DateTime; +import java.util.UUID; +import com.microsoft.azure.management.appservice.v2019_08_01.ResourceScopeType; +import com.microsoft.azure.management.appservice.v2019_08_01.NotificationLevel; +import com.microsoft.azure.management.appservice.v2019_08_01.Channels; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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.categoryTags", access = JsonProperty.Access.WRITE_ONLY) + private List categoryTags; + + /** + * Name of action recommended by this object. + */ + @JsonProperty(value = "properties.actionName") + private String actionName; + + /** + * True if this recommendation is still valid (i.e. "actionable"). False if + * it is invalid. + */ + @JsonProperty(value = "properties.enabled") + private Integer enabled; + + /** + * The list of states of this recommendation. If it's null then it should + * be considered "Active". + */ + @JsonProperty(value = "properties.states") + private List states; + + /** + * 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 timestamp when this instance was created. + * + * @return the creationTime value + */ + public DateTime creationTime() { + return this.creationTime; + } + + /** + * Set timestamp when this instance was created. + * + * @param creationTime the creationTime value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withCreationTime(DateTime creationTime) { + this.creationTime = creationTime; + return this; + } + + /** + * Get a GUID value that each recommendation object is associated with. + * + * @return the recommendationId value + */ + public UUID recommendationId() { + return this.recommendationId; + } + + /** + * Set a GUID value that each recommendation object is associated with. + * + * @param recommendationId the recommendationId value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withRecommendationId(UUID recommendationId) { + this.recommendationId = recommendationId; + return this; + } + + /** + * Get full ARM resource ID string that this recommendation object is associated with. + * + * @return the resourceId value + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set full ARM resource ID string that this recommendation object is associated with. + * + * @param resourceId the resourceId value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. Possible values include: 'ServerFarm', 'Subscription', 'WebSite'. + * + * @return the resourceScope value + */ + public ResourceScopeType resourceScope() { + return this.resourceScope; + } + + /** + * Set name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. Possible values include: 'ServerFarm', 'Subscription', 'WebSite'. + * + * @param resourceScope the resourceScope value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withResourceScope(ResourceScopeType resourceScope) { + this.resourceScope = resourceScope; + return this; + } + + /** + * Get unique name of the rule. + * + * @return the ruleName value + */ + public String ruleName() { + return this.ruleName; + } + + /** + * Set unique name of the rule. + * + * @param ruleName the ruleName value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withRuleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + + /** + * Get uI friendly name of the rule (may not be unique). + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set uI friendly name of the rule (may not be unique). + * + * @param displayName the displayName value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get recommendation text. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set recommendation text. + * + * @param message the message value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get level indicating how critical this recommendation can impact. Possible values include: 'Critical', 'Warning', 'Information', 'NonUrgentSuggestion'. + * + * @return the level value + */ + public NotificationLevel level() { + return this.level; + } + + /** + * Set level indicating how critical this recommendation can impact. Possible values include: 'Critical', 'Warning', 'Information', 'NonUrgentSuggestion'. + * + * @param level the level value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withLevel(NotificationLevel level) { + this.level = level; + return this; + } + + /** + * Get list of channels that this recommendation can apply. Possible values include: 'Notification', 'Api', 'Email', 'Webhook', 'All'. + * + * @return the channels value + */ + public Channels channels() { + return this.channels; + } + + /** + * Set list of channels that this recommendation can apply. Possible values include: 'Notification', 'Api', 'Email', 'Webhook', 'All'. + * + * @param channels the channels value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withChannels(Channels channels) { + this.channels = channels; + return this; + } + + /** + * Get the list of category tags that this recommendation belongs to. + * + * @return the categoryTags value + */ + public List categoryTags() { + return this.categoryTags; + } + + /** + * Get name of action recommended by this object. + * + * @return the actionName value + */ + public String actionName() { + return this.actionName; + } + + /** + * Set name of action recommended by this object. + * + * @param actionName the actionName value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withActionName(String actionName) { + this.actionName = actionName; + return this; + } + + /** + * Get true if this recommendation is still valid (i.e. "actionable"). False if it is invalid. + * + * @return the enabled value + */ + public Integer enabled() { + return this.enabled; + } + + /** + * Set true if this recommendation is still valid (i.e. "actionable"). False if it is invalid. + * + * @param enabled the enabled value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withEnabled(Integer enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the list of states of this recommendation. If it's null then it should be considered "Active". + * + * @return the states value + */ + public List states() { + return this.states; + } + + /** + * Set the list of states of this recommendation. If it's null then it should be considered "Active". + * + * @param states the states value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withStates(List states) { + this.states = states; + return this; + } + + /** + * Get the beginning time in UTC of a range that the recommendation refers to. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the beginning time in UTC of a range that the recommendation refers to. + * + * @param startTime the startTime value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the end time in UTC of a range that the recommendation refers to. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set the end time in UTC of a range that the recommendation refers to. + * + * @param endTime the endTime value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get when to notify this recommendation next in UTC. Null means that this will never be notified anymore. + * + * @return the nextNotificationTime value + */ + public DateTime nextNotificationTime() { + return this.nextNotificationTime; + } + + /** + * Set when to notify this recommendation next in UTC. Null means that this will never be notified anymore. + * + * @param nextNotificationTime the nextNotificationTime value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withNextNotificationTime(DateTime nextNotificationTime) { + this.nextNotificationTime = nextNotificationTime; + return this; + } + + /** + * Get date and time in UTC when this notification expires. + * + * @return the notificationExpirationTime value + */ + public DateTime notificationExpirationTime() { + return this.notificationExpirationTime; + } + + /** + * Set date and time in UTC when this notification expires. + * + * @param notificationExpirationTime the notificationExpirationTime value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withNotificationExpirationTime(DateTime notificationExpirationTime) { + this.notificationExpirationTime = notificationExpirationTime; + return this; + } + + /** + * Get last timestamp in UTC this instance was actually notified. Null means that this recommendation hasn't been notified yet. + * + * @return the notifiedTime value + */ + public DateTime notifiedTime() { + return this.notifiedTime; + } + + /** + * Set last timestamp in UTC this instance was actually notified. Null means that this recommendation hasn't been notified yet. + * + * @param notifiedTime the notifiedTime value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withNotifiedTime(DateTime notifiedTime) { + this.notifiedTime = notifiedTime; + return this; + } + + /** + * Get a metric value measured by the rule. + * + * @return the score value + */ + public Double score() { + return this.score; + } + + /** + * Set a metric value measured by the rule. + * + * @param score the score value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withScore(Double score) { + this.score = score; + return this; + } + + /** + * Get true if this is associated with a dynamically added rule. + * + * @return the isDynamic value + */ + public Boolean isDynamic() { + return this.isDynamic; + } + + /** + * Set true if this is associated with a dynamically added rule. + * + * @param isDynamic the isDynamic value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withIsDynamic(Boolean isDynamic) { + this.isDynamic = isDynamic; + return this; + } + + /** + * Get extension name of the portal if exists. + * + * @return the extensionName value + */ + public String extensionName() { + return this.extensionName; + } + + /** + * Set extension name of the portal if exists. + * + * @param extensionName the extensionName value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withExtensionName(String extensionName) { + this.extensionName = extensionName; + return this; + } + + /** + * Get deep link to a blade on the portal. + * + * @return the bladeName value + */ + public String bladeName() { + return this.bladeName; + } + + /** + * Set deep link to a blade on the portal. + * + * @param bladeName the bladeName value to set + * @return the RecommendationInner object itself. + */ + public RecommendationInner withBladeName(String bladeName) { + this.bladeName = bladeName; + return this; + } + + /** + * Get forward link to an external document associated with the rule. + * + * @return the forwardLink value + */ + public String forwardLink() { + return this.forwardLink; + } + + /** + * Set forward link to an external document associated with the rule. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationRuleImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationRuleImpl.java new file mode 100644 index 0000000000000..6a7679400355f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationRuleImpl.java @@ -0,0 +1,115 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.RecommendationRule; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.Channels; +import com.microsoft.azure.management.appservice.v2019_08_01.NotificationLevel; +import java.util.UUID; + +class RecommendationRuleImpl extends WrapperImpl implements RecommendationRule { + private final CertificateRegistrationManager manager; + RecommendationRuleImpl(RecommendationRuleInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String actionName() { + return this.inner().actionName(); + } + + @Override + public String bladeName() { + return this.inner().bladeName(); + } + + @Override + public List categoryTags() { + return this.inner().categoryTags(); + } + + @Override + public Channels channels() { + return this.inner().channels(); + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public String extensionName() { + return this.inner().extensionName(); + } + + @Override + public String forwardLink() { + return this.inner().forwardLink(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Boolean isDynamic() { + return this.inner().isDynamic(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public NotificationLevel level() { + return this.inner().level(); + } + + @Override + public String message() { + return this.inner().message(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public UUID recommendationId() { + return this.inner().recommendationId(); + } + + @Override + public String recommendationName() { + return this.inner().recommendationName(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationRuleInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationRuleInner.java new file mode 100644 index 0000000000000..d0d86b2eb549b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationRuleInner.java @@ -0,0 +1,358 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import java.util.UUID; +import com.microsoft.azure.management.appservice.v2019_08_01.NotificationLevel; +import com.microsoft.azure.management.appservice.v2019_08_01.Channels; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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.recommendationName") + private String recommendationName; + + /** + * 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; + + /** + * The list of category tags that this recommendation rule belongs to. + */ + @JsonProperty(value = "properties.categoryTags", access = JsonProperty.Access.WRITE_ONLY) + private List categoryTags; + + /** + * 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 unique name of the rule. + * + * @return the recommendationName value + */ + public String recommendationName() { + return this.recommendationName; + } + + /** + * Set unique name of the rule. + * + * @param recommendationName the recommendationName value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withRecommendationName(String recommendationName) { + this.recommendationName = recommendationName; + return this; + } + + /** + * Get uI friendly name of the rule. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set uI friendly name of the rule. + * + * @param displayName the displayName value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get localized name of the rule (Good for UI). + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set localized name of the rule (Good for UI). + * + * @param message the message value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get 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. + * + * @return the recommendationId value + */ + public UUID recommendationId() { + return this.recommendationId; + } + + /** + * Set 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. + * + * @param recommendationId the recommendationId value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withRecommendationId(UUID recommendationId) { + this.recommendationId = recommendationId; + return this; + } + + /** + * Get localized detailed description of the rule. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set localized detailed description of the rule. + * + * @param description the description value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get name of action that is recommended by this rule in string. + * + * @return the actionName value + */ + public String actionName() { + return this.actionName; + } + + /** + * Set name of action that is recommended by this rule in string. + * + * @param actionName the actionName value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withActionName(String actionName) { + this.actionName = actionName; + return this; + } + + /** + * Get level of impact indicating how critical this rule is. Possible values include: 'Critical', 'Warning', 'Information', 'NonUrgentSuggestion'. + * + * @return the level value + */ + public NotificationLevel level() { + return this.level; + } + + /** + * Set level of impact indicating how critical this rule is. Possible values include: 'Critical', 'Warning', 'Information', 'NonUrgentSuggestion'. + * + * @param level the level value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withLevel(NotificationLevel level) { + this.level = level; + return this; + } + + /** + * Get list of available channels that this rule applies. Possible values include: 'Notification', 'Api', 'Email', 'Webhook', 'All'. + * + * @return the channels value + */ + public Channels channels() { + return this.channels; + } + + /** + * Set list of available channels that this rule applies. Possible values include: 'Notification', 'Api', 'Email', 'Webhook', 'All'. + * + * @param channels the channels value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withChannels(Channels channels) { + this.channels = channels; + return this; + } + + /** + * Get the list of category tags that this recommendation rule belongs to. + * + * @return the categoryTags value + */ + public List categoryTags() { + return this.categoryTags; + } + + /** + * Get true if this is associated with a dynamically added rule. + * + * @return the isDynamic value + */ + public Boolean isDynamic() { + return this.isDynamic; + } + + /** + * Set true if this is associated with a dynamically added rule. + * + * @param isDynamic the isDynamic value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withIsDynamic(Boolean isDynamic) { + this.isDynamic = isDynamic; + return this; + } + + /** + * Get extension name of the portal if exists. Applicable to dynamic rule only. + * + * @return the extensionName value + */ + public String extensionName() { + return this.extensionName; + } + + /** + * Set extension name of the portal if exists. Applicable to dynamic rule only. + * + * @param extensionName the extensionName value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withExtensionName(String extensionName) { + this.extensionName = extensionName; + return this; + } + + /** + * Get deep link to a blade on the portal. Applicable to dynamic rule only. + * + * @return the bladeName value + */ + public String bladeName() { + return this.bladeName; + } + + /** + * Set deep link to a blade on the portal. Applicable to dynamic rule only. + * + * @param bladeName the bladeName value to set + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withBladeName(String bladeName) { + this.bladeName = bladeName; + return this; + } + + /** + * Get forward link to an external document associated with the rule. Applicable to dynamic rule only. + * + * @return the forwardLink value + */ + public String forwardLink() { + return this.forwardLink; + } + + /** + * Set forward link to an external document associated with the rule. Applicable to dynamic rule only. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationsImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationsImpl.java new file mode 100644 index 0000000000000..6fab20775be7c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationsImpl.java @@ -0,0 +1,214 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * jkl + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.Recommendations; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import rx.Completable; +import com.microsoft.azure.management.appservice.v2019_08_01.Recommendation; +import com.microsoft.azure.management.appservice.v2019_08_01.RecommendationRule; +import com.microsoft.azure.arm.utils.PagedListConverter; + +class RecommendationsImpl extends WrapperImpl implements Recommendations { + private PagedListConverter converter; + private final CertificateRegistrationManager manager; + + RecommendationsImpl(CertificateRegistrationManager manager) { + super(manager.inner().recommendations()); + this.manager = manager; + this.converter = new PagedListConverter() { + @Override + public Observable typeConvertAsync(RecommendationInner inner) { + return Observable.just((Recommendation) wrapModel(inner)); + } + }; + } + + public CertificateRegistrationManager manager() { + return this.manager; + } + + private RecommendationImpl wrapModel(RecommendationInner inner) { + return new RecommendationImpl(inner, manager()); + } + + @Override + public Completable resetAllFiltersAsync() { + RecommendationsInner client = this.inner(); + return client.resetAllFiltersAsync().toCompletable(); + } + + @Override + public Completable disableRecommendationForSubscriptionAsync(String name) { + RecommendationsInner client = this.inner(); + return client.disableRecommendationForSubscriptionAsync(name).toCompletable(); + } + + @Override + public Observable listRecommendedRulesForHostingEnvironmentAsync(final String resourceGroupName, final String hostingEnvironmentName) { + RecommendationsInner client = this.inner(); + return client.listRecommendedRulesForHostingEnvironmentAsync(resourceGroupName, hostingEnvironmentName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Recommendation call(RecommendationInner inner) { + return new RecommendationImpl(inner, manager()); + } + }); + } + + @Override + public Completable disableAllForHostingEnvironmentAsync(String resourceGroupName, String hostingEnvironmentName, String environmentName) { + RecommendationsInner client = this.inner(); + return client.disableAllForHostingEnvironmentAsync(resourceGroupName, hostingEnvironmentName, environmentName).toCompletable(); + } + + @Override + public Completable resetAllFiltersForHostingEnvironmentAsync(String resourceGroupName, String hostingEnvironmentName, String environmentName) { + RecommendationsInner client = this.inner(); + return client.resetAllFiltersForHostingEnvironmentAsync(resourceGroupName, hostingEnvironmentName, environmentName).toCompletable(); + } + + @Override + public Observable getRuleDetailsByHostingEnvironmentAsync(String resourceGroupName, String hostingEnvironmentName, String name) { + RecommendationsInner client = this.inner(); + return client.getRuleDetailsByHostingEnvironmentAsync(resourceGroupName, hostingEnvironmentName, name) + .map(new Func1() { + @Override + public RecommendationRule call(RecommendationRuleInner inner) { + return new RecommendationRuleImpl(inner, manager()); + } + }); + } + + @Override + public Completable disableRecommendationForHostingEnvironmentAsync(String resourceGroupName, String name, String hostingEnvironmentName, String environmentName) { + RecommendationsInner client = this.inner(); + return client.disableRecommendationForHostingEnvironmentAsync(resourceGroupName, name, hostingEnvironmentName, environmentName).toCompletable(); + } + + @Override + public Observable listRecommendedRulesForWebAppAsync(final String resourceGroupName, final String siteName) { + RecommendationsInner client = this.inner(); + return client.listRecommendedRulesForWebAppAsync(resourceGroupName, siteName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Recommendation call(RecommendationInner inner) { + return new RecommendationImpl(inner, manager()); + } + }); + } + + @Override + public Completable disableAllForWebAppAsync(String resourceGroupName, String siteName) { + RecommendationsInner client = this.inner(); + return client.disableAllForWebAppAsync(resourceGroupName, siteName).toCompletable(); + } + + @Override + public Completable resetAllFiltersForWebAppAsync(String resourceGroupName, String siteName) { + RecommendationsInner client = this.inner(); + return client.resetAllFiltersForWebAppAsync(resourceGroupName, siteName).toCompletable(); + } + + @Override + public Observable getRuleDetailsByWebAppAsync(String resourceGroupName, String siteName, String name) { + RecommendationsInner client = this.inner(); + return client.getRuleDetailsByWebAppAsync(resourceGroupName, siteName, name) + .map(new Func1() { + @Override + public RecommendationRule call(RecommendationRuleInner inner) { + return new RecommendationRuleImpl(inner, manager()); + } + }); + } + + @Override + public Completable disableRecommendationForSiteAsync(String resourceGroupName, String siteName, String name) { + RecommendationsInner client = this.inner(); + return client.disableRecommendationForSiteAsync(resourceGroupName, siteName, name).toCompletable(); + } + + @Override + public PagedList list() { + RecommendationsInner client = this.inner(); + return converter.convert(client.list()); + } + + @Override + public Observable listAsync() { + RecommendationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Recommendation call(RecommendationInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable listHistoryForHostingEnvironmentAsync(final String resourceGroupName, final String hostingEnvironmentName) { + RecommendationsInner client = this.inner(); + return client.listHistoryForHostingEnvironmentAsync(resourceGroupName, hostingEnvironmentName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Recommendation call(RecommendationInner inner) { + return new RecommendationImpl(inner, manager()); + } + }); + } + + @Override + public Observable listHistoryForWebAppAsync(final String resourceGroupName, final String siteName) { + RecommendationsInner client = this.inner(); + return client.listHistoryForWebAppAsync(resourceGroupName, siteName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Recommendation call(RecommendationInner inner) { + return new RecommendationImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationsInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationsInner.java new file mode 100644 index 0000000000000..059ad2c499234 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RecommendationsInner.java @@ -0,0 +1,3116 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.appservice.v2019_08_01.DefaultErrorResponseException; +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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.Recommendations listHistoryForHostingEnvironment" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory") + Observable> listHistoryForHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("hostingEnvironmentName") String hostingEnvironmentName, @Path("subscriptionId") String subscriptionId, @Query("expiredOnly") Boolean expiredOnly, @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.appservice.v2019_08_01.Recommendations listRecommendedRulesForHostingEnvironment" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations") + Observable> listRecommendedRulesForHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("hostingEnvironmentName") String hostingEnvironmentName, @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.appservice.v2019_08_01.Recommendations disableAllForHostingEnvironment" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable") + Observable> disableAllForHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("hostingEnvironmentName") String hostingEnvironmentName, @Path("subscriptionId") String subscriptionId, @Query("environmentName") String environmentName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.Recommendations resetAllFiltersForHostingEnvironment" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset") + Observable> resetAllFiltersForHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("hostingEnvironmentName") String hostingEnvironmentName, @Path("subscriptionId") String subscriptionId, @Query("environmentName") String environmentName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.Recommendations getRuleDetailsByHostingEnvironment" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}") + Observable> getRuleDetailsByHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("hostingEnvironmentName") String hostingEnvironmentName, @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.appservice.v2019_08_01.Recommendations disableRecommendationForHostingEnvironment" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable") + Observable> disableRecommendationForHostingEnvironment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("hostingEnvironmentName") String hostingEnvironmentName, @Path("subscriptionId") String subscriptionId, @Query("environmentName") String environmentName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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("expiredOnly") Boolean expiredOnly, @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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.Recommendations listHistoryForHostingEnvironmentNext" }) + @GET + Observable> listHistoryForHostingEnvironmentNext(@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.appservice.v2019_08_01.Recommendations listRecommendedRulesForHostingEnvironmentNext" }) + @GET + Observable> listRecommendedRulesForHostingEnvironmentNext(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.Recommendations listRecommendedRulesForWebAppNext" }) + @GET + Observable> listRecommendedRulesForWebAppNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List all recommendations for a subscription. + * Description for List all recommendations for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean featured = null; + final String filter = null; + return service.list(this.client.subscriptionId(), featured, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * List all recommendations for a subscription. + * Description for 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=channel 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 DefaultErrorResponseException thrown 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. + * Description for 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=channel 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. + * Description for 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=channel 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. + * Description for 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=channel 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. + * Description for 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=channel 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), featured, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Reset all recommendation opt-out settings for a subscription. + * Description for Reset all recommendation opt-out settings for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.resetAllFilters(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = resetAllFiltersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse resetAllFiltersDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Disables the specified rule so it will not apply to a subscription in the future. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.disableRecommendationForSubscription(name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = disableRecommendationForSubscriptionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse disableRecommendationForSubscriptionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Description for 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 hostingEnvironmentName Name of the hosting environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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 listHistoryForHostingEnvironment(final String resourceGroupName, final String hostingEnvironmentName) { + ServiceResponse> response = listHistoryForHostingEnvironmentSinglePageAsync(resourceGroupName, hostingEnvironmentName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listHistoryForHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Description for 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 hostingEnvironmentName Name of the hosting 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> listHistoryForHostingEnvironmentAsync(final String resourceGroupName, final String hostingEnvironmentName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listHistoryForHostingEnvironmentSinglePageAsync(resourceGroupName, hostingEnvironmentName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listHistoryForHostingEnvironmentNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Description for 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 hostingEnvironmentName Name of the hosting environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable> listHistoryForHostingEnvironmentAsync(final String resourceGroupName, final String hostingEnvironmentName) { + return listHistoryForHostingEnvironmentWithServiceResponseAsync(resourceGroupName, hostingEnvironmentName) + .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. + * Description for 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 hostingEnvironmentName Name of the hosting environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable>> listHistoryForHostingEnvironmentWithServiceResponseAsync(final String resourceGroupName, final String hostingEnvironmentName) { + return listHistoryForHostingEnvironmentSinglePageAsync(resourceGroupName, hostingEnvironmentName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listHistoryForHostingEnvironmentNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Description for 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 hostingEnvironmentName Name of the hosting environment. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RecommendationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listHistoryForHostingEnvironmentSinglePageAsync(final String resourceGroupName, final String hostingEnvironmentName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (hostingEnvironmentName == null) { + throw new IllegalArgumentException("Parameter hostingEnvironmentName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean expiredOnly = null; + final String filter = null; + return service.listHistoryForHostingEnvironment(resourceGroupName, hostingEnvironmentName, this.client.subscriptionId(), expiredOnly, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listHistoryForHostingEnvironmentDelegate(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. + * Description for 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 hostingEnvironmentName Name of the hosting environment. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel 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 DefaultErrorResponseException thrown 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 listHistoryForHostingEnvironment(final String resourceGroupName, final String hostingEnvironmentName, final Boolean expiredOnly, final String filter) { + ServiceResponse> response = listHistoryForHostingEnvironmentSinglePageAsync(resourceGroupName, hostingEnvironmentName, expiredOnly, filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listHistoryForHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Description for 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 hostingEnvironmentName Name of the hosting environment. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel 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> listHistoryForHostingEnvironmentAsync(final String resourceGroupName, final String hostingEnvironmentName, final Boolean expiredOnly, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listHistoryForHostingEnvironmentSinglePageAsync(resourceGroupName, hostingEnvironmentName, expiredOnly, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listHistoryForHostingEnvironmentNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Description for 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 hostingEnvironmentName Name of the hosting environment. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel 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> listHistoryForHostingEnvironmentAsync(final String resourceGroupName, final String hostingEnvironmentName, final Boolean expiredOnly, final String filter) { + return listHistoryForHostingEnvironmentWithServiceResponseAsync(resourceGroupName, hostingEnvironmentName, expiredOnly, 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. + * Description for 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 hostingEnvironmentName Name of the hosting environment. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel 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>> listHistoryForHostingEnvironmentWithServiceResponseAsync(final String resourceGroupName, final String hostingEnvironmentName, final Boolean expiredOnly, final String filter) { + return listHistoryForHostingEnvironmentSinglePageAsync(resourceGroupName, hostingEnvironmentName, expiredOnly, 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(listHistoryForHostingEnvironmentNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Description for 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 hostingEnvironmentName Name of the hosting environment. + ServiceResponse> * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is <code>true</code>, which returns only expired recommendations. + ServiceResponse> * @param filter Filter is specified by using OData syntax. Example: $filter=channel 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>> listHistoryForHostingEnvironmentSinglePageAsync(final String resourceGroupName, final String hostingEnvironmentName, final Boolean expiredOnly, final String filter) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (hostingEnvironmentName == null) { + throw new IllegalArgumentException("Parameter hostingEnvironmentName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listHistoryForHostingEnvironment(resourceGroupName, hostingEnvironmentName, this.client.subscriptionId(), expiredOnly, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listHistoryForHostingEnvironmentDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listHistoryForHostingEnvironmentDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all recommendations for an app. + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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 listRecommendedRulesForHostingEnvironment(final String resourceGroupName, final String hostingEnvironmentName) { + ServiceResponse> response = listRecommendedRulesForHostingEnvironmentSinglePageAsync(resourceGroupName, hostingEnvironmentName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRecommendedRulesForHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all recommendations for an app. + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName 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> listRecommendedRulesForHostingEnvironmentAsync(final String resourceGroupName, final String hostingEnvironmentName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRecommendedRulesForHostingEnvironmentSinglePageAsync(resourceGroupName, hostingEnvironmentName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRecommendedRulesForHostingEnvironmentNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all recommendations for an app. + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable> listRecommendedRulesForHostingEnvironmentAsync(final String resourceGroupName, final String hostingEnvironmentName) { + return listRecommendedRulesForHostingEnvironmentWithServiceResponseAsync(resourceGroupName, hostingEnvironmentName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all recommendations for an app. + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable>> listRecommendedRulesForHostingEnvironmentWithServiceResponseAsync(final String resourceGroupName, final String hostingEnvironmentName) { + return listRecommendedRulesForHostingEnvironmentSinglePageAsync(resourceGroupName, hostingEnvironmentName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listRecommendedRulesForHostingEnvironmentNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all recommendations for an app. + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName 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>> listRecommendedRulesForHostingEnvironmentSinglePageAsync(final String resourceGroupName, final String hostingEnvironmentName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (hostingEnvironmentName == null) { + throw new IllegalArgumentException("Parameter hostingEnvironmentName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean featured = null; + final String filter = null; + return service.listRecommendedRulesForHostingEnvironment(resourceGroupName, hostingEnvironmentName, this.client.subscriptionId(), featured, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRecommendedRulesForHostingEnvironmentDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get all recommendations for an app. + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName 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=channel eq 'Api' or channel eq 'Notification' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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 listRecommendedRulesForHostingEnvironment(final String resourceGroupName, final String hostingEnvironmentName, final Boolean featured, final String filter) { + ServiceResponse> response = listRecommendedRulesForHostingEnvironmentSinglePageAsync(resourceGroupName, hostingEnvironmentName, featured, filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRecommendedRulesForHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all recommendations for an app. + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName 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=channel 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> listRecommendedRulesForHostingEnvironmentAsync(final String resourceGroupName, final String hostingEnvironmentName, final Boolean featured, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRecommendedRulesForHostingEnvironmentSinglePageAsync(resourceGroupName, hostingEnvironmentName, featured, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRecommendedRulesForHostingEnvironmentNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all recommendations for an app. + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName 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=channel eq 'Api' or channel eq 'Notification' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable> listRecommendedRulesForHostingEnvironmentAsync(final String resourceGroupName, final String hostingEnvironmentName, final Boolean featured, final String filter) { + return listRecommendedRulesForHostingEnvironmentWithServiceResponseAsync(resourceGroupName, hostingEnvironmentName, featured, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all recommendations for an app. + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName 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=channel eq 'Api' or channel eq 'Notification' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RecommendationInner> object + */ + public Observable>> listRecommendedRulesForHostingEnvironmentWithServiceResponseAsync(final String resourceGroupName, final String hostingEnvironmentName, final Boolean featured, final String filter) { + return listRecommendedRulesForHostingEnvironmentSinglePageAsync(resourceGroupName, hostingEnvironmentName, 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(listRecommendedRulesForHostingEnvironmentNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all recommendations for an app. + * Description for Get all recommendations for an app. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param hostingEnvironmentName 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=channel 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>> listRecommendedRulesForHostingEnvironmentSinglePageAsync(final String resourceGroupName, final String hostingEnvironmentName, final Boolean featured, final String filter) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (hostingEnvironmentName == null) { + throw new IllegalArgumentException("Parameter hostingEnvironmentName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listRecommendedRulesForHostingEnvironment(resourceGroupName, hostingEnvironmentName, this.client.subscriptionId(), featured, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRecommendedRulesForHostingEnvironmentDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRecommendedRulesForHostingEnvironmentDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Disable all recommendations for an app. + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName the String value + * @param environmentName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void disableAllForHostingEnvironment(String resourceGroupName, String hostingEnvironmentName, String environmentName) { + disableAllForHostingEnvironmentWithServiceResponseAsync(resourceGroupName, hostingEnvironmentName, environmentName).toBlocking().single().body(); + } + + /** + * Disable all recommendations for an app. + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName the String value + * @param environmentName 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 disableAllForHostingEnvironmentAsync(String resourceGroupName, String hostingEnvironmentName, String environmentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(disableAllForHostingEnvironmentWithServiceResponseAsync(resourceGroupName, hostingEnvironmentName, environmentName), serviceCallback); + } + + /** + * Disable all recommendations for an app. + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName the String value + * @param environmentName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable disableAllForHostingEnvironmentAsync(String resourceGroupName, String hostingEnvironmentName, String environmentName) { + return disableAllForHostingEnvironmentWithServiceResponseAsync(resourceGroupName, hostingEnvironmentName, environmentName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Disable all recommendations for an app. + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName the String value + * @param environmentName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> disableAllForHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String hostingEnvironmentName, String environmentName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (hostingEnvironmentName == null) { + throw new IllegalArgumentException("Parameter hostingEnvironmentName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (environmentName == null) { + throw new IllegalArgumentException("Parameter environmentName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.disableAllForHostingEnvironment(resourceGroupName, hostingEnvironmentName, this.client.subscriptionId(), environmentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = disableAllForHostingEnvironmentDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse disableAllForHostingEnvironmentDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Reset all recommendation opt-out settings for an app. + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName the String value + * @param environmentName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void resetAllFiltersForHostingEnvironment(String resourceGroupName, String hostingEnvironmentName, String environmentName) { + resetAllFiltersForHostingEnvironmentWithServiceResponseAsync(resourceGroupName, hostingEnvironmentName, environmentName).toBlocking().single().body(); + } + + /** + * Reset all recommendation opt-out settings for an app. + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName the String value + * @param environmentName 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 resetAllFiltersForHostingEnvironmentAsync(String resourceGroupName, String hostingEnvironmentName, String environmentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetAllFiltersForHostingEnvironmentWithServiceResponseAsync(resourceGroupName, hostingEnvironmentName, environmentName), serviceCallback); + } + + /** + * Reset all recommendation opt-out settings for an app. + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName the String value + * @param environmentName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable resetAllFiltersForHostingEnvironmentAsync(String resourceGroupName, String hostingEnvironmentName, String environmentName) { + return resetAllFiltersForHostingEnvironmentWithServiceResponseAsync(resourceGroupName, hostingEnvironmentName, environmentName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Reset all recommendation opt-out settings for an app. + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName the String value + * @param environmentName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> resetAllFiltersForHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String hostingEnvironmentName, String environmentName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (hostingEnvironmentName == null) { + throw new IllegalArgumentException("Parameter hostingEnvironmentName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (environmentName == null) { + throw new IllegalArgumentException("Parameter environmentName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.resetAllFiltersForHostingEnvironment(resourceGroupName, hostingEnvironmentName, this.client.subscriptionId(), environmentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = resetAllFiltersForHostingEnvironmentDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse resetAllFiltersForHostingEnvironmentDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a recommendation rule for an app. + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param name Name of the recommendation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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 getRuleDetailsByHostingEnvironment(String resourceGroupName, String hostingEnvironmentName, String name) { + return getRuleDetailsByHostingEnvironmentWithServiceResponseAsync(resourceGroupName, hostingEnvironmentName, name).toBlocking().single().body(); + } + + /** + * Get a recommendation rule for an app. + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @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 getRuleDetailsByHostingEnvironmentAsync(String resourceGroupName, String hostingEnvironmentName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getRuleDetailsByHostingEnvironmentWithServiceResponseAsync(resourceGroupName, hostingEnvironmentName, name), serviceCallback); + } + + /** + * Get a recommendation rule for an app. + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param name Name of the recommendation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecommendationRuleInner object + */ + public Observable getRuleDetailsByHostingEnvironmentAsync(String resourceGroupName, String hostingEnvironmentName, String name) { + return getRuleDetailsByHostingEnvironmentWithServiceResponseAsync(resourceGroupName, hostingEnvironmentName, name).map(new Func1, RecommendationRuleInner>() { + @Override + public RecommendationRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a recommendation rule for an app. + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param name Name of the recommendation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RecommendationRuleInner object + */ + public Observable> getRuleDetailsByHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String hostingEnvironmentName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (hostingEnvironmentName == null) { + throw new IllegalArgumentException("Parameter hostingEnvironmentName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean updateSeen = null; + final String recommendationId = null; + return service.getRuleDetailsByHostingEnvironment(resourceGroupName, hostingEnvironmentName, name, this.client.subscriptionId(), updateSeen, recommendationId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getRuleDetailsByHostingEnvironmentDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get a recommendation rule for an app. + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @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 recommendation 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 DefaultErrorResponseException 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 getRuleDetailsByHostingEnvironment(String resourceGroupName, String hostingEnvironmentName, String name, Boolean updateSeen, String recommendationId) { + return getRuleDetailsByHostingEnvironmentWithServiceResponseAsync(resourceGroupName, hostingEnvironmentName, name, updateSeen, recommendationId).toBlocking().single().body(); + } + + /** + * Get a recommendation rule for an app. + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @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 recommendation 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 getRuleDetailsByHostingEnvironmentAsync(String resourceGroupName, String hostingEnvironmentName, String name, Boolean updateSeen, String recommendationId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getRuleDetailsByHostingEnvironmentWithServiceResponseAsync(resourceGroupName, hostingEnvironmentName, name, updateSeen, recommendationId), serviceCallback); + } + + /** + * Get a recommendation rule for an app. + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @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 recommendation 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 getRuleDetailsByHostingEnvironmentAsync(String resourceGroupName, String hostingEnvironmentName, String name, Boolean updateSeen, String recommendationId) { + return getRuleDetailsByHostingEnvironmentWithServiceResponseAsync(resourceGroupName, hostingEnvironmentName, name, updateSeen, recommendationId).map(new Func1, RecommendationRuleInner>() { + @Override + public RecommendationRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a recommendation rule for an app. + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @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 recommendation 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> getRuleDetailsByHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String hostingEnvironmentName, String name, Boolean updateSeen, String recommendationId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (hostingEnvironmentName == null) { + throw new IllegalArgumentException("Parameter hostingEnvironmentName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getRuleDetailsByHostingEnvironment(resourceGroupName, hostingEnvironmentName, name, this.client.subscriptionId(), updateSeen, recommendationId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getRuleDetailsByHostingEnvironmentDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getRuleDetailsByHostingEnvironmentDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Disables the specific rule for a web site permanently. + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Rule name + * @param hostingEnvironmentName the String value + * @param environmentName Site name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void disableRecommendationForHostingEnvironment(String resourceGroupName, String name, String hostingEnvironmentName, String environmentName) { + disableRecommendationForHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentName, environmentName).toBlocking().single().body(); + } + + /** + * Disables the specific rule for a web site permanently. + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Rule name + * @param hostingEnvironmentName the String value + * @param environmentName 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 disableRecommendationForHostingEnvironmentAsync(String resourceGroupName, String name, String hostingEnvironmentName, String environmentName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(disableRecommendationForHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentName, environmentName), serviceCallback); + } + + /** + * Disables the specific rule for a web site permanently. + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Rule name + * @param hostingEnvironmentName the String value + * @param environmentName Site name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable disableRecommendationForHostingEnvironmentAsync(String resourceGroupName, String name, String hostingEnvironmentName, String environmentName) { + return disableRecommendationForHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentName, environmentName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Disables the specific rule for a web site permanently. + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Rule name + * @param hostingEnvironmentName the String value + * @param environmentName Site name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> disableRecommendationForHostingEnvironmentWithServiceResponseAsync(String resourceGroupName, String name, String hostingEnvironmentName, String environmentName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (hostingEnvironmentName == null) { + throw new IllegalArgumentException("Parameter hostingEnvironmentName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (environmentName == null) { + throw new IllegalArgumentException("Parameter environmentName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.disableRecommendationForHostingEnvironment(resourceGroupName, name, hostingEnvironmentName, this.client.subscriptionId(), environmentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = disableRecommendationForHostingEnvironmentDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse disableRecommendationForHostingEnvironmentDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean expiredOnly = null; + final String filter = null; + return service.listHistoryForWebApp(resourceGroupName, siteName, this.client.subscriptionId(), expiredOnly, filter, this.client.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. + * Description for 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 expiredOnly Specify <code>false</code> to return all recommendations. The default is <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel 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 DefaultErrorResponseException thrown 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 Boolean expiredOnly, final String filter) { + ServiceResponse> response = listHistoryForWebAppSinglePageAsync(resourceGroupName, siteName, expiredOnly, 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. + * Description for 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 expiredOnly Specify <code>false</code> to return all recommendations. The default is <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel 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 Boolean expiredOnly, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listHistoryForWebAppSinglePageAsync(resourceGroupName, siteName, expiredOnly, 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. + * Description for 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 expiredOnly Specify <code>false</code> to return all recommendations. The default is <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel 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 Boolean expiredOnly, final String filter) { + return listHistoryForWebAppWithServiceResponseAsync(resourceGroupName, siteName, expiredOnly, 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. + * Description for 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 expiredOnly Specify <code>false</code> to return all recommendations. The default is <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel 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 Boolean expiredOnly, final String filter) { + return listHistoryForWebAppSinglePageAsync(resourceGroupName, siteName, expiredOnly, 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. + * Description for 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 expiredOnly Specify <code>false</code> to return all recommendations. The default is <code>true</code>, which returns only expired recommendations. + ServiceResponse> * @param filter Filter is specified by using OData syntax. Example: $filter=channel 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 Boolean expiredOnly, 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listHistoryForWebApp(resourceGroupName, siteName, this.client.subscriptionId(), expiredOnly, filter, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all recommendations for an app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean featured = null; + final String filter = null; + return service.listRecommendedRulesForWebApp(resourceGroupName, siteName, this.client.subscriptionId(), featured, filter, this.client.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. + * Description for 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=channel eq 'Api' or channel eq 'Notification' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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=channel 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. + * Description for 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=channel 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. + * Description for 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=channel 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. + * Description for 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=channel 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listRecommendedRulesForWebApp(resourceGroupName, siteName, this.client.subscriptionId(), featured, filter, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Disable all recommendations for an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.disableAllForWebApp(resourceGroupName, siteName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = disableAllForWebAppDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse disableAllForWebAppDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Reset all recommendation opt-out settings for an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.resetAllFiltersForWebApp(resourceGroupName, siteName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = resetAllFiltersForWebAppDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse resetAllFiltersForWebAppDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a recommendation rule for an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean updateSeen = null; + final String recommendationId = null; + return service.getRuleDetailsByWebApp(resourceGroupName, siteName, name, this.client.subscriptionId(), updateSeen, recommendationId, this.client.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. + * Description for 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 recommendation 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 DefaultErrorResponseException 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. + * Description for 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 recommendation 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. + * Description for 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 recommendation 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. + * Description for 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 recommendation 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getRuleDetailsByWebApp(resourceGroupName, siteName, name, this.client.subscriptionId(), updateSeen, recommendationId, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Disables the specific rule for a web site permanently. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.disableRecommendationForSite(resourceGroupName, siteName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = disableRecommendationForSiteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse disableRecommendationForSiteDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List all recommendations for a subscription. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Description for 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 DefaultErrorResponseException thrown 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 listHistoryForHostingEnvironmentNext(final String nextPageLink) { + ServiceResponse> response = listHistoryForHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listHistoryForHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Description for 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> listHistoryForHostingEnvironmentNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listHistoryForHostingEnvironmentNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listHistoryForHostingEnvironmentNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Description for 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> listHistoryForHostingEnvironmentNextAsync(final String nextPageLink) { + return listHistoryForHostingEnvironmentNextWithServiceResponseAsync(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. + * Description for 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>> listHistoryForHostingEnvironmentNextWithServiceResponseAsync(final String nextPageLink) { + return listHistoryForHostingEnvironmentNextSinglePageAsync(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(listHistoryForHostingEnvironmentNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Description for 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>> listHistoryForHostingEnvironmentNextSinglePageAsync(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.listHistoryForHostingEnvironmentNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listHistoryForHostingEnvironmentNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listHistoryForHostingEnvironmentNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all recommendations for an app. + * Description for 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 DefaultErrorResponseException thrown 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 listRecommendedRulesForHostingEnvironmentNext(final String nextPageLink) { + ServiceResponse> response = listRecommendedRulesForHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listRecommendedRulesForHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all recommendations for an app. + * Description for 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> listRecommendedRulesForHostingEnvironmentNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listRecommendedRulesForHostingEnvironmentNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listRecommendedRulesForHostingEnvironmentNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all recommendations for an app. + * Description for 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> listRecommendedRulesForHostingEnvironmentNextAsync(final String nextPageLink) { + return listRecommendedRulesForHostingEnvironmentNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all recommendations for an app. + * Description for 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>> listRecommendedRulesForHostingEnvironmentNextWithServiceResponseAsync(final String nextPageLink) { + return listRecommendedRulesForHostingEnvironmentNextSinglePageAsync(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(listRecommendedRulesForHostingEnvironmentNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all recommendations for an app. + * Description for 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>> listRecommendedRulesForHostingEnvironmentNextSinglePageAsync(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.listRecommendedRulesForHostingEnvironmentNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listRecommendedRulesForHostingEnvironmentNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listRecommendedRulesForHostingEnvironmentNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get past recommendations for an app, optionally specified by the time range. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all recommendations for an app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RelayServiceConnectionEntityImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RelayServiceConnectionEntityImpl.java new file mode 100644 index 0000000000000..e100f53c73796 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RelayServiceConnectionEntityImpl.java @@ -0,0 +1,81 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.RelayServiceConnectionEntity; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class RelayServiceConnectionEntityImpl extends WrapperImpl implements RelayServiceConnectionEntity { + private final CertificateRegistrationManager manager; + RelayServiceConnectionEntityImpl(RelayServiceConnectionEntityInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String biztalkUri() { + return this.inner().biztalkUri(); + } + + @Override + public String entityConnectionString() { + return this.inner().entityConnectionString(); + } + + @Override + public String entityName() { + return this.inner().entityName(); + } + + @Override + public String hostname() { + return this.inner().hostname(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Integer port() { + return this.inner().port(); + } + + @Override + public String resourceConnectionString() { + return this.inner().resourceConnectionString(); + } + + @Override + public String resourceType() { + return this.inner().resourceType(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RelayServiceConnectionEntityInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RelayServiceConnectionEntityInner.java new file mode 100644 index 0000000000000..ca71c7f0ea8dd --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceHealthMetadataImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceHealthMetadataImpl.java new file mode 100644 index 0000000000000..b56ccb821582d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceHealthMetadataImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ResourceHealthMetadata; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class ResourceHealthMetadataImpl extends WrapperImpl implements ResourceHealthMetadata { + private final CertificateRegistrationManager manager; + ResourceHealthMetadataImpl(ResourceHealthMetadataInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String category() { + return this.inner().category(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Boolean signalAvailability() { + return this.inner().signalAvailability(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceHealthMetadataInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceHealthMetadataInner.java new file mode 100644 index 0000000000000..70590b6c36e20 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceHealthMetadataInner.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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Used for getting ResourceHealthCheck settings. + */ +@JsonFlatten +public class ResourceHealthMetadataInner extends ProxyOnlyResource { + /** + * The category that the resource matches in the RHC Policy File. + */ + @JsonProperty(value = "properties.category") + private String category; + + /** + * Is there a health signal for the resource. + */ + @JsonProperty(value = "properties.signalAvailability") + private Boolean signalAvailability; + + /** + * Get the category that the resource matches in the RHC Policy File. + * + * @return the category value + */ + public String category() { + return this.category; + } + + /** + * Set the category that the resource matches in the RHC Policy File. + * + * @param category the category value to set + * @return the ResourceHealthMetadataInner object itself. + */ + public ResourceHealthMetadataInner withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get is there a health signal for the resource. + * + * @return the signalAvailability value + */ + public Boolean signalAvailability() { + return this.signalAvailability; + } + + /** + * Set is there a health signal for the resource. + * + * @param signalAvailability the signalAvailability value to set + * @return the ResourceHealthMetadataInner object itself. + */ + public ResourceHealthMetadataInner withSignalAvailability(Boolean signalAvailability) { + this.signalAvailability = signalAvailability; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceHealthMetadatasImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceHealthMetadatasImpl.java new file mode 100644 index 0000000000000..43a95a2cc6701 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceHealthMetadatasImpl.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. + * abc + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.ResourceHealthMetadatas; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.appservice.v2019_08_01.ResourceHealthMetadata; + +class ResourceHealthMetadatasImpl extends WrapperImpl implements ResourceHealthMetadatas { + private final CertificateRegistrationManager manager; + + ResourceHealthMetadatasImpl(CertificateRegistrationManager manager) { + super(manager.inner().resourceHealthMetadatas()); + this.manager = manager; + } + + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable listBySiteAsync(final String resourceGroupName, final String name) { + ResourceHealthMetadatasInner client = this.inner(); + return client.listBySiteAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ResourceHealthMetadata call(ResourceHealthMetadataInner inner) { + return new ResourceHealthMetadataImpl(inner, manager()); + } + }); + } + + @Override + public Observable getBySiteAsync(String resourceGroupName, String name) { + ResourceHealthMetadatasInner client = this.inner(); + return client.getBySiteAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public ResourceHealthMetadata call(ResourceHealthMetadataInner inner) { + return new ResourceHealthMetadataImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync() { + ResourceHealthMetadatasInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ResourceHealthMetadata call(ResourceHealthMetadataInner inner) { + return new ResourceHealthMetadataImpl(inner, manager()); + } + }); + } + + @Override + public Observable listByResourceGroupAsync(final String resourceGroupName) { + ResourceHealthMetadatasInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ResourceHealthMetadata call(ResourceHealthMetadataInner inner) { + return new ResourceHealthMetadataImpl(inner, manager()); + } + }); + } + + @Override + public Observable listBySiteSlotAsync(final String resourceGroupName, final String name, final String slot) { + ResourceHealthMetadatasInner client = this.inner(); + return client.listBySiteSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ResourceHealthMetadata call(ResourceHealthMetadataInner inner) { + return new ResourceHealthMetadataImpl(inner, manager()); + } + }); + } + + @Override + public Observable getBySiteSlotAsync(String resourceGroupName, String name, String slot) { + ResourceHealthMetadatasInner client = this.inner(); + return client.getBySiteSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public ResourceHealthMetadata call(ResourceHealthMetadataInner inner) { + return new ResourceHealthMetadataImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceHealthMetadatasInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceHealthMetadatasInner.java new file mode 100644 index 0000000000000..7094e83ad5773 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceHealthMetadatasInner.java @@ -0,0 +1,1250 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.appservice.v2019_08_01.DefaultErrorResponseException; +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.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 ResourceHealthMetadatas. + */ +public class ResourceHealthMetadatasInner implements InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private ResourceHealthMetadatasService service; + /** The service client containing this operation class. */ + private WebSiteManagementClientImpl client; + + /** + * Initializes an instance of ResourceHealthMetadatasInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ResourceHealthMetadatasInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(ResourceHealthMetadatasService.class); + this.client = client; + } + + /** + * The interface defining all the services for ResourceHealthMetadatas to be + * used by Retrofit to perform actually REST calls. + */ + interface ResourceHealthMetadatasService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.ResourceHealthMetadatas list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata") + 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.appservice.v2019_08_01.ResourceHealthMetadatas listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata") + 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.appservice.v2019_08_01.ResourceHealthMetadatas listBySite" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata") + Observable> listBySite(@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.appservice.v2019_08_01.ResourceHealthMetadatas getBySite" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default") + Observable> getBySite(@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.appservice.v2019_08_01.ResourceHealthMetadatas listBySiteSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata") + Observable> listBySiteSlot(@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.appservice.v2019_08_01.ResourceHealthMetadatas getBySiteSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default") + Observable> getBySiteSlot(@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.appservice.v2019_08_01.ResourceHealthMetadatas 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.appservice.v2019_08_01.ResourceHealthMetadatas 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.appservice.v2019_08_01.ResourceHealthMetadatas listBySiteNext" }) + @GET + Observable> listBySiteNext(@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.appservice.v2019_08_01.ResourceHealthMetadatas listBySiteSlotNext" }) + @GET + Observable> listBySiteSlotNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List all ResourceHealthMetadata for all sites in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceHealthMetadataInner> 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 ResourceHealthMetadata for all sites in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the 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 ResourceHealthMetadata for all sites in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceHealthMetadataInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all ResourceHealthMetadata for all sites in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ResourceHealthMetadataInner> 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 ResourceHealthMetadata for all sites in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceHealthMetadataInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceHealthMetadataInner> 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(); + } + }; + } + + /** + * List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + * @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); + } + + /** + * List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + * @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<ResourceHealthMetadataInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + * @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<ResourceHealthMetadataInner> 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)); + } + }); + } + + /** + * List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceHealthMetadataInner> 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceHealthMetadataInner> object if successful. + */ + public PagedList listBySite(final String resourceGroupName, final String name) { + ServiceResponse> response = listBySiteSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBySiteNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @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> listBySiteAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBySiteSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBySiteNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @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<ResourceHealthMetadataInner> object + */ + public Observable> listBySiteAsync(final String resourceGroupName, final String name) { + return listBySiteWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @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<ResourceHealthMetadataInner> object + */ + public Observable>> listBySiteWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listBySiteSinglePageAsync(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(listBySiteNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceHealthMetadataInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listBySiteSinglePageAsync(final String resourceGroupName, final String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listBySite(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBySiteDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBySiteDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site. + * Description for Gets the category of ResourceHealthMetadata to use 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ResourceHealthMetadataInner object if successful. + */ + public ResourceHealthMetadataInner getBySite(String resourceGroupName, String name) { + return getBySiteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site. + * Description for Gets the category of ResourceHealthMetadata to use 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 getBySiteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getBySiteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site. + * Description for Gets the category of ResourceHealthMetadata to use 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 ResourceHealthMetadataInner object + */ + public Observable getBySiteAsync(String resourceGroupName, String name) { + return getBySiteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, ResourceHealthMetadataInner>() { + @Override + public ResourceHealthMetadataInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site. + * Description for Gets the category of ResourceHealthMetadata to use 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 ResourceHealthMetadataInner object + */ + public Observable> getBySiteWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getBySite(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getBySiteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getBySiteDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceHealthMetadataInner> object if successful. + */ + public PagedList listBySiteSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listBySiteSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBySiteSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @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> listBySiteSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBySiteSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBySiteSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @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<ResourceHealthMetadataInner> object + */ + public Observable> listBySiteSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listBySiteSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @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<ResourceHealthMetadataInner> object + */ + public Observable>> listBySiteSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listBySiteSlotSinglePageAsync(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(listBySiteSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceHealthMetadataInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listBySiteSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listBySiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBySiteSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBySiteSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site. + * Description for Gets the category of ResourceHealthMetadata to use 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ResourceHealthMetadataInner object if successful. + */ + public ResourceHealthMetadataInner getBySiteSlot(String resourceGroupName, String name, String slot) { + return getBySiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site. + * Description for Gets the category of ResourceHealthMetadata to use 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 getBySiteSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getBySiteSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site. + * Description for Gets the category of ResourceHealthMetadata to use 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 ResourceHealthMetadataInner object + */ + public Observable getBySiteSlotAsync(String resourceGroupName, String name, String slot) { + return getBySiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, ResourceHealthMetadataInner>() { + @Override + public ResourceHealthMetadataInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site. + * Description for Gets the category of ResourceHealthMetadata to use 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 ResourceHealthMetadataInner object + */ + public Observable> getBySiteSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getBySiteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getBySiteSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getBySiteSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List all ResourceHealthMetadata for all sites in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceHealthMetadataInner> 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 ResourceHealthMetadata for all sites in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the 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 ResourceHealthMetadata for all sites in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the 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<ResourceHealthMetadataInner> 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 ResourceHealthMetadata for all sites in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the 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<ResourceHealthMetadataInner> 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 ResourceHealthMetadata for all sites in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the 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<ResourceHealthMetadataInner> 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceHealthMetadataInner> 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(); + } + }; + } + + /** + * List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the resource group in the 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> 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); + } + + /** + * List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the resource group in the 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<ResourceHealthMetadataInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the resource group in the 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<ResourceHealthMetadataInner> 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)); + } + }); + } + + /** + * List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * Description for List all ResourceHealthMetadata for all sites in the resource group in the 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<ResourceHealthMetadataInner> 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceHealthMetadataInner> object if successful. + */ + public PagedList listBySiteNext(final String nextPageLink) { + ServiceResponse> response = listBySiteNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBySiteNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @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> listBySiteNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBySiteNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBySiteNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @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<ResourceHealthMetadataInner> object + */ + public Observable> listBySiteNextAsync(final String nextPageLink) { + return listBySiteNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @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<ResourceHealthMetadataInner> object + */ + public Observable>> listBySiteNextWithServiceResponseAsync(final String nextPageLink) { + return listBySiteNextSinglePageAsync(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(listBySiteNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceHealthMetadataInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listBySiteNextSinglePageAsync(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.listBySiteNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBySiteNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBySiteNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ResourceHealthMetadataInner> object if successful. + */ + public PagedList listBySiteSlotNext(final String nextPageLink) { + ServiceResponse> response = listBySiteSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBySiteSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @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> listBySiteSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBySiteSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBySiteSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @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<ResourceHealthMetadataInner> object + */ + public Observable> listBySiteSlotNextAsync(final String nextPageLink) { + return listBySiteSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @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<ResourceHealthMetadataInner> object + */ + public Observable>> listBySiteSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listBySiteSlotNextSinglePageAsync(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(listBySiteSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ResourceHealthMetadataInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listBySiteSlotNextSinglePageAsync(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.listBySiteSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBySiteSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBySiteSlotNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceMetricDefinitionImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceMetricDefinitionImpl.java new file mode 100644 index 0000000000000..69496a801b37b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceMetricDefinitionImpl.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ResourceMetricDefinition; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.ResourceMetricAvailability; +import java.util.Map; + +class ResourceMetricDefinitionImpl extends WrapperImpl implements ResourceMetricDefinition { + private final CertificateRegistrationManager manager; + + ResourceMetricDefinitionImpl(ResourceMetricDefinitionInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public List metricAvailabilities() { + return this.inner().metricAvailabilities(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String primaryAggregationType() { + return this.inner().primaryAggregationType(); + } + + @Override + public Map properties() { + return this.inner().properties(); + } + + @Override + public String resourceUri() { + return this.inner().resourceUri(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String unit() { + return this.inner().unit(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceMetricDefinitionInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceMetricDefinitionInner.java new file mode 100644 index 0000000000000..2237a2e93a86d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceMetricDefinitionInner.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.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.ResourceMetricAvailability; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Metadata for the metrics. + */ +@JsonFlatten +public class ResourceMetricDefinitionInner extends ProxyOnlyResource { + /** + * 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 metric definition properties. + */ + @JsonProperty(value = "properties.properties", access = JsonProperty.Access.WRITE_ONLY) + private Map properties; + + /** + * Get unit of the metric. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Get primary aggregation type. + * + * @return the primaryAggregationType value + */ + public String primaryAggregationType() { + return this.primaryAggregationType; + } + + /** + * Get list of time grains supported for the metric together with retention period. + * + * @return the metricAvailabilities value + */ + public List metricAvailabilities() { + return this.metricAvailabilities; + } + + /** + * Get resource URI. + * + * @return the resourceUri value + */ + public String resourceUri() { + return this.resourceUri; + } + + /** + * Get resource metric definition properties. + * + * @return the properties value + */ + public Map properties() { + return this.properties; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceNameAvailabilityInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ResourceNameAvailabilityInner.java new file mode 100644 index 0000000000000..a82c6e105df0c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.InAvailabilityReasonType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information regarding availability 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 <code>true</code> indicates name is valid and available. <code>false</code> indicates the name is invalid, unavailable, or both. + * + * @return the nameAvailable value + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Set <code>true</code> indicates name is valid and available. <code>false</code> indicates the name is invalid, unavailable, or both. + * + * @param nameAvailable the nameAvailable value to set + * @return the ResourceNameAvailabilityInner object itself. + */ + public ResourceNameAvailabilityInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + + /** + * Get <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'. + * + * @return the reason value + */ + public InAvailabilityReasonType reason() { + return this.reason; + } + + /** + * Set <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'. + * + * @param reason the reason value to set + * @return the ResourceNameAvailabilityInner object itself. + */ + public ResourceNameAvailabilityInner withReason(InAvailabilityReasonType reason) { + this.reason = reason; + return this; + } + + /** + * Get 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. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set 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. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RestoreRequestImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RestoreRequestImpl.java new file mode 100644 index 0000000000000..3b8358476541c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RestoreRequestImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.RestoreRequest; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.DatabaseBackupSetting; +import com.microsoft.azure.management.appservice.v2019_08_01.BackupRestoreOperationType; + +class RestoreRequestImpl extends WrapperImpl implements RestoreRequest { + private final CertificateRegistrationManager manager; + RestoreRequestImpl(RestoreRequestInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Boolean adjustConnectionStrings() { + return this.inner().adjustConnectionStrings(); + } + + @Override + public String appServicePlan() { + return this.inner().appServicePlan(); + } + + @Override + public String blobName() { + return this.inner().blobName(); + } + + @Override + public List databases() { + return this.inner().databases(); + } + + @Override + public String hostingEnvironment() { + return this.inner().hostingEnvironment(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Boolean ignoreConflictingHostNames() { + return this.inner().ignoreConflictingHostNames(); + } + + @Override + public Boolean ignoreDatabases() { + return this.inner().ignoreDatabases(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public BackupRestoreOperationType operationType() { + return this.inner().operationType(); + } + + @Override + public boolean overwrite() { + return this.inner().overwrite(); + } + + @Override + public String siteName() { + return this.inner().siteName(); + } + + @Override + public String storageAccountUrl() { + return this.inner().storageAccountUrl(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RestoreRequestInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RestoreRequestInner.java new file mode 100644 index 0000000000000..9fa756c6f7a6d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/RestoreRequestInner.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.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.DatabaseBackupSetting; +import com.microsoft.azure.management.appservice.v2019_08_01.BackupRestoreOperationType; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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', 'CloudFS'. + */ + @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 sAS URL to the container. + * + * @return the storageAccountUrl value + */ + public String storageAccountUrl() { + return this.storageAccountUrl; + } + + /** + * Set sAS URL to the container. + * + * @param storageAccountUrl the storageAccountUrl value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withStorageAccountUrl(String storageAccountUrl) { + this.storageAccountUrl = storageAccountUrl; + return this; + } + + /** + * Get name of a blob which contains the backup. + * + * @return the blobName value + */ + public String blobName() { + return this.blobName; + } + + /** + * Set name of a blob which contains the backup. + * + * @param blobName the blobName value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withBlobName(String blobName) { + this.blobName = blobName; + return this; + } + + /** + * Get <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. + * + * @return the overwrite value + */ + public boolean overwrite() { + return this.overwrite; + } + + /** + * Set <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. + * + * @param overwrite the overwrite value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withOverwrite(boolean overwrite) { + this.overwrite = overwrite; + return this; + } + + /** + * Get name of an app. + * + * @return the siteName value + */ + public String siteName() { + return this.siteName; + } + + /** + * Set name of an app. + * + * @param siteName the siteName value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withSiteName(String siteName) { + this.siteName = siteName; + return this; + } + + /** + * Get collection of databases which should be restored. This list has to match the list of databases included in the backup. + * + * @return the databases value + */ + public List databases() { + return this.databases; + } + + /** + * Set collection of databases which should be restored. This list has to match the list of databases included in the backup. + * + * @param databases the databases value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withDatabases(List databases) { + this.databases = databases; + return this; + } + + /** + * Get 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. + * + * @return the ignoreConflictingHostNames value + */ + public Boolean ignoreConflictingHostNames() { + return this.ignoreConflictingHostNames; + } + + /** + * Set 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. + * + * @param ignoreConflictingHostNames the ignoreConflictingHostNames value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withIgnoreConflictingHostNames(Boolean ignoreConflictingHostNames) { + this.ignoreConflictingHostNames = ignoreConflictingHostNames; + return this; + } + + /** + * Get ignore the databases and only restore the site content. + * + * @return the ignoreDatabases value + */ + public Boolean ignoreDatabases() { + return this.ignoreDatabases; + } + + /** + * Set ignore the databases and only restore the site content. + * + * @param ignoreDatabases the ignoreDatabases value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withIgnoreDatabases(Boolean ignoreDatabases) { + this.ignoreDatabases = ignoreDatabases; + return this; + } + + /** + * Get specify app service plan that will own restored site. + * + * @return the appServicePlan value + */ + public String appServicePlan() { + return this.appServicePlan; + } + + /** + * Set specify app service plan that will own restored site. + * + * @param appServicePlan the appServicePlan value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withAppServicePlan(String appServicePlan) { + this.appServicePlan = appServicePlan; + return this; + } + + /** + * Get operation type. Possible values include: 'Default', 'Clone', 'Relocation', 'Snapshot', 'CloudFS'. + * + * @return the operationType value + */ + public BackupRestoreOperationType operationType() { + return this.operationType; + } + + /** + * Set operation type. Possible values include: 'Default', 'Clone', 'Relocation', 'Snapshot', 'CloudFS'. + * + * @param operationType the operationType value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withOperationType(BackupRestoreOperationType operationType) { + this.operationType = operationType; + return this; + } + + /** + * Get <code>true</code> if SiteConfig.ConnectionStrings should be set in new app; otherwise, <code>false</code>. + * + * @return the adjustConnectionStrings value + */ + public Boolean adjustConnectionStrings() { + return this.adjustConnectionStrings; + } + + /** + * Set <code>true</code> if SiteConfig.ConnectionStrings should be set in new app; otherwise, <code>false</code>. + * + * @param adjustConnectionStrings the adjustConnectionStrings value to set + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withAdjustConnectionStrings(Boolean adjustConnectionStrings) { + this.adjustConnectionStrings = adjustConnectionStrings; + return this; + } + + /** + * Get app Service Environment name, if needed (only when restoring an app to an App Service Environment). + * + * @return the hostingEnvironment value + */ + public String hostingEnvironment() { + return this.hostingEnvironment; + } + + /** + * Set app Service Environment name, if needed (only when restoring an app to an App Service Environment). + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ServerfarmCsmUsageQuotaImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ServerfarmCsmUsageQuotaImpl.java new file mode 100644 index 0000000000000..86d3732f3f0b9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ServerfarmCsmUsageQuotaImpl.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ServerfarmCsmUsageQuota; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.LocalizableString; +import org.joda.time.DateTime; + +class ServerfarmCsmUsageQuotaImpl extends WrapperImpl implements ServerfarmCsmUsageQuota { + private final CertificateRegistrationManager manager; + + ServerfarmCsmUsageQuotaImpl(CsmUsageQuotaInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public Long currentValue() { + return this.inner().currentValue(); + } + + @Override + public Long limit() { + return this.inner().limit(); + } + + @Override + public LocalizableString name() { + return this.inner().name(); + } + + @Override + public DateTime nextResetTime() { + return this.inner().nextResetTime(); + } + + @Override + public String unit() { + return this.inner().unit(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ServerfarmHybridConnectionImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ServerfarmHybridConnectionImpl.java new file mode 100644 index 0000000000000..80818d1426f5b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ServerfarmHybridConnectionImpl.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ServerfarmHybridConnection; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; + +class ServerfarmHybridConnectionImpl extends IndexableRefreshableWrapperImpl implements ServerfarmHybridConnection { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String namespaceName; + private String relayName; + + ServerfarmHybridConnectionImpl(HybridConnectionInner inner, CertificateRegistrationManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "serverfarms"); + this.namespaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "hybridConnectionNamespaces"); + this.relayName = IdParsingUtils.getValueFromIdByName(inner.id(), "relays"); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + AppServicePlansInner client = this.manager().inner().appServicePlans(); + return client.getHybridConnectionAsync(this.resourceGroupName, this.name, this.namespaceName, this.relayName); + } + + + + @Override + public String hostname() { + return this.inner().hostname(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Integer port() { + return this.inner().port(); + } + + @Override + public String relayArmUri() { + return this.inner().relayArmUri(); + } + + @Override + public String relayName() { + return this.inner().relayName(); + } + + @Override + public String sendKeyName() { + return this.inner().sendKeyName(); + } + + @Override + public String sendKeyValue() { + return this.inner().sendKeyValue(); + } + + @Override + public String serviceBusNamespace() { + return this.inner().serviceBusNamespace(); + } + + @Override + public String serviceBusSuffix() { + return this.inner().serviceBusSuffix(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ServerfarmSiteImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ServerfarmSiteImpl.java new file mode 100644 index 0000000000000..4beb52775b306 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ServerfarmSiteImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ServerfarmSite; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteAvailabilityState; +import com.microsoft.azure.management.appservice.v2019_08_01.CloningInfo; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentProfile; +import com.microsoft.azure.management.appservice.v2019_08_01.HostNameSslState; +import com.microsoft.azure.management.appservice.v2019_08_01.ManagedServiceIdentity; +import java.util.UUID; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.RedundancyMode; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteConfig; +import com.microsoft.azure.management.appservice.v2019_08_01.SlotSwapStatus; +import java.util.Map; +import com.microsoft.azure.management.appservice.v2019_08_01.UsageState; + +class ServerfarmSiteImpl extends WrapperImpl implements ServerfarmSite { + private final CertificateRegistrationManager manager; + + ServerfarmSiteImpl(SiteInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public SiteAvailabilityState availabilityState() { + return this.inner().availabilityState(); + } + + @Override + public Boolean clientAffinityEnabled() { + return this.inner().clientAffinityEnabled(); + } + + @Override + public Boolean clientCertEnabled() { + return this.inner().clientCertEnabled(); + } + + @Override + public String clientCertExclusionPaths() { + return this.inner().clientCertExclusionPaths(); + } + + @Override + public CloningInfo cloningInfo() { + return this.inner().cloningInfo(); + } + + @Override + public Integer containerSize() { + return this.inner().containerSize(); + } + + @Override + public Integer dailyMemoryTimeQuota() { + return this.inner().dailyMemoryTimeQuota(); + } + + @Override + public String defaultHostName() { + return this.inner().defaultHostName(); + } + + @Override + public Boolean enabled() { + return this.inner().enabled(); + } + + @Override + public List enabledHostNames() { + return this.inner().enabledHostNames(); + } + + @Override + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.inner().hostingEnvironmentProfile(); + } + + @Override + public List hostNames() { + return this.inner().hostNames(); + } + + @Override + public Boolean hostNamesDisabled() { + return this.inner().hostNamesDisabled(); + } + + @Override + public List hostNameSslStates() { + return this.inner().hostNameSslStates(); + } + + @Override + public Boolean httpsOnly() { + return this.inner().httpsOnly(); + } + + @Override + public Boolean hyperV() { + return this.inner().hyperV(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public ManagedServiceIdentity identity() { + return this.inner().identity(); + } + + @Override + public UUID inProgressOperationId() { + return this.inner().inProgressOperationId(); + } + + @Override + public Boolean isDefaultContainer() { + return this.inner().isDefaultContainer(); + } + + @Override + public Boolean isXenon() { + return this.inner().isXenon(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public DateTime lastModifiedTimeUtc() { + return this.inner().lastModifiedTimeUtc(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public Integer maxNumberOfWorkers() { + return this.inner().maxNumberOfWorkers(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String outboundIpAddresses() { + return this.inner().outboundIpAddresses(); + } + + @Override + public String possibleOutboundIpAddresses() { + return this.inner().possibleOutboundIpAddresses(); + } + + @Override + public RedundancyMode redundancyMode() { + return this.inner().redundancyMode(); + } + + @Override + public String repositorySiteName() { + return this.inner().repositorySiteName(); + } + + @Override + public Boolean reserved() { + return this.inner().reserved(); + } + + @Override + public String resourceGroup() { + return this.inner().resourceGroup(); + } + + @Override + public Boolean scmSiteAlsoStopped() { + return this.inner().scmSiteAlsoStopped(); + } + + @Override + public String serverFarmId() { + return this.inner().serverFarmId(); + } + + @Override + public SiteConfig siteConfig() { + return this.inner().siteConfig(); + } + + @Override + public SlotSwapStatus slotSwapStatus() { + return this.inner().slotSwapStatus(); + } + + @Override + public String state() { + return this.inner().state(); + } + + @Override + public DateTime suspendedTill() { + return this.inner().suspendedTill(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String targetSwapSlot() { + return this.inner().targetSwapSlot(); + } + + @Override + public List trafficManagerHostNames() { + return this.inner().trafficManagerHostNames(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public UsageState usageState() { + return this.inner().usageState(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ServerfarmVnetGatewayImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ServerfarmVnetGatewayImpl.java new file mode 100644 index 0000000000000..30184aceb8d7a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ServerfarmVnetGatewayImpl.java @@ -0,0 +1,115 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ServerfarmVnetGateway; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; + +class ServerfarmVnetGatewayImpl extends CreatableUpdatableImpl implements ServerfarmVnetGateway, ServerfarmVnetGateway.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String vnetName; + private String gatewayName; + + ServerfarmVnetGatewayImpl(String name, CertificateRegistrationManager manager) { + super(name, new VnetGatewayInner()); + this.manager = manager; + // Set resource name + this.gatewayName = name; + // + } + + ServerfarmVnetGatewayImpl(VnetGatewayInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.gatewayName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "serverfarms"); + this.vnetName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualNetworkConnections"); + this.gatewayName = IdParsingUtils.getValueFromIdByName(inner.id(), "gateways"); + // + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + AppServicePlansInner client = this.manager().inner().appServicePlans(); + return null; // NOP createResourceAsync implementation as create is not supported + } + + @Override + public Observable updateResourceAsync() { + AppServicePlansInner client = this.manager().inner().appServicePlans(); + return client.updateVnetGatewayAsync(this.resourceGroupName, this.name, this.vnetName, this.gatewayName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + AppServicePlansInner client = this.manager().inner().appServicePlans(); + return client.getVnetGatewayAsync(this.resourceGroupName, this.name, this.vnetName, this.gatewayName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String vnetName() { + return this.inner().vnetName(); + } + + @Override + public String vpnPackageUri() { + return this.inner().vpnPackageUri(); + } + + @Override + public ServerfarmVnetGatewayImpl withKind(String kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public ServerfarmVnetGatewayImpl withVnetName(String vnetName) { + this.inner().withVnetName(vnetName); + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ServerfarmVnetInfoImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ServerfarmVnetInfoImpl.java new file mode 100644 index 0000000000000..013848dd182d1 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ServerfarmVnetInfoImpl.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ServerfarmVnetInfo; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import java.util.ArrayList; +import com.microsoft.azure.management.appservice.v2019_08_01.VnetRoute; +import java.util.List; + +class ServerfarmVnetInfoImpl extends IndexableRefreshableWrapperImpl implements ServerfarmVnetInfo { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String vnetName; + + ServerfarmVnetInfoImpl(VnetInfoInner inner, CertificateRegistrationManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "serverfarms"); + this.vnetName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualNetworkConnections"); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + AppServicePlansInner client = this.manager().inner().appServicePlans(); + return client.getVnetFromServerFarmAsync(this.resourceGroupName, this.name, this.vnetName); + } + + + + @Override + public String certBlob() { + return this.inner().certBlob(); + } + + @Override + public String certThumbprint() { + return this.inner().certThumbprint(); + } + + @Override + public String dnsServers() { + return this.inner().dnsServers(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Boolean isSwift() { + return this.inner().isSwift(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Boolean resyncRequired() { + return this.inner().resyncRequired(); + } + + @Override + public List routes() { + List lst = new ArrayList(); + if (this.inner().routes() != null) { + for (VnetRouteInner inner : this.inner().routes()) { + lst.add( new VnetRouteImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String vnetResourceId() { + return this.inner().vnetResourceId(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteAuthSettingsImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteAuthSettingsImpl.java new file mode 100644 index 0000000000000..151f4c80b84ec --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteAuthSettingsImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SiteAuthSettings; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.BuiltInAuthenticationProvider; +import com.microsoft.azure.management.appservice.v2019_08_01.UnauthenticatedClientAction; + +class SiteAuthSettingsImpl extends WrapperImpl implements SiteAuthSettings { + private final CertificateRegistrationManager manager; + SiteAuthSettingsImpl(SiteAuthSettingsInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public List additionalLoginParams() { + return this.inner().additionalLoginParams(); + } + + @Override + public List allowedAudiences() { + return this.inner().allowedAudiences(); + } + + @Override + public List allowedExternalRedirectUrls() { + return this.inner().allowedExternalRedirectUrls(); + } + + @Override + public String clientId() { + return this.inner().clientId(); + } + + @Override + public String clientSecret() { + return this.inner().clientSecret(); + } + + @Override + public String clientSecretCertificateThumbprint() { + return this.inner().clientSecretCertificateThumbprint(); + } + + @Override + public BuiltInAuthenticationProvider defaultProvider() { + return this.inner().defaultProvider(); + } + + @Override + public Boolean enabled() { + return this.inner().enabled(); + } + + @Override + public String facebookAppId() { + return this.inner().facebookAppId(); + } + + @Override + public String facebookAppSecret() { + return this.inner().facebookAppSecret(); + } + + @Override + public List facebookOAuthScopes() { + return this.inner().facebookOAuthScopes(); + } + + @Override + public String googleClientId() { + return this.inner().googleClientId(); + } + + @Override + public String googleClientSecret() { + return this.inner().googleClientSecret(); + } + + @Override + public List googleOAuthScopes() { + return this.inner().googleOAuthScopes(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String issuer() { + return this.inner().issuer(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String microsoftAccountClientId() { + return this.inner().microsoftAccountClientId(); + } + + @Override + public String microsoftAccountClientSecret() { + return this.inner().microsoftAccountClientSecret(); + } + + @Override + public List microsoftAccountOAuthScopes() { + return this.inner().microsoftAccountOAuthScopes(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String runtimeVersion() { + return this.inner().runtimeVersion(); + } + + @Override + public Double tokenRefreshExtensionHours() { + return this.inner().tokenRefreshExtensionHours(); + } + + @Override + public Boolean tokenStoreEnabled() { + return this.inner().tokenStoreEnabled(); + } + + @Override + public String twitterConsumerKey() { + return this.inner().twitterConsumerKey(); + } + + @Override + public String twitterConsumerSecret() { + return this.inner().twitterConsumerSecret(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public UnauthenticatedClientAction unauthenticatedClientAction() { + return this.inner().unauthenticatedClientAction(); + } + + @Override + public Boolean validateIssuer() { + return this.inner().validateIssuer(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteAuthSettingsInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteAuthSettingsInner.java new file mode 100644 index 0000000000000..7265e4a280fa9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteAuthSettingsInner.java @@ -0,0 +1,844 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.UnauthenticatedClientAction; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.BuiltInAuthenticationProvider; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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; + + /** + * An alternative to the client secret, that is the thumbprint of a + * certificate used for signing purposes. This property acts as + * a replacement for the Client Secret. It is also optional. + */ + @JsonProperty(value = "properties.clientSecretCertificateThumbprint") + private String clientSecretCertificateThumbprint; + + /** + * 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; + + /** + * Gets a value indicating whether the issuer should be a valid HTTPS url + * and be validated as such. + */ + @JsonProperty(value = "properties.validateIssuer") + private Boolean validateIssuer; + + /** + * 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 <code>true</code> if the Authentication / Authorization feature is enabled for the current app; otherwise, <code>false</code>. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set <code>true</code> if the Authentication / Authorization feature is enabled for the current app; otherwise, <code>false</code>. + * + * @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 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. + * + * @return the runtimeVersion value + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set 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. + * + * @param runtimeVersion the runtimeVersion value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + /** + * Get the action to take when an unauthenticated client attempts to access the app. Possible values include: 'RedirectToLoginPage', 'AllowAnonymous'. + * + * @return the unauthenticatedClientAction value + */ + public UnauthenticatedClientAction unauthenticatedClientAction() { + return this.unauthenticatedClientAction; + } + + /** + * Set the action to take when an unauthenticated client attempts to access the app. Possible values include: 'RedirectToLoginPage', 'AllowAnonymous'. + * + * @param unauthenticatedClientAction the unauthenticatedClientAction value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withUnauthenticatedClientAction(UnauthenticatedClientAction unauthenticatedClientAction) { + this.unauthenticatedClientAction = unauthenticatedClientAction; + return this; + } + + /** + * Get <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>. + * + * @return the tokenStoreEnabled value + */ + public Boolean tokenStoreEnabled() { + return this.tokenStoreEnabled; + } + + /** + * Set <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>. + * + * @param tokenStoreEnabled the tokenStoreEnabled value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withTokenStoreEnabled(Boolean tokenStoreEnabled) { + this.tokenStoreEnabled = tokenStoreEnabled; + return this; + } + + /** + * Get 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. + * + * @return the allowedExternalRedirectUrls value + */ + public List allowedExternalRedirectUrls() { + return this.allowedExternalRedirectUrls; + } + + /** + * Set 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. + * + * @param allowedExternalRedirectUrls the allowedExternalRedirectUrls value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withAllowedExternalRedirectUrls(List allowedExternalRedirectUrls) { + this.allowedExternalRedirectUrls = allowedExternalRedirectUrls; + return this; + } + + /** + * Get 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'. + * + * @return the defaultProvider value + */ + public BuiltInAuthenticationProvider defaultProvider() { + return this.defaultProvider; + } + + /** + * Set 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'. + * + * @param defaultProvider the defaultProvider value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withDefaultProvider(BuiltInAuthenticationProvider defaultProvider) { + this.defaultProvider = defaultProvider; + return this; + } + + /** + * Get 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. + * + * @return the tokenRefreshExtensionHours value + */ + public Double tokenRefreshExtensionHours() { + return this.tokenRefreshExtensionHours; + } + + /** + * Set 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. + * + * @param tokenRefreshExtensionHours the tokenRefreshExtensionHours value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withTokenRefreshExtensionHours(Double tokenRefreshExtensionHours) { + this.tokenRefreshExtensionHours = tokenRefreshExtensionHours; + return this; + } + + /** + * Get 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. + * + * @return the clientId value + */ + public String clientId() { + return this.clientId; + } + + /** + * Set 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. + * + * @param clientId the clientId value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get 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. + * + * @return the clientSecret value + */ + public String clientSecret() { + return this.clientSecret; + } + + /** + * Set 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. + * + * @param clientSecret the clientSecret value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * Get an alternative to the client secret, that is the thumbprint of a certificate used for signing purposes. This property acts as + a replacement for the Client Secret. It is also optional. + * + * @return the clientSecretCertificateThumbprint value + */ + public String clientSecretCertificateThumbprint() { + return this.clientSecretCertificateThumbprint; + } + + /** + * Set an alternative to the client secret, that is the thumbprint of a certificate used for signing purposes. This property acts as + a replacement for the Client Secret. It is also optional. + * + * @param clientSecretCertificateThumbprint the clientSecretCertificateThumbprint value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withClientSecretCertificateThumbprint(String clientSecretCertificateThumbprint) { + this.clientSecretCertificateThumbprint = clientSecretCertificateThumbprint; + return this; + } + + /** + * Get 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. + * + * @return the issuer value + */ + public String issuer() { + return this.issuer; + } + + /** + * Set 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. + * + * @param issuer the issuer value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withIssuer(String issuer) { + this.issuer = issuer; + return this; + } + + /** + * Get gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. + * + * @return the validateIssuer value + */ + public Boolean validateIssuer() { + return this.validateIssuer; + } + + /** + * Set gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. + * + * @param validateIssuer the validateIssuer value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withValidateIssuer(Boolean validateIssuer) { + this.validateIssuer = validateIssuer; + return this; + } + + /** + * Get 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. + * + * @return the allowedAudiences value + */ + public List allowedAudiences() { + return this.allowedAudiences; + } + + /** + * Set 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. + * + * @param allowedAudiences the allowedAudiences value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withAllowedAudiences(List allowedAudiences) { + this.allowedAudiences = allowedAudiences; + return this; + } + + /** + * Get login parameters to send to the OpenID Connect authorization endpoint when + a user logs in. Each parameter must be in the form "key=value". + * + * @return the additionalLoginParams value + */ + public List additionalLoginParams() { + return this.additionalLoginParams; + } + + /** + * Set login parameters to send to the OpenID Connect authorization endpoint when + a user logs in. Each parameter must be in the form "key=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 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/. + * + * @return the googleClientId value + */ + public String googleClientId() { + return this.googleClientId; + } + + /** + * Set 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/. + * + * @param googleClientId the googleClientId value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withGoogleClientId(String googleClientId) { + this.googleClientId = googleClientId; + return this; + } + + /** + * Get 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/. + * + * @return the googleClientSecret value + */ + public String googleClientSecret() { + return this.googleClientSecret; + } + + /** + * Set 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/. + * + * @param googleClientSecret the googleClientSecret value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withGoogleClientSecret(String googleClientSecret) { + this.googleClientSecret = googleClientSecret; + return this; + } + + /** + * Get 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/. + * + * @return the googleOAuthScopes value + */ + public List googleOAuthScopes() { + return this.googleOAuthScopes; + } + + /** + * Set 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/. + * + * @param googleOAuthScopes the googleOAuthScopes value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withGoogleOAuthScopes(List googleOAuthScopes) { + this.googleOAuthScopes = googleOAuthScopes; + return this; + } + + /** + * Get 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. + * + * @return the facebookAppId value + */ + public String facebookAppId() { + return this.facebookAppId; + } + + /** + * Set 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. + * + * @param facebookAppId the facebookAppId value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withFacebookAppId(String facebookAppId) { + this.facebookAppId = facebookAppId; + return this; + } + + /** + * Get 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. + * + * @return the facebookAppSecret value + */ + public String facebookAppSecret() { + return this.facebookAppSecret; + } + + /** + * Set 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. + * + * @param facebookAppSecret the facebookAppSecret value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withFacebookAppSecret(String facebookAppSecret) { + this.facebookAppSecret = facebookAppSecret; + return this; + } + + /** + * Get 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. + * + * @return the facebookOAuthScopes value + */ + public List facebookOAuthScopes() { + return this.facebookOAuthScopes; + } + + /** + * Set 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. + * + * @param facebookOAuthScopes the facebookOAuthScopes value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withFacebookOAuthScopes(List facebookOAuthScopes) { + this.facebookOAuthScopes = facebookOAuthScopes; + return this; + } + + /** + * Get 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. + * + * @return the twitterConsumerKey value + */ + public String twitterConsumerKey() { + return this.twitterConsumerKey; + } + + /** + * Set 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. + * + * @param twitterConsumerKey the twitterConsumerKey value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withTwitterConsumerKey(String twitterConsumerKey) { + this.twitterConsumerKey = twitterConsumerKey; + return this; + } + + /** + * Get 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. + * + * @return the twitterConsumerSecret value + */ + public String twitterConsumerSecret() { + return this.twitterConsumerSecret; + } + + /** + * Set 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. + * + * @param twitterConsumerSecret the twitterConsumerSecret value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withTwitterConsumerSecret(String twitterConsumerSecret) { + this.twitterConsumerSecret = twitterConsumerSecret; + return this; + } + + /** + * Get 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. + * + * @return the microsoftAccountClientId value + */ + public String microsoftAccountClientId() { + return this.microsoftAccountClientId; + } + + /** + * Set 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. + * + * @param microsoftAccountClientId the microsoftAccountClientId value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withMicrosoftAccountClientId(String microsoftAccountClientId) { + this.microsoftAccountClientId = microsoftAccountClientId; + return this; + } + + /** + * Get 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. + * + * @return the microsoftAccountClientSecret value + */ + public String microsoftAccountClientSecret() { + return this.microsoftAccountClientSecret; + } + + /** + * Set 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. + * + * @param microsoftAccountClientSecret the microsoftAccountClientSecret value to set + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withMicrosoftAccountClientSecret(String microsoftAccountClientSecret) { + this.microsoftAccountClientSecret = microsoftAccountClientSecret; + return this; + } + + /** + * Get 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. + * + * @return the microsoftAccountOAuthScopes value + */ + public List microsoftAccountOAuthScopes() { + return this.microsoftAccountOAuthScopes; + } + + /** + * Set 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. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteCloneabilityImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteCloneabilityImpl.java new file mode 100644 index 0000000000000..b560b1d4766cb --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteCloneabilityImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SiteCloneability; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteCloneabilityCriterion; +import com.microsoft.azure.management.appservice.v2019_08_01.CloneAbilityResult; + +class SiteCloneabilityImpl extends WrapperImpl implements SiteCloneability { + private final CertificateRegistrationManager manager; + SiteCloneabilityImpl(SiteCloneabilityInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public List blockingCharacteristics() { + return this.inner().blockingCharacteristics(); + } + + @Override + public List blockingFeatures() { + return this.inner().blockingFeatures(); + } + + @Override + public CloneAbilityResult result() { + return this.inner().result(); + } + + @Override + public List unsupportedFeatures() { + return this.inner().unsupportedFeatures(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteCloneabilityInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteCloneabilityInner.java new file mode 100644 index 0000000000000..4ea962ee50d63 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteCloneabilityInner.java @@ -0,0 +1,129 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.CloneAbilityResult; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.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 name of app. Possible values include: 'Cloneable', 'PartiallyCloneable', 'NotCloneable'. + * + * @return the result value + */ + public CloneAbilityResult result() { + return this.result; + } + + /** + * Set name of app. Possible values include: 'Cloneable', 'PartiallyCloneable', 'NotCloneable'. + * + * @param result the result value to set + * @return the SiteCloneabilityInner object itself. + */ + public SiteCloneabilityInner withResult(CloneAbilityResult result) { + this.result = result; + return this; + } + + /** + * Get list of features enabled on app that prevent cloning. + * + * @return the blockingFeatures value + */ + public List blockingFeatures() { + return this.blockingFeatures; + } + + /** + * Set list of features enabled on app that prevent cloning. + * + * @param blockingFeatures the blockingFeatures value to set + * @return the SiteCloneabilityInner object itself. + */ + public SiteCloneabilityInner withBlockingFeatures(List blockingFeatures) { + this.blockingFeatures = blockingFeatures; + return this; + } + + /** + * Get 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. + * + * @return the unsupportedFeatures value + */ + public List unsupportedFeatures() { + return this.unsupportedFeatures; + } + + /** + * Set 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. + * + * @param unsupportedFeatures the unsupportedFeatures value to set + * @return the SiteCloneabilityInner object itself. + */ + public SiteCloneabilityInner withUnsupportedFeatures(List unsupportedFeatures) { + this.unsupportedFeatures = unsupportedFeatures; + return this; + } + + /** + * Get list of blocking application characteristics. + * + * @return the blockingCharacteristics value + */ + public List blockingCharacteristics() { + return this.blockingCharacteristics; + } + + /** + * Set list of blocking application characteristics. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteConfigResourceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteConfigResourceImpl.java new file mode 100644 index 0000000000000..43d696b51618e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteConfigResourceImpl.java @@ -0,0 +1,350 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SiteConfigResource; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.ApiDefinitionInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.ApiManagementConfig; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.NameValuePair; +import com.microsoft.azure.management.appservice.v2019_08_01.AutoHealRules; +import com.microsoft.azure.management.appservice.v2019_08_01.ConnStringInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.CorsSettings; +import com.microsoft.azure.management.appservice.v2019_08_01.Experiments; +import com.microsoft.azure.management.appservice.v2019_08_01.FtpsState; +import com.microsoft.azure.management.appservice.v2019_08_01.HandlerMapping; +import com.microsoft.azure.management.appservice.v2019_08_01.IpSecurityRestriction; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteLimits; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteLoadBalancing; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteMachineKey; +import com.microsoft.azure.management.appservice.v2019_08_01.ManagedPipelineMode; +import com.microsoft.azure.management.appservice.v2019_08_01.SupportedTlsVersions; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.ScmType; +import com.microsoft.azure.management.appservice.v2019_08_01.VirtualApplication; + +class SiteConfigResourceImpl extends WrapperImpl implements SiteConfigResource { + private final CertificateRegistrationManager manager; + SiteConfigResourceImpl(SiteConfigResourceInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Boolean acrUseManagedIdentityCreds() { + return this.inner().acrUseManagedIdentityCreds(); + } + + @Override + public String acrUserManagedIdentityID() { + return this.inner().acrUserManagedIdentityID(); + } + + @Override + public Boolean alwaysOn() { + return this.inner().alwaysOn(); + } + + @Override + public ApiDefinitionInfo apiDefinition() { + return this.inner().apiDefinition(); + } + + @Override + public ApiManagementConfig apiManagementConfig() { + return this.inner().apiManagementConfig(); + } + + @Override + public String appCommandLine() { + return this.inner().appCommandLine(); + } + + @Override + public List appSettings() { + return this.inner().appSettings(); + } + + @Override + public Boolean autoHealEnabled() { + return this.inner().autoHealEnabled(); + } + + @Override + public AutoHealRules autoHealRules() { + return this.inner().autoHealRules(); + } + + @Override + public String autoSwapSlotName() { + return this.inner().autoSwapSlotName(); + } + + @Override + public List connectionStrings() { + return this.inner().connectionStrings(); + } + + @Override + public CorsSettings cors() { + return this.inner().cors(); + } + + @Override + public List defaultDocuments() { + return this.inner().defaultDocuments(); + } + + @Override + public Boolean detailedErrorLoggingEnabled() { + return this.inner().detailedErrorLoggingEnabled(); + } + + @Override + public String documentRoot() { + return this.inner().documentRoot(); + } + + @Override + public Experiments experiments() { + return this.inner().experiments(); + } + + @Override + public FtpsState ftpsState() { + return this.inner().ftpsState(); + } + + @Override + public List handlerMappings() { + return this.inner().handlerMappings(); + } + + @Override + public String healthCheckPath() { + return this.inner().healthCheckPath(); + } + + @Override + public Boolean http20Enabled() { + return this.inner().http20Enabled(); + } + + @Override + public Boolean httpLoggingEnabled() { + return this.inner().httpLoggingEnabled(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public List ipSecurityRestrictions() { + return this.inner().ipSecurityRestrictions(); + } + + @Override + public String javaContainer() { + return this.inner().javaContainer(); + } + + @Override + public String javaContainerVersion() { + return this.inner().javaContainerVersion(); + } + + @Override + public String javaVersion() { + return this.inner().javaVersion(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public SiteLimits limits() { + return this.inner().limits(); + } + + @Override + public String linuxFxVersion() { + return this.inner().linuxFxVersion(); + } + + @Override + public SiteLoadBalancing loadBalancing() { + return this.inner().loadBalancing(); + } + + @Override + public Boolean localMySqlEnabled() { + return this.inner().localMySqlEnabled(); + } + + @Override + public Integer logsDirectorySizeLimit() { + return this.inner().logsDirectorySizeLimit(); + } + + @Override + public SiteMachineKey machineKey() { + return this.inner().machineKey(); + } + + @Override + public ManagedPipelineMode managedPipelineMode() { + return this.inner().managedPipelineMode(); + } + + @Override + public Integer managedServiceIdentityId() { + return this.inner().managedServiceIdentityId(); + } + + @Override + public SupportedTlsVersions minTlsVersion() { + return this.inner().minTlsVersion(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String netFrameworkVersion() { + return this.inner().netFrameworkVersion(); + } + + @Override + public String nodeVersion() { + return this.inner().nodeVersion(); + } + + @Override + public Integer numberOfWorkers() { + return this.inner().numberOfWorkers(); + } + + @Override + public String phpVersion() { + return this.inner().phpVersion(); + } + + @Override + public String powerShellVersion() { + return this.inner().powerShellVersion(); + } + + @Override + public Integer preWarmedInstanceCount() { + return this.inner().preWarmedInstanceCount(); + } + + @Override + public String publishingUsername() { + return this.inner().publishingUsername(); + } + + @Override + public PushSettingsInner push() { + return this.inner().push(); + } + + @Override + public String pythonVersion() { + return this.inner().pythonVersion(); + } + + @Override + public Boolean remoteDebuggingEnabled() { + return this.inner().remoteDebuggingEnabled(); + } + + @Override + public String remoteDebuggingVersion() { + return this.inner().remoteDebuggingVersion(); + } + + @Override + public Boolean requestTracingEnabled() { + return this.inner().requestTracingEnabled(); + } + + @Override + public DateTime requestTracingExpirationTime() { + return this.inner().requestTracingExpirationTime(); + } + + @Override + public List scmIpSecurityRestrictions() { + return this.inner().scmIpSecurityRestrictions(); + } + + @Override + public Boolean scmIpSecurityRestrictionsUseMain() { + return this.inner().scmIpSecurityRestrictionsUseMain(); + } + + @Override + public ScmType scmType() { + return this.inner().scmType(); + } + + @Override + public String tracingOptions() { + return this.inner().tracingOptions(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public Boolean use32BitWorkerProcess() { + return this.inner().use32BitWorkerProcess(); + } + + @Override + public List virtualApplications() { + return this.inner().virtualApplications(); + } + + @Override + public String vnetName() { + return this.inner().vnetName(); + } + + @Override + public Boolean webSocketsEnabled() { + return this.inner().webSocketsEnabled(); + } + + @Override + public String windowsFxVersion() { + return this.inner().windowsFxVersion(); + } + + @Override + public Integer xManagedServiceIdentityId() { + return this.inner().xManagedServiceIdentityId(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteConfigResourceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteConfigResourceInner.java new file mode 100644 index 0000000000000..80cacb27e25c8 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteConfigResourceInner.java @@ -0,0 +1,1529 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.NameValuePair; +import com.microsoft.azure.management.appservice.v2019_08_01.ConnStringInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteMachineKey; +import com.microsoft.azure.management.appservice.v2019_08_01.HandlerMapping; +import com.microsoft.azure.management.appservice.v2019_08_01.ScmType; +import com.microsoft.azure.management.appservice.v2019_08_01.ManagedPipelineMode; +import com.microsoft.azure.management.appservice.v2019_08_01.VirtualApplication; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteLoadBalancing; +import com.microsoft.azure.management.appservice.v2019_08_01.Experiments; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteLimits; +import com.microsoft.azure.management.appservice.v2019_08_01.AutoHealRules; +import com.microsoft.azure.management.appservice.v2019_08_01.CorsSettings; +import com.microsoft.azure.management.appservice.v2019_08_01.ApiDefinitionInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.ApiManagementConfig; +import com.microsoft.azure.management.appservice.v2019_08_01.IpSecurityRestriction; +import com.microsoft.azure.management.appservice.v2019_08_01.SupportedTlsVersions; +import com.microsoft.azure.management.appservice.v2019_08_01.FtpsState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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; + + /** + * Version of PowerShell. + */ + @JsonProperty(value = "properties.powerShellVersion") + private String powerShellVersion; + + /** + * Linux App Framework and version. + */ + @JsonProperty(value = "properties.linuxFxVersion") + private String linuxFxVersion; + + /** + * Xenon App Framework and version. + */ + @JsonProperty(value = "properties.windowsFxVersion") + private String windowsFxVersion; + + /** + * <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; + + /** + * Flag to use Managed Identity Creds for ACR pull. + */ + @JsonProperty(value = "properties.acrUseManagedIdentityCreds") + private Boolean acrUseManagedIdentityCreds; + + /** + * If using user managed identity, the user managed identity ClientId. + */ + @JsonProperty(value = "properties.acrUserManagedIdentityID") + private String acrUserManagedIdentityID; + + /** + * 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', 'VSTSRM'. + */ + @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 polymorphic 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; + + /** + * Azure API management settings linked to the app. + */ + @JsonProperty(value = "properties.apiManagementConfig") + private ApiManagementConfig apiManagementConfig; + + /** + * 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; + + /** + * Managed Service Identity Id. + */ + @JsonProperty(value = "properties.managedServiceIdentityId") + private Integer managedServiceIdentityId; + + /** + * Explicit Managed Service Identity Id. + */ + @JsonProperty(value = "properties.xManagedServiceIdentityId") + private Integer xManagedServiceIdentityId; + + /** + * IP security restrictions for main. + */ + @JsonProperty(value = "properties.ipSecurityRestrictions") + private List ipSecurityRestrictions; + + /** + * IP security restrictions for scm. + */ + @JsonProperty(value = "properties.scmIpSecurityRestrictions") + private List scmIpSecurityRestrictions; + + /** + * IP security restrictions for scm to use main. + */ + @JsonProperty(value = "properties.scmIpSecurityRestrictionsUseMain") + private Boolean scmIpSecurityRestrictionsUseMain; + + /** + * 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; + + /** + * State of FTP / FTPS service. Possible values include: 'AllAllowed', + * 'FtpsOnly', 'Disabled'. + */ + @JsonProperty(value = "properties.ftpsState") + private FtpsState ftpsState; + + /** + * Number of preWarmed instances. + * This setting only applies to the Consumption and Elastic Plans. + */ + @JsonProperty(value = "properties.preWarmedInstanceCount") + private Integer preWarmedInstanceCount; + + /** + * Health check path. + */ + @JsonProperty(value = "properties.healthCheckPath") + private String healthCheckPath; + + /** + * Get number of workers. + * + * @return the numberOfWorkers value + */ + public Integer numberOfWorkers() { + return this.numberOfWorkers; + } + + /** + * Set number of workers. + * + * @param numberOfWorkers the numberOfWorkers value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withNumberOfWorkers(Integer numberOfWorkers) { + this.numberOfWorkers = numberOfWorkers; + return this; + } + + /** + * Get default documents. + * + * @return the defaultDocuments value + */ + public List defaultDocuments() { + return this.defaultDocuments; + } + + /** + * Set default documents. + * + * @param defaultDocuments the defaultDocuments value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withDefaultDocuments(List defaultDocuments) { + this.defaultDocuments = defaultDocuments; + return this; + } + + /** + * Get .NET Framework version. + * + * @return the netFrameworkVersion value + */ + public String netFrameworkVersion() { + return this.netFrameworkVersion; + } + + /** + * Set .NET Framework version. + * + * @param netFrameworkVersion the netFrameworkVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withNetFrameworkVersion(String netFrameworkVersion) { + this.netFrameworkVersion = netFrameworkVersion; + return this; + } + + /** + * Get version of PHP. + * + * @return the phpVersion value + */ + public String phpVersion() { + return this.phpVersion; + } + + /** + * Set version of PHP. + * + * @param phpVersion the phpVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPhpVersion(String phpVersion) { + this.phpVersion = phpVersion; + return this; + } + + /** + * Get version of Python. + * + * @return the pythonVersion value + */ + public String pythonVersion() { + return this.pythonVersion; + } + + /** + * Set version of Python. + * + * @param pythonVersion the pythonVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPythonVersion(String pythonVersion) { + this.pythonVersion = pythonVersion; + return this; + } + + /** + * Get version of Node.js. + * + * @return the nodeVersion value + */ + public String nodeVersion() { + return this.nodeVersion; + } + + /** + * Set version of Node.js. + * + * @param nodeVersion the nodeVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withNodeVersion(String nodeVersion) { + this.nodeVersion = nodeVersion; + return this; + } + + /** + * Get version of PowerShell. + * + * @return the powerShellVersion value + */ + public String powerShellVersion() { + return this.powerShellVersion; + } + + /** + * Set version of PowerShell. + * + * @param powerShellVersion the powerShellVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPowerShellVersion(String powerShellVersion) { + this.powerShellVersion = powerShellVersion; + return this; + } + + /** + * Get linux App Framework and version. + * + * @return the linuxFxVersion value + */ + public String linuxFxVersion() { + return this.linuxFxVersion; + } + + /** + * Set linux App Framework and version. + * + * @param linuxFxVersion the linuxFxVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withLinuxFxVersion(String linuxFxVersion) { + this.linuxFxVersion = linuxFxVersion; + return this; + } + + /** + * Get xenon App Framework and version. + * + * @return the windowsFxVersion value + */ + public String windowsFxVersion() { + return this.windowsFxVersion; + } + + /** + * Set xenon App Framework and version. + * + * @param windowsFxVersion the windowsFxVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withWindowsFxVersion(String windowsFxVersion) { + this.windowsFxVersion = windowsFxVersion; + return this; + } + + /** + * Get <code>true</code> if request tracing is enabled; otherwise, <code>false</code>. + * + * @return the requestTracingEnabled value + */ + public Boolean requestTracingEnabled() { + return this.requestTracingEnabled; + } + + /** + * Set <code>true</code> if request tracing is enabled; otherwise, <code>false</code>. + * + * @param requestTracingEnabled the requestTracingEnabled value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withRequestTracingEnabled(Boolean requestTracingEnabled) { + this.requestTracingEnabled = requestTracingEnabled; + return this; + } + + /** + * Get request tracing expiration time. + * + * @return the requestTracingExpirationTime value + */ + public DateTime requestTracingExpirationTime() { + return this.requestTracingExpirationTime; + } + + /** + * Set request tracing expiration time. + * + * @param requestTracingExpirationTime the requestTracingExpirationTime value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withRequestTracingExpirationTime(DateTime requestTracingExpirationTime) { + this.requestTracingExpirationTime = requestTracingExpirationTime; + return this; + } + + /** + * Get <code>true</code> if remote debugging is enabled; otherwise, <code>false</code>. + * + * @return the remoteDebuggingEnabled value + */ + public Boolean remoteDebuggingEnabled() { + return this.remoteDebuggingEnabled; + } + + /** + * Set <code>true</code> if remote debugging is enabled; otherwise, <code>false</code>. + * + * @param remoteDebuggingEnabled the remoteDebuggingEnabled value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withRemoteDebuggingEnabled(Boolean remoteDebuggingEnabled) { + this.remoteDebuggingEnabled = remoteDebuggingEnabled; + return this; + } + + /** + * Get remote debugging version. + * + * @return the remoteDebuggingVersion value + */ + public String remoteDebuggingVersion() { + return this.remoteDebuggingVersion; + } + + /** + * Set remote debugging version. + * + * @param remoteDebuggingVersion the remoteDebuggingVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withRemoteDebuggingVersion(String remoteDebuggingVersion) { + this.remoteDebuggingVersion = remoteDebuggingVersion; + return this; + } + + /** + * Get <code>true</code> if HTTP logging is enabled; otherwise, <code>false</code>. + * + * @return the httpLoggingEnabled value + */ + public Boolean httpLoggingEnabled() { + return this.httpLoggingEnabled; + } + + /** + * Set <code>true</code> if HTTP logging is enabled; otherwise, <code>false</code>. + * + * @param httpLoggingEnabled the httpLoggingEnabled value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withHttpLoggingEnabled(Boolean httpLoggingEnabled) { + this.httpLoggingEnabled = httpLoggingEnabled; + return this; + } + + /** + * Get flag to use Managed Identity Creds for ACR pull. + * + * @return the acrUseManagedIdentityCreds value + */ + public Boolean acrUseManagedIdentityCreds() { + return this.acrUseManagedIdentityCreds; + } + + /** + * Set flag to use Managed Identity Creds for ACR pull. + * + * @param acrUseManagedIdentityCreds the acrUseManagedIdentityCreds value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAcrUseManagedIdentityCreds(Boolean acrUseManagedIdentityCreds) { + this.acrUseManagedIdentityCreds = acrUseManagedIdentityCreds; + return this; + } + + /** + * Get if using user managed identity, the user managed identity ClientId. + * + * @return the acrUserManagedIdentityID value + */ + public String acrUserManagedIdentityID() { + return this.acrUserManagedIdentityID; + } + + /** + * Set if using user managed identity, the user managed identity ClientId. + * + * @param acrUserManagedIdentityID the acrUserManagedIdentityID value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAcrUserManagedIdentityID(String acrUserManagedIdentityID) { + this.acrUserManagedIdentityID = acrUserManagedIdentityID; + return this; + } + + /** + * Get hTTP logs directory size limit. + * + * @return the logsDirectorySizeLimit value + */ + public Integer logsDirectorySizeLimit() { + return this.logsDirectorySizeLimit; + } + + /** + * Set hTTP logs directory size limit. + * + * @param logsDirectorySizeLimit the logsDirectorySizeLimit value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withLogsDirectorySizeLimit(Integer logsDirectorySizeLimit) { + this.logsDirectorySizeLimit = logsDirectorySizeLimit; + return this; + } + + /** + * Get <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. + * + * @return the detailedErrorLoggingEnabled value + */ + public Boolean detailedErrorLoggingEnabled() { + return this.detailedErrorLoggingEnabled; + } + + /** + * Set <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. + * + * @param detailedErrorLoggingEnabled the detailedErrorLoggingEnabled value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withDetailedErrorLoggingEnabled(Boolean detailedErrorLoggingEnabled) { + this.detailedErrorLoggingEnabled = detailedErrorLoggingEnabled; + return this; + } + + /** + * Get publishing user name. + * + * @return the publishingUsername value + */ + public String publishingUsername() { + return this.publishingUsername; + } + + /** + * Set publishing user name. + * + * @param publishingUsername the publishingUsername value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPublishingUsername(String publishingUsername) { + this.publishingUsername = publishingUsername; + return this; + } + + /** + * Get application settings. + * + * @return the appSettings value + */ + public List appSettings() { + return this.appSettings; + } + + /** + * Set application settings. + * + * @param appSettings the appSettings value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAppSettings(List appSettings) { + this.appSettings = appSettings; + return this; + } + + /** + * Get connection strings. + * + * @return the connectionStrings value + */ + public List connectionStrings() { + return this.connectionStrings; + } + + /** + * Set connection strings. + * + * @param connectionStrings the connectionStrings value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withConnectionStrings(List connectionStrings) { + this.connectionStrings = connectionStrings; + return this; + } + + /** + * Get site MachineKey. + * + * @return the machineKey value + */ + public SiteMachineKey machineKey() { + return this.machineKey; + } + + /** + * Get handler mappings. + * + * @return the handlerMappings value + */ + public List handlerMappings() { + return this.handlerMappings; + } + + /** + * Set handler mappings. + * + * @param handlerMappings the handlerMappings value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withHandlerMappings(List handlerMappings) { + this.handlerMappings = handlerMappings; + return this; + } + + /** + * Get document root. + * + * @return the documentRoot value + */ + public String documentRoot() { + return this.documentRoot; + } + + /** + * Set document root. + * + * @param documentRoot the documentRoot value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withDocumentRoot(String documentRoot) { + this.documentRoot = documentRoot; + return this; + } + + /** + * Get sCM type. Possible values include: 'None', 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', 'CodePlexHg', 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg', 'OneDrive', 'VSO', 'VSTSRM'. + * + * @return the scmType value + */ + public ScmType scmType() { + return this.scmType; + } + + /** + * Set sCM type. Possible values include: 'None', 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', 'CodePlexHg', 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg', 'OneDrive', 'VSO', 'VSTSRM'. + * + * @param scmType the scmType value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withScmType(ScmType scmType) { + this.scmType = scmType; + return this; + } + + /** + * Get <code>true</code> to use 32-bit worker process; otherwise, <code>false</code>. + * + * @return the use32BitWorkerProcess value + */ + public Boolean use32BitWorkerProcess() { + return this.use32BitWorkerProcess; + } + + /** + * Set <code>true</code> to use 32-bit worker process; otherwise, <code>false</code>. + * + * @param use32BitWorkerProcess the use32BitWorkerProcess value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withUse32BitWorkerProcess(Boolean use32BitWorkerProcess) { + this.use32BitWorkerProcess = use32BitWorkerProcess; + return this; + } + + /** + * Get <code>true</code> if WebSocket is enabled; otherwise, <code>false</code>. + * + * @return the webSocketsEnabled value + */ + public Boolean webSocketsEnabled() { + return this.webSocketsEnabled; + } + + /** + * Set <code>true</code> if WebSocket is enabled; otherwise, <code>false</code>. + * + * @param webSocketsEnabled the webSocketsEnabled value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withWebSocketsEnabled(Boolean webSocketsEnabled) { + this.webSocketsEnabled = webSocketsEnabled; + return this; + } + + /** + * Get <code>true</code> if Always On is enabled; otherwise, <code>false</code>. + * + * @return the alwaysOn value + */ + public Boolean alwaysOn() { + return this.alwaysOn; + } + + /** + * Set <code>true</code> if Always On is enabled; otherwise, <code>false</code>. + * + * @param alwaysOn the alwaysOn value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAlwaysOn(Boolean alwaysOn) { + this.alwaysOn = alwaysOn; + return this; + } + + /** + * Get java version. + * + * @return the javaVersion value + */ + public String javaVersion() { + return this.javaVersion; + } + + /** + * Set java version. + * + * @param javaVersion the javaVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withJavaVersion(String javaVersion) { + this.javaVersion = javaVersion; + return this; + } + + /** + * Get java container. + * + * @return the javaContainer value + */ + public String javaContainer() { + return this.javaContainer; + } + + /** + * Set java container. + * + * @param javaContainer the javaContainer value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withJavaContainer(String javaContainer) { + this.javaContainer = javaContainer; + return this; + } + + /** + * Get java container version. + * + * @return the javaContainerVersion value + */ + public String javaContainerVersion() { + return this.javaContainerVersion; + } + + /** + * Set java container version. + * + * @param javaContainerVersion the javaContainerVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withJavaContainerVersion(String javaContainerVersion) { + this.javaContainerVersion = javaContainerVersion; + return this; + } + + /** + * Get app command line to launch. + * + * @return the appCommandLine value + */ + public String appCommandLine() { + return this.appCommandLine; + } + + /** + * Set app command line to launch. + * + * @param appCommandLine the appCommandLine value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAppCommandLine(String appCommandLine) { + this.appCommandLine = appCommandLine; + return this; + } + + /** + * Get managed pipeline mode. Possible values include: 'Integrated', 'Classic'. + * + * @return the managedPipelineMode value + */ + public ManagedPipelineMode managedPipelineMode() { + return this.managedPipelineMode; + } + + /** + * Set managed pipeline mode. Possible values include: 'Integrated', 'Classic'. + * + * @param managedPipelineMode the managedPipelineMode value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withManagedPipelineMode(ManagedPipelineMode managedPipelineMode) { + this.managedPipelineMode = managedPipelineMode; + return this; + } + + /** + * Get virtual applications. + * + * @return the virtualApplications value + */ + public List virtualApplications() { + return this.virtualApplications; + } + + /** + * Set virtual applications. + * + * @param virtualApplications the virtualApplications value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withVirtualApplications(List virtualApplications) { + this.virtualApplications = virtualApplications; + return this; + } + + /** + * Get site load balancing. Possible values include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash'. + * + * @return the loadBalancing value + */ + public SiteLoadBalancing loadBalancing() { + return this.loadBalancing; + } + + /** + * Set site load balancing. Possible values include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash'. + * + * @param loadBalancing the loadBalancing value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withLoadBalancing(SiteLoadBalancing loadBalancing) { + this.loadBalancing = loadBalancing; + return this; + } + + /** + * Get this is work around for polymorphic types. + * + * @return the experiments value + */ + public Experiments experiments() { + return this.experiments; + } + + /** + * Set this is work around for polymorphic types. + * + * @param experiments the experiments value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withExperiments(Experiments experiments) { + this.experiments = experiments; + return this; + } + + /** + * Get site limits. + * + * @return the limits value + */ + public SiteLimits limits() { + return this.limits; + } + + /** + * Set site limits. + * + * @param limits the limits value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withLimits(SiteLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get <code>true</code> if Auto Heal is enabled; otherwise, <code>false</code>. + * + * @return the autoHealEnabled value + */ + public Boolean autoHealEnabled() { + return this.autoHealEnabled; + } + + /** + * Set <code>true</code> if Auto Heal is enabled; otherwise, <code>false</code>. + * + * @param autoHealEnabled the autoHealEnabled value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAutoHealEnabled(Boolean autoHealEnabled) { + this.autoHealEnabled = autoHealEnabled; + return this; + } + + /** + * Get auto Heal rules. + * + * @return the autoHealRules value + */ + public AutoHealRules autoHealRules() { + return this.autoHealRules; + } + + /** + * Set auto Heal rules. + * + * @param autoHealRules the autoHealRules value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAutoHealRules(AutoHealRules autoHealRules) { + this.autoHealRules = autoHealRules; + return this; + } + + /** + * Get tracing options. + * + * @return the tracingOptions value + */ + public String tracingOptions() { + return this.tracingOptions; + } + + /** + * Set tracing options. + * + * @param tracingOptions the tracingOptions value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withTracingOptions(String tracingOptions) { + this.tracingOptions = tracingOptions; + return this; + } + + /** + * Get virtual Network name. + * + * @return the vnetName value + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set virtual Network name. + * + * @param vnetName the vnetName value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get cross-Origin Resource Sharing (CORS) settings. + * + * @return the cors value + */ + public CorsSettings cors() { + return this.cors; + } + + /** + * Set cross-Origin Resource Sharing (CORS) settings. + * + * @param cors the cors value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withCors(CorsSettings cors) { + this.cors = cors; + return this; + } + + /** + * Get push endpoint settings. + * + * @return the push value + */ + public PushSettingsInner push() { + return this.push; + } + + /** + * Set push endpoint settings. + * + * @param push the push value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPush(PushSettingsInner push) { + this.push = push; + return this; + } + + /** + * Get information about the formal API definition for the app. + * + * @return the apiDefinition value + */ + public ApiDefinitionInfo apiDefinition() { + return this.apiDefinition; + } + + /** + * Set information about the formal API definition for the app. + * + * @param apiDefinition the apiDefinition value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withApiDefinition(ApiDefinitionInfo apiDefinition) { + this.apiDefinition = apiDefinition; + return this; + } + + /** + * Get azure API management settings linked to the app. + * + * @return the apiManagementConfig value + */ + public ApiManagementConfig apiManagementConfig() { + return this.apiManagementConfig; + } + + /** + * Set azure API management settings linked to the app. + * + * @param apiManagementConfig the apiManagementConfig value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withApiManagementConfig(ApiManagementConfig apiManagementConfig) { + this.apiManagementConfig = apiManagementConfig; + return this; + } + + /** + * Get auto-swap slot name. + * + * @return the autoSwapSlotName value + */ + public String autoSwapSlotName() { + return this.autoSwapSlotName; + } + + /** + * Set auto-swap slot name. + * + * @param autoSwapSlotName the autoSwapSlotName value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAutoSwapSlotName(String autoSwapSlotName) { + this.autoSwapSlotName = autoSwapSlotName; + return this; + } + + /** + * Get <code>true</code> to enable local MySQL; otherwise, <code>false</code>. + * + * @return the localMySqlEnabled value + */ + public Boolean localMySqlEnabled() { + return this.localMySqlEnabled; + } + + /** + * Set <code>true</code> to enable local MySQL; otherwise, <code>false</code>. + * + * @param localMySqlEnabled the localMySqlEnabled value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withLocalMySqlEnabled(Boolean localMySqlEnabled) { + this.localMySqlEnabled = localMySqlEnabled; + return this; + } + + /** + * Get managed Service Identity Id. + * + * @return the managedServiceIdentityId value + */ + public Integer managedServiceIdentityId() { + return this.managedServiceIdentityId; + } + + /** + * Set managed Service Identity Id. + * + * @param managedServiceIdentityId the managedServiceIdentityId value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withManagedServiceIdentityId(Integer managedServiceIdentityId) { + this.managedServiceIdentityId = managedServiceIdentityId; + return this; + } + + /** + * Get explicit Managed Service Identity Id. + * + * @return the xManagedServiceIdentityId value + */ + public Integer xManagedServiceIdentityId() { + return this.xManagedServiceIdentityId; + } + + /** + * Set explicit Managed Service Identity Id. + * + * @param xManagedServiceIdentityId the xManagedServiceIdentityId value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withXManagedServiceIdentityId(Integer xManagedServiceIdentityId) { + this.xManagedServiceIdentityId = xManagedServiceIdentityId; + return this; + } + + /** + * Get iP security restrictions for main. + * + * @return the ipSecurityRestrictions value + */ + public List ipSecurityRestrictions() { + return this.ipSecurityRestrictions; + } + + /** + * Set iP security restrictions for main. + * + * @param ipSecurityRestrictions the ipSecurityRestrictions value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withIpSecurityRestrictions(List ipSecurityRestrictions) { + this.ipSecurityRestrictions = ipSecurityRestrictions; + return this; + } + + /** + * Get iP security restrictions for scm. + * + * @return the scmIpSecurityRestrictions value + */ + public List scmIpSecurityRestrictions() { + return this.scmIpSecurityRestrictions; + } + + /** + * Set iP security restrictions for scm. + * + * @param scmIpSecurityRestrictions the scmIpSecurityRestrictions value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withScmIpSecurityRestrictions(List scmIpSecurityRestrictions) { + this.scmIpSecurityRestrictions = scmIpSecurityRestrictions; + return this; + } + + /** + * Get iP security restrictions for scm to use main. + * + * @return the scmIpSecurityRestrictionsUseMain value + */ + public Boolean scmIpSecurityRestrictionsUseMain() { + return this.scmIpSecurityRestrictionsUseMain; + } + + /** + * Set iP security restrictions for scm to use main. + * + * @param scmIpSecurityRestrictionsUseMain the scmIpSecurityRestrictionsUseMain value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withScmIpSecurityRestrictionsUseMain(Boolean scmIpSecurityRestrictionsUseMain) { + this.scmIpSecurityRestrictionsUseMain = scmIpSecurityRestrictionsUseMain; + return this; + } + + /** + * Get http20Enabled: configures a web site to allow clients to connect over http2.0. + * + * @return the http20Enabled value + */ + public Boolean http20Enabled() { + return this.http20Enabled; + } + + /** + * Set http20Enabled: configures a web site to allow clients to connect over http2.0. + * + * @param http20Enabled the http20Enabled value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withHttp20Enabled(Boolean http20Enabled) { + this.http20Enabled = http20Enabled; + return this; + } + + /** + * Get minTlsVersion: configures the minimum version of TLS required for SSL requests. Possible values include: '1.0', '1.1', '1.2'. + * + * @return the minTlsVersion value + */ + public SupportedTlsVersions minTlsVersion() { + return this.minTlsVersion; + } + + /** + * Set minTlsVersion: configures the minimum version of TLS required for SSL requests. Possible values include: '1.0', '1.1', '1.2'. + * + * @param minTlsVersion the minTlsVersion value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withMinTlsVersion(SupportedTlsVersions minTlsVersion) { + this.minTlsVersion = minTlsVersion; + return this; + } + + /** + * Get state of FTP / FTPS service. Possible values include: 'AllAllowed', 'FtpsOnly', 'Disabled'. + * + * @return the ftpsState value + */ + public FtpsState ftpsState() { + return this.ftpsState; + } + + /** + * Set state of FTP / FTPS service. Possible values include: 'AllAllowed', 'FtpsOnly', 'Disabled'. + * + * @param ftpsState the ftpsState value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withFtpsState(FtpsState ftpsState) { + this.ftpsState = ftpsState; + return this; + } + + /** + * Get number of preWarmed instances. + This setting only applies to the Consumption and Elastic Plans. + * + * @return the preWarmedInstanceCount value + */ + public Integer preWarmedInstanceCount() { + return this.preWarmedInstanceCount; + } + + /** + * Set number of preWarmed instances. + This setting only applies to the Consumption and Elastic Plans. + * + * @param preWarmedInstanceCount the preWarmedInstanceCount value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPreWarmedInstanceCount(Integer preWarmedInstanceCount) { + this.preWarmedInstanceCount = preWarmedInstanceCount; + return this; + } + + /** + * Get health check path. + * + * @return the healthCheckPath value + */ + public String healthCheckPath() { + return this.healthCheckPath; + } + + /** + * Set health check path. + * + * @param healthCheckPath the healthCheckPath value to set + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withHealthCheckPath(String healthCheckPath) { + this.healthCheckPath = healthCheckPath; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteConfigurationSnapshotInfoImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteConfigurationSnapshotInfoImpl.java new file mode 100644 index 0000000000000..e8afe36247bb9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteConfigurationSnapshotInfoImpl.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SiteConfigurationSnapshotInfo; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import org.joda.time.DateTime; + +class SiteConfigurationSnapshotInfoImpl extends WrapperImpl implements SiteConfigurationSnapshotInfo { + private final CertificateRegistrationManager manager; + SiteConfigurationSnapshotInfoImpl(SiteConfigurationSnapshotInfoInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Integer snapshotId() { + return this.inner().snapshotId(); + } + + @Override + public DateTime time() { + return this.inner().time(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteConfigurationSnapshotInfoInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteConfigurationSnapshotInfoInner.java new file mode 100644 index 0000000000000..12d849f0083f9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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.snapshotId", access = JsonProperty.Access.WRITE_ONLY) + private Integer snapshotId; + + /** + * Get the time the snapshot was taken. + * + * @return the time value + */ + public DateTime time() { + return this.time; + } + + /** + * Get the id of the snapshot. + * + * @return the snapshotId value + */ + public Integer snapshotId() { + return this.snapshotId; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteCsmUsageQuotaImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteCsmUsageQuotaImpl.java new file mode 100644 index 0000000000000..329a6f56579bd --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteCsmUsageQuotaImpl.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SiteCsmUsageQuota; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.LocalizableString; +import org.joda.time.DateTime; + +class SiteCsmUsageQuotaImpl extends WrapperImpl implements SiteCsmUsageQuota { + private final CertificateRegistrationManager manager; + + SiteCsmUsageQuotaImpl(CsmUsageQuotaInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public Long currentValue() { + return this.inner().currentValue(); + } + + @Override + public Long limit() { + return this.inner().limit(); + } + + @Override + public LocalizableString name() { + return this.inner().name(); + } + + @Override + public DateTime nextResetTime() { + return this.inner().nextResetTime(); + } + + @Override + public String unit() { + return this.inner().unit(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteExtensionInfoImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteExtensionInfoImpl.java new file mode 100644 index 0000000000000..e94b575ed4a17 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteExtensionInfoImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SiteExtensionInfo; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteExtensionType; +import org.joda.time.DateTime; + +class SiteExtensionInfoImpl extends CreatableUpdatableImpl implements SiteExtensionInfo, SiteExtensionInfo.Definition, SiteExtensionInfo.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String siteExtensionId; + + SiteExtensionInfoImpl(String name, CertificateRegistrationManager manager) { + super(name, new SiteExtensionInfoInner()); + this.manager = manager; + // Set resource name + this.siteExtensionId = name; + // + } + + SiteExtensionInfoImpl(SiteExtensionInfoInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.siteExtensionId = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.siteExtensionId = IdParsingUtils.getValueFromIdByName(inner.id(), "siteextensions"); + // + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.installSiteExtensionAsync(this.resourceGroupName, this.name, this.siteExtensionId) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.installSiteExtensionAsync(this.resourceGroupName, this.name, this.siteExtensionId) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getSiteExtensionAsync(this.resourceGroupName, this.name, this.siteExtensionId); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public List authors() { + return this.inner().authors(); + } + + @Override + public String comment() { + return this.inner().comment(); + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public Integer downloadCount() { + return this.inner().downloadCount(); + } + + @Override + public String extensionId() { + return this.inner().extensionId(); + } + + @Override + public SiteExtensionType extensionType() { + return this.inner().extensionType(); + } + + @Override + public String extensionUrl() { + return this.inner().extensionUrl(); + } + + @Override + public String feedUrl() { + return this.inner().feedUrl(); + } + + @Override + public String iconUrl() { + return this.inner().iconUrl(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public DateTime installedDateTime() { + return this.inner().installedDateTime(); + } + + @Override + public String installerCommandLineParams() { + return this.inner().installerCommandLineParams(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String licenseUrl() { + return this.inner().licenseUrl(); + } + + @Override + public Boolean localIsLatestVersion() { + return this.inner().localIsLatestVersion(); + } + + @Override + public String localPath() { + return this.inner().localPath(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String projectUrl() { + return this.inner().projectUrl(); + } + + @Override + public String provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public DateTime publishedDateTime() { + return this.inner().publishedDateTime(); + } + + @Override + public String summary() { + return this.inner().summary(); + } + + @Override + public String title() { + return this.inner().title(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String version() { + return this.inner().version(); + } + + @Override + public SiteExtensionInfoImpl withExistingSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteExtensionInfoInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteExtensionInfoInner.java new file mode 100644 index 0000000000000..59f58f719074d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Site Extension Information. + */ +@JsonFlatten +public class SiteExtensionInfoInner extends ProxyOnlyResource { + /** + * Site extension ID. + */ + @JsonProperty(value = "properties.extension_id") + private String extensionId; + + /** + * The title property. + */ + @JsonProperty(value = "properties.title") + private String title; + + /** + * Site extension type. Possible values include: 'Gallery', 'WebRoot'. + */ + @JsonProperty(value = "properties.extension_type") + private SiteExtensionType extensionType; + + /** + * 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.extension_url") + private String extensionUrl; + + /** + * Project URL. + */ + @JsonProperty(value = "properties.project_url") + private String projectUrl; + + /** + * Icon URL. + */ + @JsonProperty(value = "properties.icon_url") + private String iconUrl; + + /** + * License URL. + */ + @JsonProperty(value = "properties.license_url") + private String licenseUrl; + + /** + * Feed URL. + */ + @JsonProperty(value = "properties.feed_url") + private String feedUrl; + + /** + * List of authors. + */ + @JsonProperty(value = "properties.authors") + private List authors; + + /** + * Installer command line parameters. + */ + @JsonProperty(value = "properties.installer_command_line_params") + private String installerCommandLineParams; + + /** + * Published timestamp. + */ + @JsonProperty(value = "properties.published_date_time") + private DateTime publishedDateTime; + + /** + * Count of downloads. + */ + @JsonProperty(value = "properties.download_count") + private Integer downloadCount; + + /** + * <code>true</code> if the local version is the latest + * version; <code>false</code> otherwise. + */ + @JsonProperty(value = "properties.local_is_latest_version") + private Boolean localIsLatestVersion; + + /** + * Local path. + */ + @JsonProperty(value = "properties.local_path") + private String localPath; + + /** + * Installed timestamp. + */ + @JsonProperty(value = "properties.installed_date_time") + private DateTime installedDateTime; + + /** + * Provisioning state. + */ + @JsonProperty(value = "properties.provisioningState") + private String provisioningState; + + /** + * Site Extension comment. + */ + @JsonProperty(value = "properties.comment") + private String comment; + + /** + * Get site extension ID. + * + * @return the extensionId value + */ + public String extensionId() { + return this.extensionId; + } + + /** + * Set site extension ID. + * + * @param extensionId the extensionId value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withExtensionId(String extensionId) { + this.extensionId = extensionId; + 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 site extension type. Possible values include: 'Gallery', 'WebRoot'. + * + * @return the extensionType value + */ + public SiteExtensionType extensionType() { + return this.extensionType; + } + + /** + * Set site extension type. Possible values include: 'Gallery', 'WebRoot'. + * + * @param extensionType the extensionType value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withExtensionType(SiteExtensionType extensionType) { + this.extensionType = extensionType; + return this; + } + + /** + * Get summary description. + * + * @return the summary value + */ + public String summary() { + return this.summary; + } + + /** + * Set summary description. + * + * @param summary the summary value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withSummary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get detailed description. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set detailed description. + * + * @param description the description value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get version information. + * + * @return the version value + */ + public String version() { + return this.version; + } + + /** + * Set version information. + * + * @param version the version value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get extension URL. + * + * @return the extensionUrl value + */ + public String extensionUrl() { + return this.extensionUrl; + } + + /** + * Set extension URL. + * + * @param extensionUrl the extensionUrl value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withExtensionUrl(String extensionUrl) { + this.extensionUrl = extensionUrl; + return this; + } + + /** + * Get project URL. + * + * @return the projectUrl value + */ + public String projectUrl() { + return this.projectUrl; + } + + /** + * Set project URL. + * + * @param projectUrl the projectUrl value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withProjectUrl(String projectUrl) { + this.projectUrl = projectUrl; + return this; + } + + /** + * Get icon URL. + * + * @return the iconUrl value + */ + public String iconUrl() { + return this.iconUrl; + } + + /** + * Set icon URL. + * + * @param iconUrl the iconUrl value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withIconUrl(String iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + * Get license URL. + * + * @return the licenseUrl value + */ + public String licenseUrl() { + return this.licenseUrl; + } + + /** + * Set license URL. + * + * @param licenseUrl the licenseUrl value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withLicenseUrl(String licenseUrl) { + this.licenseUrl = licenseUrl; + return this; + } + + /** + * Get feed URL. + * + * @return the feedUrl value + */ + public String feedUrl() { + return this.feedUrl; + } + + /** + * Set feed URL. + * + * @param feedUrl the feedUrl value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withFeedUrl(String feedUrl) { + this.feedUrl = feedUrl; + return this; + } + + /** + * Get list of authors. + * + * @return the authors value + */ + public List authors() { + return this.authors; + } + + /** + * Set list of authors. + * + * @param authors the authors value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withAuthors(List authors) { + this.authors = authors; + return this; + } + + /** + * Get installer command line parameters. + * + * @return the installerCommandLineParams value + */ + public String installerCommandLineParams() { + return this.installerCommandLineParams; + } + + /** + * Set installer command line parameters. + * + * @param installerCommandLineParams the installerCommandLineParams value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withInstallerCommandLineParams(String installerCommandLineParams) { + this.installerCommandLineParams = installerCommandLineParams; + return this; + } + + /** + * Get published timestamp. + * + * @return the publishedDateTime value + */ + public DateTime publishedDateTime() { + return this.publishedDateTime; + } + + /** + * Set published timestamp. + * + * @param publishedDateTime the publishedDateTime value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withPublishedDateTime(DateTime publishedDateTime) { + this.publishedDateTime = publishedDateTime; + return this; + } + + /** + * Get count of downloads. + * + * @return the downloadCount value + */ + public Integer downloadCount() { + return this.downloadCount; + } + + /** + * Set count of downloads. + * + * @param downloadCount the downloadCount value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withDownloadCount(Integer downloadCount) { + this.downloadCount = downloadCount; + return this; + } + + /** + * Get <code>true</code> if the local version is the latest version; <code>false</code> otherwise. + * + * @return the localIsLatestVersion value + */ + public Boolean localIsLatestVersion() { + return this.localIsLatestVersion; + } + + /** + * Set <code>true</code> if the local version is the latest version; <code>false</code> otherwise. + * + * @param localIsLatestVersion the localIsLatestVersion value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withLocalIsLatestVersion(Boolean localIsLatestVersion) { + this.localIsLatestVersion = localIsLatestVersion; + return this; + } + + /** + * Get local path. + * + * @return the localPath value + */ + public String localPath() { + return this.localPath; + } + + /** + * Set local path. + * + * @param localPath the localPath value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withLocalPath(String localPath) { + this.localPath = localPath; + return this; + } + + /** + * Get installed timestamp. + * + * @return the installedDateTime value + */ + public DateTime installedDateTime() { + return this.installedDateTime; + } + + /** + * Set installed timestamp. + * + * @param installedDateTime the installedDateTime value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withInstalledDateTime(DateTime installedDateTime) { + this.installedDateTime = installedDateTime; + return this; + } + + /** + * Get provisioning state. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Set provisioning state. + * + * @param provisioningState the provisioningState value to set + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withProvisioningState(String provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get site Extension comment. + * + * @return the comment value + */ + public String comment() { + return this.comment; + } + + /** + * Set site Extension comment. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteHybridConnectionImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteHybridConnectionImpl.java new file mode 100644 index 0000000000000..12d8337cef7af --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteHybridConnectionImpl.java @@ -0,0 +1,196 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SiteHybridConnection; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; + +class SiteHybridConnectionImpl extends CreatableUpdatableImpl implements SiteHybridConnection, SiteHybridConnection.Definition, SiteHybridConnection.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String namespaceName; + private String relayName; + + SiteHybridConnectionImpl(String name, CertificateRegistrationManager manager) { + super(name, new HybridConnectionInner()); + this.manager = manager; + // Set resource name + this.relayName = name; + // + } + + SiteHybridConnectionImpl(HybridConnectionInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.relayName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.namespaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "hybridConnectionNamespaces"); + this.relayName = IdParsingUtils.getValueFromIdByName(inner.id(), "relays"); + // + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.createOrUpdateHybridConnectionAsync(this.resourceGroupName, this.name, this.namespaceName, this.relayName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.updateHybridConnectionAsync(this.resourceGroupName, this.name, this.namespaceName, this.relayName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getHybridConnectionAsync(this.resourceGroupName, this.name, this.namespaceName, this.relayName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String hostname() { + return this.inner().hostname(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Integer port() { + return this.inner().port(); + } + + @Override + public String relayArmUri() { + return this.inner().relayArmUri(); + } + + @Override + public String relayName() { + return this.inner().relayName(); + } + + @Override + public String sendKeyName() { + return this.inner().sendKeyName(); + } + + @Override + public String sendKeyValue() { + return this.inner().sendKeyValue(); + } + + @Override + public String serviceBusNamespace() { + return this.inner().serviceBusNamespace(); + } + + @Override + public String serviceBusSuffix() { + return this.inner().serviceBusSuffix(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public SiteHybridConnectionImpl withExistingHybridConnectionNamespace(String resourceGroupName, String name, String namespaceName) { + this.resourceGroupName = resourceGroupName; + this.name = name; + this.namespaceName = namespaceName; + return this; + } + + @Override + public SiteHybridConnectionImpl withHostname(String hostname) { + this.inner().withHostname(hostname); + return this; + } + + @Override + public SiteHybridConnectionImpl withKind(String kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public SiteHybridConnectionImpl withPort(Integer port) { + this.inner().withPort(port); + return this; + } + + @Override + public SiteHybridConnectionImpl withRelayArmUri(String relayArmUri) { + this.inner().withRelayArmUri(relayArmUri); + return this; + } + + @Override + public SiteHybridConnectionImpl withRelayName(String relayName) { + this.inner().withRelayName(relayName); + return this; + } + + @Override + public SiteHybridConnectionImpl withSendKeyName(String sendKeyName) { + this.inner().withSendKeyName(sendKeyName); + return this; + } + + @Override + public SiteHybridConnectionImpl withSendKeyValue(String sendKeyValue) { + this.inner().withSendKeyValue(sendKeyValue); + return this; + } + + @Override + public SiteHybridConnectionImpl withServiceBusNamespace(String serviceBusNamespace) { + this.inner().withServiceBusNamespace(serviceBusNamespace); + return this; + } + + @Override + public SiteHybridConnectionImpl withServiceBusSuffix(String serviceBusSuffix) { + this.inner().withServiceBusSuffix(serviceBusSuffix); + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteInner.java new file mode 100644 index 0000000000000..40848d30853de --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteInner.java @@ -0,0 +1,858 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.UsageState; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteAvailabilityState; +import com.microsoft.azure.management.appservice.v2019_08_01.HostNameSslState; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteConfig; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentProfile; +import com.microsoft.azure.management.appservice.v2019_08_01.CloningInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.SlotSwapStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.RedundancyMode; +import java.util.UUID; +import com.microsoft.azure.management.appservice.v2019_08_01.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; + + /** + * Obsolete: Hyper-V sandbox. + */ + @JsonProperty(value = "properties.isXenon") + private Boolean isXenon; + + /** + * Hyper-V sandbox. + */ + @JsonProperty(value = "properties.hyperV") + private Boolean hyperV; + + /** + * 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; + + /** + * client certificate authentication comma-separated exclusion paths. + */ + @JsonProperty(value = "properties.clientCertExclusionPaths") + private String clientCertExclusionPaths; + + /** + * <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 except dataComponent. + * 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; + + /** + * 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; + + /** + * Site redundancy mode. Possible values include: 'None', 'Manual', + * 'Failover', 'ActiveActive', 'GeoRedundant'. + */ + @JsonProperty(value = "properties.redundancyMode") + private RedundancyMode redundancyMode; + + /** + * Specifies an operation id if this site has a pending operation. + */ + @JsonProperty(value = "properties.inProgressOperationId", access = JsonProperty.Access.WRITE_ONLY) + private UUID inProgressOperationId; + + /** + * The identity property. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /** + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get current state of the app. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Get hostnames associated with the app. + * + * @return the hostNames value + */ + public List hostNames() { + return this.hostNames; + } + + /** + * Get name of the repository site. + * + * @return the repositorySiteName value + */ + public String repositorySiteName() { + return this.repositorySiteName; + } + + /** + * Get state indicating whether the app has exceeded its quota usage. Read-only. Possible values include: 'Normal', 'Exceeded'. + * + * @return the usageState value + */ + public UsageState usageState() { + return this.usageState; + } + + /** + * Get <code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline). + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set <code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline). + * + * @param enabled the enabled value to set + * @return the SiteInner object itself. + */ + public SiteInner withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get enabled hostnames for the app.Hostnames need to be assigned (see HostNames) AND enabled. Otherwise, + the app is not served on those hostnames. + * + * @return the enabledHostNames value + */ + public List enabledHostNames() { + return this.enabledHostNames; + } + + /** + * Get management information availability state for the app. Possible values include: 'Normal', 'Limited', 'DisasterRecoveryMode'. + * + * @return the availabilityState value + */ + public SiteAvailabilityState availabilityState() { + return this.availabilityState; + } + + /** + * Get hostname SSL states are used to manage the SSL bindings for app's hostnames. + * + * @return the hostNameSslStates value + */ + public List hostNameSslStates() { + return this.hostNameSslStates; + } + + /** + * Set hostname SSL states are used to manage the SSL bindings for app's hostnames. + * + * @param hostNameSslStates the hostNameSslStates value to set + * @return the SiteInner object itself. + */ + public SiteInner withHostNameSslStates(List hostNameSslStates) { + this.hostNameSslStates = hostNameSslStates; + return this; + } + + /** + * Get resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + * + * @return the serverFarmId value + */ + public String serverFarmId() { + return this.serverFarmId; + } + + /** + * Set resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". + * + * @param serverFarmId the serverFarmId value to set + * @return the SiteInner object itself. + */ + public SiteInner withServerFarmId(String serverFarmId) { + this.serverFarmId = serverFarmId; + return this; + } + + /** + * Get <code>true</code> if reserved; otherwise, <code>false</code>. + * + * @return the reserved value + */ + public Boolean reserved() { + return this.reserved; + } + + /** + * Set <code>true</code> if reserved; otherwise, <code>false</code>. + * + * @param reserved the reserved value to set + * @return the SiteInner object itself. + */ + public SiteInner withReserved(Boolean reserved) { + this.reserved = reserved; + return this; + } + + /** + * Get obsolete: Hyper-V sandbox. + * + * @return the isXenon value + */ + public Boolean isXenon() { + return this.isXenon; + } + + /** + * Set obsolete: Hyper-V sandbox. + * + * @param isXenon the isXenon value to set + * @return the SiteInner object itself. + */ + public SiteInner withIsXenon(Boolean isXenon) { + this.isXenon = isXenon; + return this; + } + + /** + * Get hyper-V sandbox. + * + * @return the hyperV value + */ + public Boolean hyperV() { + return this.hyperV; + } + + /** + * Set hyper-V sandbox. + * + * @param hyperV the hyperV value to set + * @return the SiteInner object itself. + */ + public SiteInner withHyperV(Boolean hyperV) { + this.hyperV = hyperV; + return this; + } + + /** + * Get last time the app was modified, in UTC. Read-only. + * + * @return the lastModifiedTimeUtc value + */ + public DateTime lastModifiedTimeUtc() { + return this.lastModifiedTimeUtc; + } + + /** + * Get configuration of the app. + * + * @return the siteConfig value + */ + public SiteConfig siteConfig() { + return this.siteConfig; + } + + /** + * Set configuration of the app. + * + * @param siteConfig the siteConfig value to set + * @return the SiteInner object itself. + */ + public SiteInner withSiteConfig(SiteConfig siteConfig) { + this.siteConfig = siteConfig; + return this; + } + + /** + * Get azure Traffic Manager hostnames associated with the app. Read-only. + * + * @return the trafficManagerHostNames value + */ + public List trafficManagerHostNames() { + return this.trafficManagerHostNames; + } + + /** + * Get <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. + * + * @return the scmSiteAlsoStopped value + */ + public Boolean scmSiteAlsoStopped() { + return this.scmSiteAlsoStopped; + } + + /** + * Set <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. + * + * @param scmSiteAlsoStopped the scmSiteAlsoStopped value to set + * @return the SiteInner object itself. + */ + public SiteInner withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped) { + this.scmSiteAlsoStopped = scmSiteAlsoStopped; + return this; + } + + /** + * Get specifies which deployment slot this app will swap into. Read-only. + * + * @return the targetSwapSlot value + */ + public String targetSwapSlot() { + return this.targetSwapSlot; + } + + /** + * Get app Service Environment to use for the app. + * + * @return the hostingEnvironmentProfile value + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Set app Service Environment to use for the app. + * + * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set + * @return the SiteInner object itself. + */ + public SiteInner withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + this.hostingEnvironmentProfile = hostingEnvironmentProfile; + return this; + } + + /** + * Get <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>. + * + * @return the clientAffinityEnabled value + */ + public Boolean clientAffinityEnabled() { + return this.clientAffinityEnabled; + } + + /** + * Set <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>. + * + * @param clientAffinityEnabled the clientAffinityEnabled value to set + * @return the SiteInner object itself. + */ + public SiteInner withClientAffinityEnabled(Boolean clientAffinityEnabled) { + this.clientAffinityEnabled = clientAffinityEnabled; + return this; + } + + /** + * Get <code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code>. + * + * @return the clientCertEnabled value + */ + public Boolean clientCertEnabled() { + return this.clientCertEnabled; + } + + /** + * Set <code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code>. + * + * @param clientCertEnabled the clientCertEnabled value to set + * @return the SiteInner object itself. + */ + public SiteInner withClientCertEnabled(Boolean clientCertEnabled) { + this.clientCertEnabled = clientCertEnabled; + return this; + } + + /** + * Get client certificate authentication comma-separated exclusion paths. + * + * @return the clientCertExclusionPaths value + */ + public String clientCertExclusionPaths() { + return this.clientCertExclusionPaths; + } + + /** + * Set client certificate authentication comma-separated exclusion paths. + * + * @param clientCertExclusionPaths the clientCertExclusionPaths value to set + * @return the SiteInner object itself. + */ + public SiteInner withClientCertExclusionPaths(String clientCertExclusionPaths) { + this.clientCertExclusionPaths = clientCertExclusionPaths; + return this; + } + + /** + * Get <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. + * + * @return the hostNamesDisabled value + */ + public Boolean hostNamesDisabled() { + return this.hostNamesDisabled; + } + + /** + * Set <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. + * + * @param hostNamesDisabled the hostNamesDisabled value to set + * @return the SiteInner object itself. + */ + public SiteInner withHostNamesDisabled(Boolean hostNamesDisabled) { + this.hostNamesDisabled = hostNamesDisabled; + return this; + } + + /** + * Get 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. + * + * @return the outboundIpAddresses value + */ + public String outboundIpAddresses() { + return this.outboundIpAddresses; + } + + /** + * Get list of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. + * + * @return the possibleOutboundIpAddresses value + */ + public String possibleOutboundIpAddresses() { + return this.possibleOutboundIpAddresses; + } + + /** + * Get size of the function container. + * + * @return the containerSize value + */ + public Integer containerSize() { + return this.containerSize; + } + + /** + * Set size of the function container. + * + * @param containerSize the containerSize value to set + * @return the SiteInner object itself. + */ + public SiteInner withContainerSize(Integer containerSize) { + this.containerSize = containerSize; + return this; + } + + /** + * Get maximum allowed daily memory-time quota (applicable on dynamic apps only). + * + * @return the dailyMemoryTimeQuota value + */ + public Integer dailyMemoryTimeQuota() { + return this.dailyMemoryTimeQuota; + } + + /** + * Set maximum allowed daily memory-time quota (applicable on dynamic apps only). + * + * @param dailyMemoryTimeQuota the dailyMemoryTimeQuota value to set + * @return the SiteInner object itself. + */ + public SiteInner withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota) { + this.dailyMemoryTimeQuota = dailyMemoryTimeQuota; + return this; + } + + /** + * Get app suspended till in case memory-time quota is exceeded. + * + * @return the suspendedTill value + */ + public DateTime suspendedTill() { + return this.suspendedTill; + } + + /** + * Get maximum number of workers. + This only applies to Functions container. + * + * @return the maxNumberOfWorkers value + */ + public Integer maxNumberOfWorkers() { + return this.maxNumberOfWorkers; + } + + /** + * Get if specified during app creation, the app is cloned from a source app. + * + * @return the cloningInfo value + */ + public CloningInfo cloningInfo() { + return this.cloningInfo; + } + + /** + * Set if specified during app creation, the app is cloned from a source app. + * + * @param cloningInfo the cloningInfo value to set + * @return the SiteInner object itself. + */ + public SiteInner withCloningInfo(CloningInfo cloningInfo) { + this.cloningInfo = cloningInfo; + return this; + } + + /** + * Get name of the resource group the app belongs to. Read-only. + * + * @return the resourceGroup value + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get <code>true</code> if the app is a default container; otherwise, <code>false</code>. + * + * @return the isDefaultContainer value + */ + public Boolean isDefaultContainer() { + return this.isDefaultContainer; + } + + /** + * Get default hostname of the app. Read-only. + * + * @return the defaultHostName value + */ + public String defaultHostName() { + return this.defaultHostName; + } + + /** + * Get status of the last deployment slot swap operation. + * + * @return the slotSwapStatus value + */ + public SlotSwapStatus slotSwapStatus() { + return this.slotSwapStatus; + } + + /** + * Get httpsOnly: configures a web site to accept only https requests. Issues redirect for + http requests. + * + * @return the httpsOnly value + */ + public Boolean httpsOnly() { + return this.httpsOnly; + } + + /** + * Set httpsOnly: configures a web site to accept only https requests. Issues redirect for + http requests. + * + * @param httpsOnly the httpsOnly value to set + * @return the SiteInner object itself. + */ + public SiteInner withHttpsOnly(Boolean httpsOnly) { + this.httpsOnly = httpsOnly; + return this; + } + + /** + * Get site redundancy mode. Possible values include: 'None', 'Manual', 'Failover', 'ActiveActive', 'GeoRedundant'. + * + * @return the redundancyMode value + */ + public RedundancyMode redundancyMode() { + return this.redundancyMode; + } + + /** + * Set site redundancy mode. Possible values include: 'None', 'Manual', 'Failover', 'ActiveActive', 'GeoRedundant'. + * + * @param redundancyMode the redundancyMode value to set + * @return the SiteInner object itself. + */ + public SiteInner withRedundancyMode(RedundancyMode redundancyMode) { + this.redundancyMode = redundancyMode; + return this; + } + + /** + * Get specifies an operation id if this site has a pending operation. + * + * @return the inProgressOperationId value + */ + public UUID inProgressOperationId() { + return this.inProgressOperationId; + } + + /** + * 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; + } + + /** + * Get kind of resource. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Set kind of resource. + * + * @param kind the kind value to set + * @return the SiteInner object itself. + */ + public SiteInner withKind(String kind) { + this.kind = kind; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteInstanceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteInstanceImpl.java new file mode 100644 index 0000000000000..8ae1c4ab0f354 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteInstanceImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SiteInstance; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class SiteInstanceImpl extends WrapperImpl implements SiteInstance { + private final CertificateRegistrationManager manager; + SiteInstanceImpl(SiteInstanceInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String siteInstanceName() { + return this.inner().siteInstanceName(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteInstanceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteInstanceInner.java new file mode 100644 index 0000000000000..3581ba20aba45 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Instance of an app. + */ +@JsonFlatten +public class SiteInstanceInner extends ProxyOnlyResource { + /** + * Name of instance. + */ + @JsonProperty(value = "properties.siteInstanceName", access = JsonProperty.Access.WRITE_ONLY) + private String siteInstanceName; + + /** + * Get name of instance. + * + * @return the siteInstanceName value + */ + public String siteInstanceName() { + return this.siteInstanceName; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteLogsConfigImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteLogsConfigImpl.java new file mode 100644 index 0000000000000..1842fd3a5134c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteLogsConfigImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SiteLogsConfig; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.ApplicationLogsConfig; +import com.microsoft.azure.management.appservice.v2019_08_01.EnabledConfig; +import com.microsoft.azure.management.appservice.v2019_08_01.HttpLogsConfig; + +class SiteLogsConfigImpl extends WrapperImpl implements SiteLogsConfig { + private final CertificateRegistrationManager manager; + SiteLogsConfigImpl(SiteLogsConfigInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public ApplicationLogsConfig applicationLogs() { + return this.inner().applicationLogs(); + } + + @Override + public EnabledConfig detailedErrorMessages() { + return this.inner().detailedErrorMessages(); + } + + @Override + public EnabledConfig failedRequestsTracing() { + return this.inner().failedRequestsTracing(); + } + + @Override + public HttpLogsConfig httpLogs() { + return this.inner().httpLogs(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteLogsConfigInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteLogsConfigInner.java new file mode 100644 index 0000000000000..d5831cda0c440 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ApplicationLogsConfig; +import com.microsoft.azure.management.appservice.v2019_08_01.HttpLogsConfig; +import com.microsoft.azure.management.appservice.v2019_08_01.EnabledConfig; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 application logs configuration. + * + * @return the applicationLogs value + */ + public ApplicationLogsConfig applicationLogs() { + return this.applicationLogs; + } + + /** + * Set application logs configuration. + * + * @param applicationLogs the applicationLogs value to set + * @return the SiteLogsConfigInner object itself. + */ + public SiteLogsConfigInner withApplicationLogs(ApplicationLogsConfig applicationLogs) { + this.applicationLogs = applicationLogs; + return this; + } + + /** + * Get hTTP logs configuration. + * + * @return the httpLogs value + */ + public HttpLogsConfig httpLogs() { + return this.httpLogs; + } + + /** + * Set hTTP logs configuration. + * + * @param httpLogs the httpLogs value to set + * @return the SiteLogsConfigInner object itself. + */ + public SiteLogsConfigInner withHttpLogs(HttpLogsConfig httpLogs) { + this.httpLogs = httpLogs; + return this; + } + + /** + * Get failed requests tracing configuration. + * + * @return the failedRequestsTracing value + */ + public EnabledConfig failedRequestsTracing() { + return this.failedRequestsTracing; + } + + /** + * Set failed requests tracing configuration. + * + * @param failedRequestsTracing the failedRequestsTracing value to set + * @return the SiteLogsConfigInner object itself. + */ + public SiteLogsConfigInner withFailedRequestsTracing(EnabledConfig failedRequestsTracing) { + this.failedRequestsTracing = failedRequestsTracing; + return this; + } + + /** + * Get detailed error messages configuration. + * + * @return the detailedErrorMessages value + */ + public EnabledConfig detailedErrorMessages() { + return this.detailedErrorMessages; + } + + /** + * Set detailed error messages configuration. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SitePhpErrorLogFlagImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SitePhpErrorLogFlagImpl.java new file mode 100644 index 0000000000000..9bac8b4f07380 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SitePhpErrorLogFlagImpl.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SitePhpErrorLogFlag; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class SitePhpErrorLogFlagImpl extends WrapperImpl implements SitePhpErrorLogFlag { + private final CertificateRegistrationManager manager; + SitePhpErrorLogFlagImpl(SitePhpErrorLogFlagInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String localLogErrors() { + return this.inner().localLogErrors(); + } + + @Override + public String localLogErrorsMaxLength() { + return this.inner().localLogErrorsMaxLength(); + } + + @Override + public String masterLogErrors() { + return this.inner().masterLogErrors(); + } + + @Override + public String masterLogErrorsMaxLength() { + return this.inner().masterLogErrorsMaxLength(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SitePhpErrorLogFlagInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SitePhpErrorLogFlagInner.java new file mode 100644 index 0000000000000..a0f42b6741e8c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 local log_errors setting. + * + * @return the localLogErrors value + */ + public String localLogErrors() { + return this.localLogErrors; + } + + /** + * Set local log_errors setting. + * + * @param localLogErrors the localLogErrors value to set + * @return the SitePhpErrorLogFlagInner object itself. + */ + public SitePhpErrorLogFlagInner withLocalLogErrors(String localLogErrors) { + this.localLogErrors = localLogErrors; + return this; + } + + /** + * Get master log_errors setting. + * + * @return the masterLogErrors value + */ + public String masterLogErrors() { + return this.masterLogErrors; + } + + /** + * Set master log_errors setting. + * + * @param masterLogErrors the masterLogErrors value to set + * @return the SitePhpErrorLogFlagInner object itself. + */ + public SitePhpErrorLogFlagInner withMasterLogErrors(String masterLogErrors) { + this.masterLogErrors = masterLogErrors; + return this; + } + + /** + * Get local log_errors_max_len setting. + * + * @return the localLogErrorsMaxLength value + */ + public String localLogErrorsMaxLength() { + return this.localLogErrorsMaxLength; + } + + /** + * Set local log_errors_max_len setting. + * + * @param localLogErrorsMaxLength the localLogErrorsMaxLength value to set + * @return the SitePhpErrorLogFlagInner object itself. + */ + public SitePhpErrorLogFlagInner withLocalLogErrorsMaxLength(String localLogErrorsMaxLength) { + this.localLogErrorsMaxLength = localLogErrorsMaxLength; + return this; + } + + /** + * Get master log_errors_max_len setting. + * + * @return the masterLogErrorsMaxLength value + */ + public String masterLogErrorsMaxLength() { + return this.masterLogErrorsMaxLength; + } + + /** + * Set master log_errors_max_len setting. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteSealImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteSealImpl.java new file mode 100644 index 0000000000000..a3362c5a77107 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteSealImpl.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SiteSeal; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class SiteSealImpl extends WrapperImpl implements SiteSeal { + private final CertificateRegistrationManager manager; + SiteSealImpl(SiteSealInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String html() { + return this.inner().html(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteSealInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteSealInner.java new file mode 100644 index 0000000000000..b483d606a6ec3 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Site seal. + */ +public class SiteSealInner { + /** + * HTML snippet. + */ + @JsonProperty(value = "html", required = true) + private String html; + + /** + * Get hTML snippet. + * + * @return the html value + */ + public String html() { + return this.html; + } + + /** + * Set hTML snippet. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteSourceControlImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteSourceControlImpl.java new file mode 100644 index 0000000000000..2156762a47f64 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteSourceControlImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SiteSourceControl; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class SiteSourceControlImpl extends WrapperImpl implements SiteSourceControl { + private final CertificateRegistrationManager manager; + SiteSourceControlImpl(SiteSourceControlInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String branch() { + return this.inner().branch(); + } + + @Override + public Boolean deploymentRollbackEnabled() { + return this.inner().deploymentRollbackEnabled(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Boolean isManualIntegration() { + return this.inner().isManualIntegration(); + } + + @Override + public Boolean isMercurial() { + return this.inner().isMercurial(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String repoUrl() { + return this.inner().repoUrl(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteSourceControlInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteSourceControlInner.java new file mode 100644 index 0000000000000..05143541d0c1c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 repository or source control URL. + * + * @return the repoUrl value + */ + public String repoUrl() { + return this.repoUrl; + } + + /** + * Set repository or source control URL. + * + * @param repoUrl the repoUrl value to set + * @return the SiteSourceControlInner object itself. + */ + public SiteSourceControlInner withRepoUrl(String repoUrl) { + this.repoUrl = repoUrl; + return this; + } + + /** + * Get name of branch to use for deployment. + * + * @return the branch value + */ + public String branch() { + return this.branch; + } + + /** + * Set name of branch to use for deployment. + * + * @param branch the branch value to set + * @return the SiteSourceControlInner object itself. + */ + public SiteSourceControlInner withBranch(String branch) { + this.branch = branch; + return this; + } + + /** + * Get <code>true</code> to limit to manual integration; <code>false</code> to enable continuous integration (which configures webhooks into online repos like GitHub). + * + * @return the isManualIntegration value + */ + public Boolean isManualIntegration() { + return this.isManualIntegration; + } + + /** + * Set <code>true</code> to limit to manual integration; <code>false</code> to enable continuous integration (which configures webhooks into online repos like GitHub). + * + * @param isManualIntegration the isManualIntegration value to set + * @return the SiteSourceControlInner object itself. + */ + public SiteSourceControlInner withIsManualIntegration(Boolean isManualIntegration) { + this.isManualIntegration = isManualIntegration; + return this; + } + + /** + * Get <code>true</code> to enable deployment rollback; otherwise, <code>false</code>. + * + * @return the deploymentRollbackEnabled value + */ + public Boolean deploymentRollbackEnabled() { + return this.deploymentRollbackEnabled; + } + + /** + * Set <code>true</code> to enable deployment rollback; otherwise, <code>false</code>. + * + * @param deploymentRollbackEnabled the deploymentRollbackEnabled value to set + * @return the SiteSourceControlInner object itself. + */ + public SiteSourceControlInner withDeploymentRollbackEnabled(Boolean deploymentRollbackEnabled) { + this.deploymentRollbackEnabled = deploymentRollbackEnabled; + return this; + } + + /** + * Get <code>true</code> for a Mercurial repository; <code>false</code> for a Git repository. + * + * @return the isMercurial value + */ + public Boolean isMercurial() { + return this.isMercurial; + } + + /** + * Set <code>true</code> for a Mercurial repository; <code>false</code> for a Git repository. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteVnetGatewayImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteVnetGatewayImpl.java new file mode 100644 index 0000000000000..e92c465033d06 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteVnetGatewayImpl.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SiteVnetGateway; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; + +class SiteVnetGatewayImpl extends CreatableUpdatableImpl implements SiteVnetGateway, SiteVnetGateway.Definition, SiteVnetGateway.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String vnetName; + private String gatewayName; + private String slot; + + SiteVnetGatewayImpl(String name, CertificateRegistrationManager manager) { + super(name, new VnetGatewayInner()); + this.manager = manager; + // Set resource name + this.gatewayName = name; + // + } + + SiteVnetGatewayImpl(VnetGatewayInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.gatewayName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.vnetName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualNetworkConnections"); + this.gatewayName = IdParsingUtils.getValueFromIdByName(inner.id(), "gateways"); + this.slot = IdParsingUtils.getValueFromIdByName(inner.id(), "slots"); + // + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.createOrUpdateVnetConnectionGatewaySlotAsync(this.resourceGroupName, this.name, this.vnetName, this.gatewayName, this.slot, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.updateVnetConnectionGatewaySlotAsync(this.resourceGroupName, this.name, this.vnetName, this.gatewayName, this.slot, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getVnetConnectionGatewaySlotAsync(this.resourceGroupName, this.name, this.vnetName, this.gatewayName, this.slot); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String vnetName() { + return this.inner().vnetName(); + } + + @Override + public String vpnPackageUri() { + return this.inner().vpnPackageUri(); + } + + @Override + public SiteVnetGatewayImpl withExistingVirtualNetworkConnection(String resourceGroupName, String name, String vnetName, String slot) { + this.resourceGroupName = resourceGroupName; + this.name = name; + this.vnetName = vnetName; + this.slot = slot; + return this; + } + + @Override + public SiteVnetGatewayImpl withVpnPackageUri(String vpnPackageUri) { + this.inner().withVpnPackageUri(vpnPackageUri); + return this; + } + + @Override + public SiteVnetGatewayImpl withKind(String kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public SiteVnetGatewayImpl withVnetName(String vnetName) { + this.inner().withVnetName(vnetName); + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteVnetInfoImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteVnetInfoImpl.java new file mode 100644 index 0000000000000..2171898d86e5c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SiteVnetInfoImpl.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SiteVnetInfo; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import java.util.List; +import java.util.ArrayList; +import com.microsoft.azure.management.appservice.v2019_08_01.VnetRoute; + +class SiteVnetInfoImpl extends CreatableUpdatableImpl implements SiteVnetInfo, SiteVnetInfo.Definition, SiteVnetInfo.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String vnetName; + private String slot; + + SiteVnetInfoImpl(String name, CertificateRegistrationManager manager) { + super(name, new VnetInfoInner()); + this.manager = manager; + // Set resource name + this.vnetName = name; + // + } + + SiteVnetInfoImpl(VnetInfoInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.vnetName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.vnetName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualNetworkConnections"); + this.slot = IdParsingUtils.getValueFromIdByName(inner.id(), "slots"); + // + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.createOrUpdateVnetConnectionSlotAsync(this.resourceGroupName, this.name, this.vnetName, this.slot, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.updateVnetConnectionSlotAsync(this.resourceGroupName, this.name, this.vnetName, this.slot, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getVnetConnectionSlotAsync(this.resourceGroupName, this.name, this.vnetName, this.slot); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String certBlob() { + return this.inner().certBlob(); + } + + @Override + public String certThumbprint() { + return this.inner().certThumbprint(); + } + + @Override + public String dnsServers() { + return this.inner().dnsServers(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Boolean isSwift() { + return this.inner().isSwift(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Boolean resyncRequired() { + return this.inner().resyncRequired(); + } + + @Override + public List routes() { + List lst = new ArrayList(); + if (this.inner().routes() != null) { + for (VnetRouteInner inner : this.inner().routes()) { + lst.add( new VnetRouteImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String vnetResourceId() { + return this.inner().vnetResourceId(); + } + + @Override + public SiteVnetInfoImpl withExistingSlot(String resourceGroupName, String name, String slot) { + this.resourceGroupName = resourceGroupName; + this.name = name; + this.slot = slot; + return this; + } + + @Override + public SiteVnetInfoImpl withCertBlob(String certBlob) { + this.inner().withCertBlob(certBlob); + return this; + } + + @Override + public SiteVnetInfoImpl withDnsServers(String dnsServers) { + this.inner().withDnsServers(dnsServers); + return this; + } + + @Override + public SiteVnetInfoImpl withIsSwift(Boolean isSwift) { + this.inner().withIsSwift(isSwift); + return this; + } + + @Override + public SiteVnetInfoImpl withKind(String kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public SiteVnetInfoImpl withVnetResourceId(String vnetResourceId) { + this.inner().withVnetResourceId(vnetResourceId); + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SitesImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SitesImpl.java new file mode 100644 index 0000000000000..e2c7b77c5de90 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SitesImpl.java @@ -0,0 +1,469 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.Sites; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.SitePatchResource; +import java.util.List; +import org.joda.time.DateTime; +import java.util.UUID; +import com.microsoft.azure.management.appservice.v2019_08_01.UsageState; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteAvailabilityState; +import com.microsoft.azure.management.appservice.v2019_08_01.HostNameSslState; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteConfig; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentProfile; +import com.microsoft.azure.management.appservice.v2019_08_01.CloningInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.SlotSwapStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.RedundancyMode; +import com.microsoft.azure.management.appservice.v2019_08_01.ManagedServiceIdentity; +import rx.functions.Func1; + +class SitesImpl extends GroupableResourceCoreImpl implements Sites, Sites.Definition, Sites.Update { + private SitePatchResource updateParameter; + SitesImpl(String name, SiteInner inner, CertificateRegistrationManager manager) { + super(name, inner, manager); + this.updateParameter = new SitePatchResource(); + } + + @Override + public Observable createResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(new Func1() { + @Override + public SiteInner call(SiteInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter) + .map(new Func1() { + @Override + public SiteInner call(SiteInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.updateParameter = new SitePatchResource(); + } + + @Override + public SiteAvailabilityState availabilityState() { + return this.inner().availabilityState(); + } + + @Override + public Boolean clientAffinityEnabled() { + return this.inner().clientAffinityEnabled(); + } + + @Override + public Boolean clientCertEnabled() { + return this.inner().clientCertEnabled(); + } + + @Override + public String clientCertExclusionPaths() { + return this.inner().clientCertExclusionPaths(); + } + + @Override + public CloningInfo cloningInfo() { + return this.inner().cloningInfo(); + } + + @Override + public Integer containerSize() { + return this.inner().containerSize(); + } + + @Override + public Integer dailyMemoryTimeQuota() { + return this.inner().dailyMemoryTimeQuota(); + } + + @Override + public String defaultHostName() { + return this.inner().defaultHostName(); + } + + @Override + public Boolean enabled() { + return this.inner().enabled(); + } + + @Override + public List enabledHostNames() { + return this.inner().enabledHostNames(); + } + + @Override + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.inner().hostingEnvironmentProfile(); + } + + @Override + public List hostNames() { + return this.inner().hostNames(); + } + + @Override + public Boolean hostNamesDisabled() { + return this.inner().hostNamesDisabled(); + } + + @Override + public List hostNameSslStates() { + return this.inner().hostNameSslStates(); + } + + @Override + public Boolean httpsOnly() { + return this.inner().httpsOnly(); + } + + @Override + public Boolean hyperV() { + return this.inner().hyperV(); + } + + @Override + public ManagedServiceIdentity identity() { + return this.inner().identity(); + } + + @Override + public UUID inProgressOperationId() { + return this.inner().inProgressOperationId(); + } + + @Override + public Boolean isDefaultContainer() { + return this.inner().isDefaultContainer(); + } + + @Override + public Boolean isXenon() { + return this.inner().isXenon(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public DateTime lastModifiedTimeUtc() { + return this.inner().lastModifiedTimeUtc(); + } + + @Override + public Integer maxNumberOfWorkers() { + return this.inner().maxNumberOfWorkers(); + } + + @Override + public String outboundIpAddresses() { + return this.inner().outboundIpAddresses(); + } + + @Override + public String possibleOutboundIpAddresses() { + return this.inner().possibleOutboundIpAddresses(); + } + + @Override + public RedundancyMode redundancyMode() { + return this.inner().redundancyMode(); + } + + @Override + public String repositorySiteName() { + return this.inner().repositorySiteName(); + } + + @Override + public Boolean reserved() { + return this.inner().reserved(); + } + + @Override + public String resourceGroup() { + return this.inner().resourceGroup(); + } + + @Override + public Boolean scmSiteAlsoStopped() { + return this.inner().scmSiteAlsoStopped(); + } + + @Override + public String serverFarmId() { + return this.inner().serverFarmId(); + } + + @Override + public SiteConfig siteConfig() { + return this.inner().siteConfig(); + } + + @Override + public SlotSwapStatus slotSwapStatus() { + return this.inner().slotSwapStatus(); + } + + @Override + public String state() { + return this.inner().state(); + } + + @Override + public DateTime suspendedTill() { + return this.inner().suspendedTill(); + } + + @Override + public String targetSwapSlot() { + return this.inner().targetSwapSlot(); + } + + @Override + public List trafficManagerHostNames() { + return this.inner().trafficManagerHostNames(); + } + + @Override + public UsageState usageState() { + return this.inner().usageState(); + } + + @Override + public SitesImpl withClientAffinityEnabled(Boolean clientAffinityEnabled) { + if (isInCreateMode()) { + this.inner().withClientAffinityEnabled(clientAffinityEnabled); + } else { + this.updateParameter.withClientAffinityEnabled(clientAffinityEnabled); + } + return this; + } + + @Override + public SitesImpl withClientCertEnabled(Boolean clientCertEnabled) { + if (isInCreateMode()) { + this.inner().withClientCertEnabled(clientCertEnabled); + } else { + this.updateParameter.withClientCertEnabled(clientCertEnabled); + } + return this; + } + + @Override + public SitesImpl withClientCertExclusionPaths(String clientCertExclusionPaths) { + if (isInCreateMode()) { + this.inner().withClientCertExclusionPaths(clientCertExclusionPaths); + } else { + this.updateParameter.withClientCertExclusionPaths(clientCertExclusionPaths); + } + return this; + } + + @Override + public SitesImpl withCloningInfo(CloningInfo cloningInfo) { + if (isInCreateMode()) { + this.inner().withCloningInfo(cloningInfo); + } else { + this.updateParameter.withCloningInfo(cloningInfo); + } + return this; + } + + @Override + public SitesImpl withContainerSize(Integer containerSize) { + if (isInCreateMode()) { + this.inner().withContainerSize(containerSize); + } else { + this.updateParameter.withContainerSize(containerSize); + } + return this; + } + + @Override + public SitesImpl withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota) { + if (isInCreateMode()) { + this.inner().withDailyMemoryTimeQuota(dailyMemoryTimeQuota); + } else { + this.updateParameter.withDailyMemoryTimeQuota(dailyMemoryTimeQuota); + } + return this; + } + + @Override + public SitesImpl withEnabled(Boolean enabled) { + if (isInCreateMode()) { + this.inner().withEnabled(enabled); + } else { + this.updateParameter.withEnabled(enabled); + } + return this; + } + + @Override + public SitesImpl withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + if (isInCreateMode()) { + this.inner().withHostingEnvironmentProfile(hostingEnvironmentProfile); + } else { + this.updateParameter.withHostingEnvironmentProfile(hostingEnvironmentProfile); + } + return this; + } + + @Override + public SitesImpl withHostNamesDisabled(Boolean hostNamesDisabled) { + if (isInCreateMode()) { + this.inner().withHostNamesDisabled(hostNamesDisabled); + } else { + this.updateParameter.withHostNamesDisabled(hostNamesDisabled); + } + return this; + } + + @Override + public SitesImpl withHostNameSslStates(List hostNameSslStates) { + if (isInCreateMode()) { + this.inner().withHostNameSslStates(hostNameSslStates); + } else { + this.updateParameter.withHostNameSslStates(hostNameSslStates); + } + return this; + } + + @Override + public SitesImpl withHttpsOnly(Boolean httpsOnly) { + if (isInCreateMode()) { + this.inner().withHttpsOnly(httpsOnly); + } else { + this.updateParameter.withHttpsOnly(httpsOnly); + } + return this; + } + + @Override + public SitesImpl withHyperV(Boolean hyperV) { + if (isInCreateMode()) { + this.inner().withHyperV(hyperV); + } else { + this.updateParameter.withHyperV(hyperV); + } + return this; + } + + @Override + public SitesImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.inner().withIdentity(identity); + } else { + this.updateParameter.withIdentity(identity); + } + return this; + } + + @Override + public SitesImpl withIsXenon(Boolean isXenon) { + if (isInCreateMode()) { + this.inner().withIsXenon(isXenon); + } else { + this.updateParameter.withIsXenon(isXenon); + } + return this; + } + + @Override + public SitesImpl withKind(String kind) { + if (isInCreateMode()) { + this.inner().withKind(kind); + } else { + this.updateParameter.withKind(kind); + } + return this; + } + + @Override + public SitesImpl withRedundancyMode(RedundancyMode redundancyMode) { + if (isInCreateMode()) { + this.inner().withRedundancyMode(redundancyMode); + } else { + this.updateParameter.withRedundancyMode(redundancyMode); + } + return this; + } + + @Override + public SitesImpl withReserved(Boolean reserved) { + if (isInCreateMode()) { + this.inner().withReserved(reserved); + } else { + this.updateParameter.withReserved(reserved); + } + return this; + } + + @Override + public SitesImpl withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped) { + if (isInCreateMode()) { + this.inner().withScmSiteAlsoStopped(scmSiteAlsoStopped); + } else { + this.updateParameter.withScmSiteAlsoStopped(scmSiteAlsoStopped); + } + return this; + } + + @Override + public SitesImpl withServerFarmId(String serverFarmId) { + if (isInCreateMode()) { + this.inner().withServerFarmId(serverFarmId); + } else { + this.updateParameter.withServerFarmId(serverFarmId); + } + return this; + } + + @Override + public SitesImpl withSiteConfig(SiteConfig siteConfig) { + if (isInCreateMode()) { + this.inner().withSiteConfig(siteConfig); + } else { + this.updateParameter.withSiteConfig(siteConfig); + } + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SkuInfoImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SkuInfoImpl.java new file mode 100644 index 0000000000000..696c6f4e4ba82 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SkuInfoImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SkuInfo; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.SkuCapacity; +import com.microsoft.azure.management.appservice.v2019_08_01.SkuDescription; + +class SkuInfoImpl extends WrapperImpl implements SkuInfo { + private final CertificateRegistrationManager manager; + SkuInfoImpl(SkuInfoInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public SkuCapacity capacity() { + return this.inner().capacity(); + } + + @Override + public String resourceType() { + return this.inner().resourceType(); + } + + @Override + public SkuDescription sku() { + return this.inner().sku(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SkuInfoInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SkuInfoInner.java new file mode 100644 index 0000000000000..2554fb3e0eff8 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SkuDescription; +import com.microsoft.azure.management.appservice.v2019_08_01.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 resource type that this SKU applies to. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set resource type that this SKU applies to. + * + * @param resourceType the resourceType value to set + * @return the SkuInfoInner object itself. + */ + public SkuInfoInner withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get name and tier of the SKU. + * + * @return the sku value + */ + public SkuDescription sku() { + return this.sku; + } + + /** + * Set name and tier of the SKU. + * + * @param sku the sku value to set + * @return the SkuInfoInner object itself. + */ + public SkuInfoInner withSku(SkuDescription sku) { + this.sku = sku; + return this; + } + + /** + * Get min, max, and default scale values of the SKU. + * + * @return the capacity value + */ + public SkuCapacity capacity() { + return this.capacity; + } + + /** + * Set min, max, and default scale values of the SKU. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SkuInfosInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SkuInfosInner.java new file mode 100644 index 0000000000000..3bc9c37b28333 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.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 resource type that this SKU applies to. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set resource type that this SKU applies to. + * + * @param resourceType the resourceType value to set + * @return the SkuInfosInner object itself. + */ + public SkuInfosInner withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get list of SKUs the subscription is able to use. + * + * @return the skus value + */ + public List skus() { + return this.skus; + } + + /** + * Set list of SKUs the subscription is able to use. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SlotConfigNamesResourceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SlotConfigNamesResourceImpl.java new file mode 100644 index 0000000000000..36a461fd8971a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SlotConfigNamesResourceImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SlotConfigNamesResource; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class SlotConfigNamesResourceImpl extends WrapperImpl implements SlotConfigNamesResource { + private final CertificateRegistrationManager manager; + SlotConfigNamesResourceImpl(SlotConfigNamesResourceInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public List appSettingNames() { + return this.inner().appSettingNames(); + } + + @Override + public List azureStorageConfigNames() { + return this.inner().azureStorageConfigNames(); + } + + @Override + public List connectionStringNames() { + return this.inner().connectionStringNames(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SlotConfigNamesResourceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SlotConfigNamesResourceInner.java new file mode 100644 index 0000000000000..a7fb69cf419b2 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SlotConfigNamesResourceInner.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.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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; + + /** + * List of external Azure storage account identifiers. + */ + @JsonProperty(value = "properties.azureStorageConfigNames") + private List azureStorageConfigNames; + + /** + * Get list of connection string names. + * + * @return the connectionStringNames value + */ + public List connectionStringNames() { + return this.connectionStringNames; + } + + /** + * Set list of connection string names. + * + * @param connectionStringNames the connectionStringNames value to set + * @return the SlotConfigNamesResourceInner object itself. + */ + public SlotConfigNamesResourceInner withConnectionStringNames(List connectionStringNames) { + this.connectionStringNames = connectionStringNames; + return this; + } + + /** + * Get list of application settings names. + * + * @return the appSettingNames value + */ + public List appSettingNames() { + return this.appSettingNames; + } + + /** + * Set list of application settings names. + * + * @param appSettingNames the appSettingNames value to set + * @return the SlotConfigNamesResourceInner object itself. + */ + public SlotConfigNamesResourceInner withAppSettingNames(List appSettingNames) { + this.appSettingNames = appSettingNames; + return this; + } + + /** + * Get list of external Azure storage account identifiers. + * + * @return the azureStorageConfigNames value + */ + public List azureStorageConfigNames() { + return this.azureStorageConfigNames; + } + + /** + * Set list of external Azure storage account identifiers. + * + * @param azureStorageConfigNames the azureStorageConfigNames value to set + * @return the SlotConfigNamesResourceInner object itself. + */ + public SlotConfigNamesResourceInner withAzureStorageConfigNames(List azureStorageConfigNames) { + this.azureStorageConfigNames = azureStorageConfigNames; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SlotDifferenceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SlotDifferenceImpl.java new file mode 100644 index 0000000000000..de3c7b04b399f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SlotDifferenceImpl.java @@ -0,0 +1,81 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SlotDifference; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class SlotDifferenceImpl extends WrapperImpl implements SlotDifference { + private final CertificateRegistrationManager manager; + SlotDifferenceImpl(SlotDifferenceInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String diffRule() { + return this.inner().diffRule(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String level() { + return this.inner().level(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String settingName() { + return this.inner().settingName(); + } + + @Override + public String settingType() { + return this.inner().settingType(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String valueInCurrentSlot() { + return this.inner().valueInCurrentSlot(); + } + + @Override + public String valueInTargetSlot() { + return this.inner().valueInTargetSlot(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SlotDifferenceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SlotDifferenceInner.java new file mode 100644 index 0000000000000..c6adf10829cd9 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * A setting difference between two deployment slots of an app. + */ +@JsonFlatten +public class SlotDifferenceInner extends ProxyOnlyResource { + /** + * Level of the difference: Information, Warning or Error. + */ + @JsonProperty(value = "properties.level", access = JsonProperty.Access.WRITE_ONLY) + private String level; + + /** + * 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 level of the difference: Information, Warning or Error. + * + * @return the level value + */ + public String level() { + return this.level; + } + + /** + * Get the type of the setting: General, AppSetting or ConnectionString. + * + * @return the settingType value + */ + public String settingType() { + return this.settingType; + } + + /** + * Get rule that describes how to process the setting difference during a slot swap. + * + * @return the diffRule value + */ + public String diffRule() { + return this.diffRule; + } + + /** + * Get name of the setting. + * + * @return the settingName value + */ + public String settingName() { + return this.settingName; + } + + /** + * Get value of the setting in the current slot. + * + * @return the valueInCurrentSlot value + */ + public String valueInCurrentSlot() { + return this.valueInCurrentSlot; + } + + /** + * Get value of the setting in the target slot. + * + * @return the valueInTargetSlot value + */ + public String valueInTargetSlot() { + return this.valueInTargetSlot; + } + + /** + * Get description of the setting difference. + * + * @return the description value + */ + public String description() { + return this.description; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SlotsImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SlotsImpl.java new file mode 100644 index 0000000000000..6a6912ea90d3b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SlotsImpl.java @@ -0,0 +1,541 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.Slots; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.SitePatchResource; +import java.util.List; +import org.joda.time.DateTime; +import java.util.UUID; +import java.util.Map; +import com.microsoft.azure.management.appservice.v2019_08_01.UsageState; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteAvailabilityState; +import com.microsoft.azure.management.appservice.v2019_08_01.HostNameSslState; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteConfig; +import com.microsoft.azure.management.appservice.v2019_08_01.HostingEnvironmentProfile; +import com.microsoft.azure.management.appservice.v2019_08_01.CloningInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.SlotSwapStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.RedundancyMode; +import com.microsoft.azure.management.appservice.v2019_08_01.ManagedServiceIdentity; +import rx.functions.Func1; + +class SlotsImpl extends CreatableUpdatableImpl implements Slots, Slots.Definition, Slots.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String slot; + private SitePatchResource updateParameter; + + SlotsImpl(String name, CertificateRegistrationManager manager) { + super(name, new SiteInner()); + this.manager = manager; + // Set resource name + this.slot = name; + // + this.updateParameter = new SitePatchResource(); + } + + SlotsImpl(SiteInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.slot = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.slot = IdParsingUtils.getValueFromIdByName(inner.id(), "slots"); + // + this.updateParameter = new SitePatchResource(); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.createOrUpdateSlotAsync(this.resourceGroupName, this.name, this.slot, this.inner()) + .map(new Func1() { + @Override + public SiteInner call(SiteInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.updateSlotAsync(this.resourceGroupName, this.name, this.slot, this.updateParameter) + .map(new Func1() { + @Override + public SiteInner call(SiteInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getSlotAsync(this.resourceGroupName, this.name, this.slot); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.updateParameter = new SitePatchResource(); + } + + @Override + public SiteAvailabilityState availabilityState() { + return this.inner().availabilityState(); + } + + @Override + public Boolean clientAffinityEnabled() { + return this.inner().clientAffinityEnabled(); + } + + @Override + public Boolean clientCertEnabled() { + return this.inner().clientCertEnabled(); + } + + @Override + public String clientCertExclusionPaths() { + return this.inner().clientCertExclusionPaths(); + } + + @Override + public CloningInfo cloningInfo() { + return this.inner().cloningInfo(); + } + + @Override + public Integer containerSize() { + return this.inner().containerSize(); + } + + @Override + public Integer dailyMemoryTimeQuota() { + return this.inner().dailyMemoryTimeQuota(); + } + + @Override + public String defaultHostName() { + return this.inner().defaultHostName(); + } + + @Override + public Boolean enabled() { + return this.inner().enabled(); + } + + @Override + public List enabledHostNames() { + return this.inner().enabledHostNames(); + } + + @Override + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.inner().hostingEnvironmentProfile(); + } + + @Override + public List hostNames() { + return this.inner().hostNames(); + } + + @Override + public Boolean hostNamesDisabled() { + return this.inner().hostNamesDisabled(); + } + + @Override + public List hostNameSslStates() { + return this.inner().hostNameSslStates(); + } + + @Override + public Boolean httpsOnly() { + return this.inner().httpsOnly(); + } + + @Override + public Boolean hyperV() { + return this.inner().hyperV(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public ManagedServiceIdentity identity() { + return this.inner().identity(); + } + + @Override + public UUID inProgressOperationId() { + return this.inner().inProgressOperationId(); + } + + @Override + public Boolean isDefaultContainer() { + return this.inner().isDefaultContainer(); + } + + @Override + public Boolean isXenon() { + return this.inner().isXenon(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public DateTime lastModifiedTimeUtc() { + return this.inner().lastModifiedTimeUtc(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public Integer maxNumberOfWorkers() { + return this.inner().maxNumberOfWorkers(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String outboundIpAddresses() { + return this.inner().outboundIpAddresses(); + } + + @Override + public String possibleOutboundIpAddresses() { + return this.inner().possibleOutboundIpAddresses(); + } + + @Override + public RedundancyMode redundancyMode() { + return this.inner().redundancyMode(); + } + + @Override + public String repositorySiteName() { + return this.inner().repositorySiteName(); + } + + @Override + public Boolean reserved() { + return this.inner().reserved(); + } + + @Override + public String resourceGroup() { + return this.inner().resourceGroup(); + } + + @Override + public Boolean scmSiteAlsoStopped() { + return this.inner().scmSiteAlsoStopped(); + } + + @Override + public String serverFarmId() { + return this.inner().serverFarmId(); + } + + @Override + public SiteConfig siteConfig() { + return this.inner().siteConfig(); + } + + @Override + public SlotSwapStatus slotSwapStatus() { + return this.inner().slotSwapStatus(); + } + + @Override + public String state() { + return this.inner().state(); + } + + @Override + public DateTime suspendedTill() { + return this.inner().suspendedTill(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String targetSwapSlot() { + return this.inner().targetSwapSlot(); + } + + @Override + public List trafficManagerHostNames() { + return this.inner().trafficManagerHostNames(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public UsageState usageState() { + return this.inner().usageState(); + } + + @Override + public SlotsImpl withExistingSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + @Override + public SlotsImpl withLocation(String location) { + this.inner().withLocation(location); + return this; + } + + @Override + public SlotsImpl withTags(Map tags) { + this.inner().withTags(tags); + return this; + } + + @Override + public SlotsImpl withClientAffinityEnabled(Boolean clientAffinityEnabled) { + if (isInCreateMode()) { + this.inner().withClientAffinityEnabled(clientAffinityEnabled); + } else { + this.updateParameter.withClientAffinityEnabled(clientAffinityEnabled); + } + return this; + } + + @Override + public SlotsImpl withClientCertEnabled(Boolean clientCertEnabled) { + if (isInCreateMode()) { + this.inner().withClientCertEnabled(clientCertEnabled); + } else { + this.updateParameter.withClientCertEnabled(clientCertEnabled); + } + return this; + } + + @Override + public SlotsImpl withClientCertExclusionPaths(String clientCertExclusionPaths) { + if (isInCreateMode()) { + this.inner().withClientCertExclusionPaths(clientCertExclusionPaths); + } else { + this.updateParameter.withClientCertExclusionPaths(clientCertExclusionPaths); + } + return this; + } + + @Override + public SlotsImpl withCloningInfo(CloningInfo cloningInfo) { + if (isInCreateMode()) { + this.inner().withCloningInfo(cloningInfo); + } else { + this.updateParameter.withCloningInfo(cloningInfo); + } + return this; + } + + @Override + public SlotsImpl withContainerSize(Integer containerSize) { + if (isInCreateMode()) { + this.inner().withContainerSize(containerSize); + } else { + this.updateParameter.withContainerSize(containerSize); + } + return this; + } + + @Override + public SlotsImpl withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota) { + if (isInCreateMode()) { + this.inner().withDailyMemoryTimeQuota(dailyMemoryTimeQuota); + } else { + this.updateParameter.withDailyMemoryTimeQuota(dailyMemoryTimeQuota); + } + return this; + } + + @Override + public SlotsImpl withEnabled(Boolean enabled) { + if (isInCreateMode()) { + this.inner().withEnabled(enabled); + } else { + this.updateParameter.withEnabled(enabled); + } + return this; + } + + @Override + public SlotsImpl withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + if (isInCreateMode()) { + this.inner().withHostingEnvironmentProfile(hostingEnvironmentProfile); + } else { + this.updateParameter.withHostingEnvironmentProfile(hostingEnvironmentProfile); + } + return this; + } + + @Override + public SlotsImpl withHostNamesDisabled(Boolean hostNamesDisabled) { + if (isInCreateMode()) { + this.inner().withHostNamesDisabled(hostNamesDisabled); + } else { + this.updateParameter.withHostNamesDisabled(hostNamesDisabled); + } + return this; + } + + @Override + public SlotsImpl withHostNameSslStates(List hostNameSslStates) { + if (isInCreateMode()) { + this.inner().withHostNameSslStates(hostNameSslStates); + } else { + this.updateParameter.withHostNameSslStates(hostNameSslStates); + } + return this; + } + + @Override + public SlotsImpl withHttpsOnly(Boolean httpsOnly) { + if (isInCreateMode()) { + this.inner().withHttpsOnly(httpsOnly); + } else { + this.updateParameter.withHttpsOnly(httpsOnly); + } + return this; + } + + @Override + public SlotsImpl withHyperV(Boolean hyperV) { + if (isInCreateMode()) { + this.inner().withHyperV(hyperV); + } else { + this.updateParameter.withHyperV(hyperV); + } + return this; + } + + @Override + public SlotsImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.inner().withIdentity(identity); + } else { + this.updateParameter.withIdentity(identity); + } + return this; + } + + @Override + public SlotsImpl withIsXenon(Boolean isXenon) { + if (isInCreateMode()) { + this.inner().withIsXenon(isXenon); + } else { + this.updateParameter.withIsXenon(isXenon); + } + return this; + } + + @Override + public SlotsImpl withKind(String kind) { + if (isInCreateMode()) { + this.inner().withKind(kind); + } else { + this.updateParameter.withKind(kind); + } + return this; + } + + @Override + public SlotsImpl withRedundancyMode(RedundancyMode redundancyMode) { + if (isInCreateMode()) { + this.inner().withRedundancyMode(redundancyMode); + } else { + this.updateParameter.withRedundancyMode(redundancyMode); + } + return this; + } + + @Override + public SlotsImpl withReserved(Boolean reserved) { + if (isInCreateMode()) { + this.inner().withReserved(reserved); + } else { + this.updateParameter.withReserved(reserved); + } + return this; + } + + @Override + public SlotsImpl withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped) { + if (isInCreateMode()) { + this.inner().withScmSiteAlsoStopped(scmSiteAlsoStopped); + } else { + this.updateParameter.withScmSiteAlsoStopped(scmSiteAlsoStopped); + } + return this; + } + + @Override + public SlotsImpl withServerFarmId(String serverFarmId) { + if (isInCreateMode()) { + this.inner().withServerFarmId(serverFarmId); + } else { + this.updateParameter.withServerFarmId(serverFarmId); + } + return this; + } + + @Override + public SlotsImpl withSiteConfig(SiteConfig siteConfig) { + if (isInCreateMode()) { + this.inner().withSiteConfig(siteConfig); + } else { + this.updateParameter.withSiteConfig(siteConfig); + } + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SnapshotImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SnapshotImpl.java new file mode 100644 index 0000000000000..9d2938e266626 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SnapshotImpl.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.Snapshot; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class SnapshotImpl extends WrapperImpl implements Snapshot { + private final CertificateRegistrationManager manager; + + SnapshotImpl(SnapshotInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String time() { + return this.inner().time(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SnapshotInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SnapshotInner.java new file mode 100644 index 0000000000000..9c59a241b4b06 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 the snapshot was taken. + * + * @return the time value + */ + public String time() { + return this.time; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SourceControlInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SourceControlInner.java new file mode 100644 index 0000000000000..3183a977bbd43 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SourceControlInner.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * The source control OAuth token. + */ +@JsonFlatten +public class SourceControlInner extends ProxyOnlyResource { + /** + * 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 oAuth access token. + * + * @return the token value + */ + public String token() { + return this.token; + } + + /** + * Set oAuth access token. + * + * @param token the token value to set + * @return the SourceControlInner object itself. + */ + public SourceControlInner withToken(String token) { + this.token = token; + return this; + } + + /** + * Get oAuth access token secret. + * + * @return the tokenSecret value + */ + public String tokenSecret() { + return this.tokenSecret; + } + + /** + * Set oAuth access token secret. + * + * @param tokenSecret the tokenSecret value to set + * @return the SourceControlInner object itself. + */ + public SourceControlInner withTokenSecret(String tokenSecret) { + this.tokenSecret = tokenSecret; + return this; + } + + /** + * Get oAuth refresh token. + * + * @return the refreshToken value + */ + public String refreshToken() { + return this.refreshToken; + } + + /** + * Set oAuth refresh token. + * + * @param refreshToken the refreshToken value to set + * @return the SourceControlInner object itself. + */ + public SourceControlInner withRefreshToken(String refreshToken) { + this.refreshToken = refreshToken; + return this; + } + + /** + * Get oAuth token expiration. + * + * @return the expirationTime value + */ + public DateTime expirationTime() { + return this.expirationTime; + } + + /** + * Set oAuth token expiration. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StampCapacityImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StampCapacityImpl.java new file mode 100644 index 0000000000000..848f8668c04ec --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StampCapacityImpl.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.StampCapacity; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.ComputeModeOptions; +import com.microsoft.azure.management.appservice.v2019_08_01.WorkerSizeOptions; + +class StampCapacityImpl extends WrapperImpl implements StampCapacity { + private final CertificateRegistrationManager manager; + StampCapacityImpl(StampCapacityInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Long availableCapacity() { + return this.inner().availableCapacity(); + } + + @Override + public ComputeModeOptions computeMode() { + return this.inner().computeMode(); + } + + @Override + public Boolean excludeFromCapacityAllocation() { + return this.inner().excludeFromCapacityAllocation(); + } + + @Override + public Boolean isApplicableForAllComputeModes() { + return this.inner().isApplicableForAllComputeModes(); + } + + @Override + public Boolean isLinux() { + return this.inner().isLinux(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String siteMode() { + return this.inner().siteMode(); + } + + @Override + public Long totalCapacity() { + return this.inner().totalCapacity(); + } + + @Override + public String unit() { + return this.inner().unit(); + } + + @Override + public WorkerSizeOptions workerSize() { + return this.inner().workerSize(); + } + + @Override + public Integer workerSizeId() { + return this.inner().workerSizeId(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StampCapacityInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StampCapacityInner.java new file mode 100644 index 0000000000000..cfa5b67a7bca7 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StampCapacityInner.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ComputeModeOptions; +import com.microsoft.azure.management.appservice.v2019_08_01.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: 'Small', 'Medium', + * 'Large', 'D1', 'D2', 'D3', 'NestedSmall', 'Default'. + */ + @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; + + /** + * Is this a linux stamp capacity. + */ + @JsonProperty(value = "isLinux") + private Boolean isLinux; + + /** + * Get name of the stamp. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the stamp. + * + * @param name the name value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get available capacity (# of machines, bytes of storage etc...). + * + * @return the availableCapacity value + */ + public Long availableCapacity() { + return this.availableCapacity; + } + + /** + * Set available capacity (# of machines, bytes of storage etc...). + * + * @param availableCapacity the availableCapacity value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withAvailableCapacity(Long availableCapacity) { + this.availableCapacity = availableCapacity; + return this; + } + + /** + * Get total capacity (# of machines, bytes of storage etc...). + * + * @return the totalCapacity value + */ + public Long totalCapacity() { + return this.totalCapacity; + } + + /** + * Set total capacity (# of machines, bytes of storage etc...). + * + * @param totalCapacity the totalCapacity value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withTotalCapacity(Long totalCapacity) { + this.totalCapacity = totalCapacity; + return this; + } + + /** + * Get name of the unit. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set name of the unit. + * + * @param unit the unit value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get shared/dedicated workers. Possible values include: 'Shared', 'Dedicated', 'Dynamic'. + * + * @return the computeMode value + */ + public ComputeModeOptions computeMode() { + return this.computeMode; + } + + /** + * Set shared/dedicated workers. Possible values include: 'Shared', 'Dedicated', 'Dynamic'. + * + * @param computeMode the computeMode value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withComputeMode(ComputeModeOptions computeMode) { + this.computeMode = computeMode; + return this; + } + + /** + * Get size of the machines. Possible values include: 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'NestedSmall', 'Default'. + * + * @return the workerSize value + */ + public WorkerSizeOptions workerSize() { + return this.workerSize; + } + + /** + * Set size of the machines. Possible values include: 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'NestedSmall', 'Default'. + * + * @param workerSize the workerSize value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withWorkerSize(WorkerSizeOptions workerSize) { + this.workerSize = workerSize; + return this; + } + + /** + * Get size ID of machines: + 0 - Small + 1 - Medium + 2 - Large. + * + * @return the workerSizeId value + */ + public Integer workerSizeId() { + return this.workerSizeId; + } + + /** + * Set size ID of machines: + 0 - Small + 1 - Medium + 2 - Large. + * + * @param workerSizeId the workerSizeId value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withWorkerSizeId(Integer workerSizeId) { + this.workerSizeId = workerSizeId; + return this; + } + + /** + * Get if <code>true</code>, it includes basic apps. + Basic apps are not used for capacity allocation. + * + * @return the excludeFromCapacityAllocation value + */ + public Boolean excludeFromCapacityAllocation() { + return this.excludeFromCapacityAllocation; + } + + /** + * Set if <code>true</code>, it includes basic apps. + Basic apps are not used for capacity allocation. + * + * @param excludeFromCapacityAllocation the excludeFromCapacityAllocation value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withExcludeFromCapacityAllocation(Boolean excludeFromCapacityAllocation) { + this.excludeFromCapacityAllocation = excludeFromCapacityAllocation; + return this; + } + + /** + * Get <code>true</code> if capacity is applicable for all apps; otherwise, <code>false</code>. + * + * @return the isApplicableForAllComputeModes value + */ + public Boolean isApplicableForAllComputeModes() { + return this.isApplicableForAllComputeModes; + } + + /** + * Set <code>true</code> if capacity is applicable for all apps; otherwise, <code>false</code>. + * + * @param isApplicableForAllComputeModes the isApplicableForAllComputeModes value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withIsApplicableForAllComputeModes(Boolean isApplicableForAllComputeModes) { + this.isApplicableForAllComputeModes = isApplicableForAllComputeModes; + return this; + } + + /** + * Get shared or Dedicated. + * + * @return the siteMode value + */ + public String siteMode() { + return this.siteMode; + } + + /** + * Set shared or Dedicated. + * + * @param siteMode the siteMode value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withSiteMode(String siteMode) { + this.siteMode = siteMode; + return this; + } + + /** + * Get is this a linux stamp capacity. + * + * @return the isLinux value + */ + public Boolean isLinux() { + return this.isLinux; + } + + /** + * Set is this a linux stamp capacity. + * + * @param isLinux the isLinux value to set + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withIsLinux(Boolean isLinux) { + this.isLinux = isLinux; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteARMResourceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteARMResourceImpl.java new file mode 100644 index 0000000000000..1469d0135a5cb --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteARMResourceImpl.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteARMResource; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSitePatchResource; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteBuildProperties; +import com.microsoft.azure.management.appservice.v2019_08_01.SkuDescription; +import rx.functions.Func1; + +class StaticSiteARMResourceImpl extends GroupableResourceCoreImpl implements StaticSiteARMResource, StaticSiteARMResource.Definition, StaticSiteARMResource.Update { + private StaticSitePatchResource updateParameter; + StaticSiteARMResourceImpl(String name, StaticSiteARMResourceInner inner, CertificateRegistrationManager manager) { + super(name, inner, manager); + this.updateParameter = new StaticSitePatchResource(); + } + + @Override + public Observable createResourceAsync() { + StaticSitesInner client = this.manager().inner().staticSites(); + return client.createOrUpdateStaticSiteAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(new Func1() { + @Override + public StaticSiteARMResourceInner call(StaticSiteARMResourceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + StaticSitesInner client = this.manager().inner().staticSites(); + return client.updateStaticSiteAsync(this.resourceGroupName(), this.name(), this.updateParameter) + .map(new Func1() { + @Override + public StaticSiteARMResourceInner call(StaticSiteARMResourceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + StaticSitesInner client = this.manager().inner().staticSites(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.updateParameter = new StaticSitePatchResource(); + } + + @Override + public String branch() { + return this.inner().branch(); + } + + @Override + public StaticSiteBuildProperties buildProperties() { + return this.inner().buildProperties(); + } + + @Override + public List customDomains() { + return this.inner().customDomains(); + } + + @Override + public String defaultHostname() { + return this.inner().defaultHostname(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String repositoryToken() { + return this.inner().repositoryToken(); + } + + @Override + public String repositoryUrl() { + return this.inner().repositoryUrl(); + } + + @Override + public SkuDescription sku() { + return this.inner().sku(); + } + + @Override + public StaticSiteARMResourceImpl withSku(SkuDescription sku) { + this.inner().withSku(sku); + return this; + } + + @Override + public StaticSiteARMResourceImpl withBranch(String branch) { + if (isInCreateMode()) { + this.inner().withBranch(branch); + } else { + this.updateParameter.withBranch(branch); + } + return this; + } + + @Override + public StaticSiteARMResourceImpl withBuildProperties(StaticSiteBuildProperties buildProperties) { + if (isInCreateMode()) { + this.inner().withBuildProperties(buildProperties); + } else { + this.updateParameter.withBuildProperties(buildProperties); + } + return this; + } + + @Override + public StaticSiteARMResourceImpl withKind(String kind) { + if (isInCreateMode()) { + this.inner().withKind(kind); + } else { + this.updateParameter.withKind(kind); + } + return this; + } + + @Override + public StaticSiteARMResourceImpl withRepositoryToken(String repositoryToken) { + if (isInCreateMode()) { + this.inner().withRepositoryToken(repositoryToken); + } else { + this.updateParameter.withRepositoryToken(repositoryToken); + } + return this; + } + + @Override + public StaticSiteARMResourceImpl withRepositoryUrl(String repositoryUrl) { + if (isInCreateMode()) { + this.inner().withRepositoryUrl(repositoryUrl); + } else { + this.updateParameter.withRepositoryUrl(repositoryUrl); + } + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteARMResourceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteARMResourceInner.java new file mode 100644 index 0000000000000..0551ac000fc20 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteARMResourceInner.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.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteBuildProperties; +import com.microsoft.azure.management.appservice.v2019_08_01.SkuDescription; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Static Site ARM resource. + */ +@JsonFlatten +public class StaticSiteARMResourceInner extends Resource { + /** + * The default autogenerated hostname for the static site. + */ + @JsonProperty(value = "properties.defaultHostname", access = JsonProperty.Access.WRITE_ONLY) + private String defaultHostname; + + /** + * URL for the repository of the static site. + */ + @JsonProperty(value = "properties.repositoryUrl") + private String repositoryUrl; + + /** + * The target branch in the repository. + */ + @JsonProperty(value = "properties.branch") + private String branch; + + /** + * The custom domains associated with this static site. + */ + @JsonProperty(value = "properties.customDomains", access = JsonProperty.Access.WRITE_ONLY) + private List customDomains; + + /** + * A user's github repository token. This is used to setup the Github + * Actions workflow file and API secrets. + */ + @JsonProperty(value = "properties.repositoryToken") + private String repositoryToken; + + /** + * Build properties to configure on the repository. + */ + @JsonProperty(value = "properties.buildProperties") + private StaticSiteBuildProperties buildProperties; + + /** + * The sku property. + */ + @JsonProperty(value = "sku") + private SkuDescription sku; + + /** + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get the default autogenerated hostname for the static site. + * + * @return the defaultHostname value + */ + public String defaultHostname() { + return this.defaultHostname; + } + + /** + * Get uRL for the repository of the static site. + * + * @return the repositoryUrl value + */ + public String repositoryUrl() { + return this.repositoryUrl; + } + + /** + * Set uRL for the repository of the static site. + * + * @param repositoryUrl the repositoryUrl value to set + * @return the StaticSiteARMResourceInner object itself. + */ + public StaticSiteARMResourceInner withRepositoryUrl(String repositoryUrl) { + this.repositoryUrl = repositoryUrl; + return this; + } + + /** + * Get the target branch in the repository. + * + * @return the branch value + */ + public String branch() { + return this.branch; + } + + /** + * Set the target branch in the repository. + * + * @param branch the branch value to set + * @return the StaticSiteARMResourceInner object itself. + */ + public StaticSiteARMResourceInner withBranch(String branch) { + this.branch = branch; + return this; + } + + /** + * Get the custom domains associated with this static site. + * + * @return the customDomains value + */ + public List customDomains() { + return this.customDomains; + } + + /** + * Get a user's github repository token. This is used to setup the Github Actions workflow file and API secrets. + * + * @return the repositoryToken value + */ + public String repositoryToken() { + return this.repositoryToken; + } + + /** + * Set a user's github repository token. This is used to setup the Github Actions workflow file and API secrets. + * + * @param repositoryToken the repositoryToken value to set + * @return the StaticSiteARMResourceInner object itself. + */ + public StaticSiteARMResourceInner withRepositoryToken(String repositoryToken) { + this.repositoryToken = repositoryToken; + return this; + } + + /** + * Get build properties to configure on the repository. + * + * @return the buildProperties value + */ + public StaticSiteBuildProperties buildProperties() { + return this.buildProperties; + } + + /** + * Set build properties to configure on the repository. + * + * @param buildProperties the buildProperties value to set + * @return the StaticSiteARMResourceInner object itself. + */ + public StaticSiteARMResourceInner withBuildProperties(StaticSiteBuildProperties buildProperties) { + this.buildProperties = buildProperties; + 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 StaticSiteARMResourceInner object itself. + */ + public StaticSiteARMResourceInner withSku(SkuDescription sku) { + this.sku = sku; + return this; + } + + /** + * Get kind of resource. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Set kind of resource. + * + * @param kind the kind value to set + * @return the StaticSiteARMResourceInner object itself. + */ + public StaticSiteARMResourceInner withKind(String kind) { + this.kind = kind; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteBuildARMResourceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteBuildARMResourceImpl.java new file mode 100644 index 0000000000000..f736f791a3e0e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteBuildARMResourceImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteBuildARMResource; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.BuildStatus; + +class StaticSiteBuildARMResourceImpl extends IndexableRefreshableWrapperImpl implements StaticSiteBuildARMResource { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String prId; + + StaticSiteBuildARMResourceImpl(StaticSiteBuildARMResourceInner inner, CertificateRegistrationManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "staticSites"); + this.prId = IdParsingUtils.getValueFromIdByName(inner.id(), "builds"); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + StaticSitesInner client = this.manager().inner().staticSites(); + return client.getStaticSiteBuildAsync(this.resourceGroupName, this.name, this.prId); + } + + + + @Override + public String buildId() { + return this.inner().buildId(); + } + + @Override + public DateTime createdTimeUtc() { + return this.inner().createdTimeUtc(); + } + + @Override + public String hostname() { + return this.inner().hostname(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public DateTime lastUpdatedOn() { + return this.inner().lastUpdatedOn(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String pullRequestTitle() { + return this.inner().pullRequestTitle(); + } + + @Override + public String sourceBranch() { + return this.inner().sourceBranch(); + } + + @Override + public BuildStatus status() { + return this.inner().status(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteBuildARMResourceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteBuildARMResourceInner.java new file mode 100644 index 0000000000000..bbbc9419be96f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteBuildARMResourceInner.java @@ -0,0 +1,129 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.BuildStatus; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Static Site Build ARM resource. + */ +@JsonFlatten +public class StaticSiteBuildARMResourceInner extends ProxyOnlyResource { + /** + * An identifier for the static site build. + */ + @JsonProperty(value = "properties.buildId", access = JsonProperty.Access.WRITE_ONLY) + private String buildId; + + /** + * The source branch. + */ + @JsonProperty(value = "properties.sourceBranch", access = JsonProperty.Access.WRITE_ONLY) + private String sourceBranch; + + /** + * The title of a pull request that a static site build is related to. + */ + @JsonProperty(value = "properties.pullRequestTitle", access = JsonProperty.Access.WRITE_ONLY) + private String pullRequestTitle; + + /** + * The hostname for a static site build. + */ + @JsonProperty(value = "properties.hostname", access = JsonProperty.Access.WRITE_ONLY) + private String hostname; + + /** + * When this build was created. + */ + @JsonProperty(value = "properties.createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private DateTime createdTimeUtc; + + /** + * When this build was updated. + */ + @JsonProperty(value = "properties.lastUpdatedOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime lastUpdatedOn; + + /** + * The status of the static site build. Possible values include: + * 'WaitingForDeployment', 'Uploading', 'Deploying', 'Ready', 'Failed', + * 'Deleting', 'Detached'. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private BuildStatus status; + + /** + * Get an identifier for the static site build. + * + * @return the buildId value + */ + public String buildId() { + return this.buildId; + } + + /** + * Get the source branch. + * + * @return the sourceBranch value + */ + public String sourceBranch() { + return this.sourceBranch; + } + + /** + * Get the title of a pull request that a static site build is related to. + * + * @return the pullRequestTitle value + */ + public String pullRequestTitle() { + return this.pullRequestTitle; + } + + /** + * Get the hostname for a static site build. + * + * @return the hostname value + */ + public String hostname() { + return this.hostname; + } + + /** + * Get when this build was created. + * + * @return the createdTimeUtc value + */ + public DateTime createdTimeUtc() { + return this.createdTimeUtc; + } + + /** + * Get when this build was updated. + * + * @return the lastUpdatedOn value + */ + public DateTime lastUpdatedOn() { + return this.lastUpdatedOn; + } + + /** + * Get the status of the static site build. Possible values include: 'WaitingForDeployment', 'Uploading', 'Deploying', 'Ready', 'Failed', 'Deleting', 'Detached'. + * + * @return the status value + */ + public BuildStatus status() { + return this.status; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteCustomDomainOverviewARMResourceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteCustomDomainOverviewARMResourceImpl.java new file mode 100644 index 0000000000000..3c1d72a2ef51b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteCustomDomainOverviewARMResourceImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteCustomDomainOverviewARMResource; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import org.joda.time.DateTime; + +class StaticSiteCustomDomainOverviewARMResourceImpl extends CreatableUpdatableImpl implements StaticSiteCustomDomainOverviewARMResource, StaticSiteCustomDomainOverviewARMResource.Definition, StaticSiteCustomDomainOverviewARMResource.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String domainName; + + StaticSiteCustomDomainOverviewARMResourceImpl(String name, CertificateRegistrationManager manager) { + super(name, new StaticSiteCustomDomainOverviewARMResourceInner()); + this.manager = manager; + // Set resource name + this.domainName = name; + // + } + + StaticSiteCustomDomainOverviewARMResourceImpl(StaticSiteCustomDomainOverviewARMResourceInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.domainName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "staticSites"); + this.domainName = IdParsingUtils.getValueFromIdByName(inner.id(), "customDomains"); + // + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + StaticSitesInner client = this.manager().inner().staticSites(); + return client.createOrUpdateStaticSiteCustomDomainAsync(this.resourceGroupName, this.name, this.domainName) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + StaticSitesInner client = this.manager().inner().staticSites(); + return client.createOrUpdateStaticSiteCustomDomainAsync(this.resourceGroupName, this.name, this.domainName) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + StaticSitesInner client = this.manager().inner().staticSites(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public DateTime createdOn() { + return this.inner().createdOn(); + } + + @Override + public String domainName() { + return this.inner().domainName(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public StaticSiteCustomDomainOverviewARMResourceImpl withExistingStaticSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteCustomDomainOverviewARMResourceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteCustomDomainOverviewARMResourceInner.java new file mode 100644 index 0000000000000..d8f80a3f75447 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteCustomDomainOverviewARMResourceInner.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Static Site Custom Domain Overview ARM resource. + */ +@JsonFlatten +public class StaticSiteCustomDomainOverviewARMResourceInner extends ProxyOnlyResource { + /** + * The domain name for the static site custom domain. + */ + @JsonProperty(value = "properties.domainName", access = JsonProperty.Access.WRITE_ONLY) + private String domainName; + + /** + * The date and time on which the custom domain was created for the static + * site. + */ + @JsonProperty(value = "properties.createdOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime createdOn; + + /** + * Get the domain name for the static site custom domain. + * + * @return the domainName value + */ + public String domainName() { + return this.domainName; + } + + /** + * Get the date and time on which the custom domain was created for the static site. + * + * @return the createdOn value + */ + public DateTime createdOn() { + return this.createdOn; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteFunctionOverviewARMResourceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteFunctionOverviewARMResourceImpl.java new file mode 100644 index 0000000000000..3e8b1629f6ab0 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteFunctionOverviewARMResourceImpl.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteFunctionOverviewARMResource; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.TriggerTypes; + +class StaticSiteFunctionOverviewARMResourceImpl extends WrapperImpl implements StaticSiteFunctionOverviewARMResource { + private final CertificateRegistrationManager manager; + + StaticSiteFunctionOverviewARMResourceImpl(StaticSiteFunctionOverviewARMResourceInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + + + @Override + public String functionName() { + return this.inner().functionName(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public TriggerTypes triggerType() { + return this.inner().triggerType(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteFunctionOverviewARMResourceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteFunctionOverviewARMResourceInner.java new file mode 100644 index 0000000000000..f71ce3cb3fb1c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteFunctionOverviewARMResourceInner.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.TriggerTypes; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Static Site Function Overview ARM resource. + */ +@JsonFlatten +public class StaticSiteFunctionOverviewARMResourceInner extends ProxyOnlyResource { + /** + * The name for the function. + */ + @JsonProperty(value = "properties.functionName", access = JsonProperty.Access.WRITE_ONLY) + private String functionName; + + /** + * The trigger type of the function. Possible values include: + * 'HttpTrigger', 'Unknown'. + */ + @JsonProperty(value = "properties.triggerType", access = JsonProperty.Access.WRITE_ONLY) + private TriggerTypes triggerType; + + /** + * Get the name for the function. + * + * @return the functionName value + */ + public String functionName() { + return this.functionName; + } + + /** + * Get the trigger type of the function. Possible values include: 'HttpTrigger', 'Unknown'. + * + * @return the triggerType value + */ + public TriggerTypes triggerType() { + return this.triggerType; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteUserARMResourceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteUserARMResourceImpl.java new file mode 100644 index 0000000000000..3174b58533c94 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteUserARMResourceImpl.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteUserARMResource; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; + +class StaticSiteUserARMResourceImpl extends CreatableUpdatableImpl implements StaticSiteUserARMResource, StaticSiteUserARMResource.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String authprovider; + private String userid; + + StaticSiteUserARMResourceImpl(String name, CertificateRegistrationManager manager) { + super(name, new StaticSiteUserARMResourceInner()); + this.manager = manager; + // Set resource name + this.userid = name; + // + } + + StaticSiteUserARMResourceImpl(StaticSiteUserARMResourceInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.userid = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "staticSites"); + this.authprovider = IdParsingUtils.getValueFromIdByName(inner.id(), "authproviders"); + this.userid = IdParsingUtils.getValueFromIdByName(inner.id(), "users"); + // + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + StaticSitesInner client = this.manager().inner().staticSites(); + return null; // NOP createResourceAsync implementation as create is not supported + } + + @Override + public Observable updateResourceAsync() { + StaticSitesInner client = this.manager().inner().staticSites(); + return client.updateStaticSiteUserAsync(this.resourceGroupName, this.name, this.authprovider, this.userid, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + StaticSitesInner client = this.manager().inner().staticSites(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String provider() { + return this.inner().provider(); + } + + @Override + public String roles() { + return this.inner().roles(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String userId() { + return this.inner().userId(); + } + + @Override + public StaticSiteUserARMResourceImpl withKind(String kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public StaticSiteUserARMResourceImpl withRoles(String roles) { + this.inner().withRoles(roles); + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteUserARMResourceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteUserARMResourceInner.java new file mode 100644 index 0000000000000..4b3581763213d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteUserARMResourceInner.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Static Site User ARM resource. + */ +@JsonFlatten +public class StaticSiteUserARMResourceInner extends ProxyOnlyResource { + /** + * The identity provider for the static site user. + */ + @JsonProperty(value = "properties.provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /** + * The user id for the static site user. + */ + @JsonProperty(value = "properties.userId", access = JsonProperty.Access.WRITE_ONLY) + private String userId; + + /** + * The display name for the static site user. + */ + @JsonProperty(value = "properties.displayName", access = JsonProperty.Access.WRITE_ONLY) + private String displayName; + + /** + * The roles for the static site user, in free-form string format. + */ + @JsonProperty(value = "properties.roles") + private String roles; + + /** + * Get the identity provider for the static site user. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Get the user id for the static site user. + * + * @return the userId value + */ + public String userId() { + return this.userId; + } + + /** + * Get the display name for the static site user. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Get the roles for the static site user, in free-form string format. + * + * @return the roles value + */ + public String roles() { + return this.roles; + } + + /** + * Set the roles for the static site user, in free-form string format. + * + * @param roles the roles value to set + * @return the StaticSiteUserARMResourceInner object itself. + */ + public StaticSiteUserARMResourceInner withRoles(String roles) { + this.roles = roles; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteUserInvitationResponseResourceImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteUserInvitationResponseResourceImpl.java new file mode 100644 index 0000000000000..bac4554d3733e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteUserInvitationResponseResourceImpl.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteUserInvitationResponseResource; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import org.joda.time.DateTime; + +class StaticSiteUserInvitationResponseResourceImpl extends WrapperImpl implements StaticSiteUserInvitationResponseResource { + private final CertificateRegistrationManager manager; + StaticSiteUserInvitationResponseResourceImpl(StaticSiteUserInvitationResponseResourceInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public DateTime expiresOn() { + return this.inner().expiresOn(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String invitationUrl() { + return this.inner().invitationUrl(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteUserInvitationResponseResourceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteUserInvitationResponseResourceInner.java new file mode 100644 index 0000000000000..f6e1652fb2096 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSiteUserInvitationResponseResourceInner.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.appservice.v2019_08_01.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Static sites user roles invitation link resource. + */ +@JsonFlatten +public class StaticSiteUserInvitationResponseResourceInner extends ProxyOnlyResource { + /** + * The expiration time of the invitation. + */ + @JsonProperty(value = "properties.expiresOn", access = JsonProperty.Access.WRITE_ONLY) + private DateTime expiresOn; + + /** + * The url for the invitation link. + */ + @JsonProperty(value = "properties.invitationUrl", access = JsonProperty.Access.WRITE_ONLY) + private String invitationUrl; + + /** + * Get the expiration time of the invitation. + * + * @return the expiresOn value + */ + public DateTime expiresOn() { + return this.expiresOn; + } + + /** + * Get the url for the invitation link. + * + * @return the invitationUrl value + */ + public String invitationUrl() { + return this.invitationUrl; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSitesImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSitesImpl.java new file mode 100644 index 0000000000000..4089fe47c6fe8 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSitesImpl.java @@ -0,0 +1,393 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSites; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteARMResource; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteUserInvitationResponseResource; +import com.microsoft.azure.management.appservice.v2019_08_01.StringDictionary; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteUserInvitationRequestResource; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteResetPropertiesARMResource; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteUserARMResource; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteBuildARMResource; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteFunctionOverviewARMResource; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteCustomDomainOverviewARMResource; + +class StaticSitesImpl extends GroupableResourcesCoreImpl implements StaticSites { + protected StaticSitesImpl(CertificateRegistrationManager manager) { + super(manager.inner().staticSites(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + StaticSitesInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + StaticSitesInner client = this.inner(); + return client.deleteStaticSiteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteStaticSiteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + StaticSitesInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + StaticSitesInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StaticSiteARMResource call(StaticSiteARMResourceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + StaticSitesInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + StaticSitesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StaticSiteARMResource call(StaticSiteARMResourceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public StaticSiteARMResourceImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable createUserRolesInvitationLinkAsync(String resourceGroupName, String name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope) { + StaticSitesInner client = this.inner(); + return client.createUserRolesInvitationLinkAsync(resourceGroupName, name, staticSiteUserRolesInvitationEnvelope) + .map(new Func1() { + @Override + public StaticSiteUserInvitationResponseResource call(StaticSiteUserInvitationResponseResourceInner inner) { + return new StaticSiteUserInvitationResponseResourceImpl(inner, manager()); + } + }); + } + + @Override + public Completable detachStaticSiteAsync(String resourceGroupName, String name) { + StaticSitesInner client = this.inner(); + return client.detachStaticSiteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable listStaticSiteFunctionAppSettingsAsync(String resourceGroupName, String name) { + StaticSitesInner client = this.inner(); + return client.listStaticSiteFunctionAppSettingsAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public StringDictionary call(StringDictionaryInner inner) { + return new StringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable listStaticSiteSecretsAsync(String resourceGroupName, String name) { + StaticSitesInner client = this.inner(); + return client.listStaticSiteSecretsAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public StringDictionary call(StringDictionaryInner inner) { + return new StringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Completable resetStaticSiteApiKeyAsync(String resourceGroupName, String name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope) { + StaticSitesInner client = this.inner(); + return client.resetStaticSiteApiKeyAsync(resourceGroupName, name, resetPropertiesEnvelope).toCompletable(); + } + + @Override + protected StaticSiteARMResourceImpl wrapModel(StaticSiteARMResourceInner inner) { + return new StaticSiteARMResourceImpl(inner.name(), inner, manager()); + } + + @Override + protected StaticSiteARMResourceImpl wrapModel(String name) { + return new StaticSiteARMResourceImpl(name, new StaticSiteARMResourceInner(), this.manager()); + } + + @Override + public StaticSiteCustomDomainOverviewARMResourceImpl defineCustomDomain(String name) { + return wrapCustomDomainModel(name); + } + + private StaticSiteCustomDomainOverviewARMResourceImpl wrapCustomDomainModel(String name) { + return new StaticSiteCustomDomainOverviewARMResourceImpl(name, this.manager()); + } + + private StaticSiteUserARMResourceImpl wrapStaticSiteUserARMResourceModel(StaticSiteUserARMResourceInner inner) { + return new StaticSiteUserARMResourceImpl(inner, manager()); + } + + private StaticSiteBuildARMResourceImpl wrapStaticSiteBuildARMResourceModel(StaticSiteBuildARMResourceInner inner) { + return new StaticSiteBuildARMResourceImpl(inner, manager()); + } + + private StaticSiteFunctionOverviewARMResourceImpl wrapStaticSiteFunctionOverviewARMResourceModel(StaticSiteFunctionOverviewARMResourceInner inner) { + return new StaticSiteFunctionOverviewARMResourceImpl(inner, manager()); + } + + private StaticSiteCustomDomainOverviewARMResourceImpl wrapStaticSiteCustomDomainOverviewARMResourceModel(StaticSiteCustomDomainOverviewARMResourceInner inner) { + return new StaticSiteCustomDomainOverviewARMResourceImpl(inner, manager()); + } + + private Observable getStaticSiteBuildARMResourceInnerUsingStaticSitesInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "staticSites"); + String prId = IdParsingUtils.getValueFromIdByName(id, "builds"); + StaticSitesInner client = this.inner(); + return client.getStaticSiteBuildAsync(resourceGroupName, name, prId); + } + + @Override + public Observable listStaticSiteUsersAsync(final String resourceGroupName, final String name, final String authprovider) { + StaticSitesInner client = this.inner(); + return client.listStaticSiteUsersAsync(resourceGroupName, name, authprovider) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StaticSiteUserARMResource call(StaticSiteUserARMResourceInner inner) { + return new StaticSiteUserARMResourceImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteStaticSiteUserAsync(String resourceGroupName, String name, String authprovider, String userid) { + StaticSitesInner client = this.inner(); + return client.deleteStaticSiteUserAsync(resourceGroupName, name, authprovider, userid).toCompletable(); + } + + @Override + public Observable getStaticSiteBuildAsync(String resourceGroupName, String name, String prId) { + StaticSitesInner client = this.inner(); + return client.getStaticSiteBuildAsync(resourceGroupName, name, prId) + .flatMap(new Func1>() { + @Override + public Observable call(StaticSiteBuildARMResourceInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((StaticSiteBuildARMResource)wrapStaticSiteBuildARMResourceModel(inner)); + } + } + }); + } + + @Override + public Observable getStaticSiteBuildsAsync(final String resourceGroupName, final String name) { + StaticSitesInner client = this.inner(); + return client.getStaticSiteBuildsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StaticSiteBuildARMResource call(StaticSiteBuildARMResourceInner inner) { + return wrapStaticSiteBuildARMResourceModel(inner); + } + }); + } + + @Override + public Completable deleteStaticSiteBuildAsync(String resourceGroupName, String name, String prId) { + StaticSitesInner client = this.inner(); + return client.deleteStaticSiteBuildAsync(resourceGroupName, name, prId).toCompletable(); + } + + @Override + public Observable listStaticSiteBuildFunctionAppSettingsAsync(String resourceGroupName, String name, String prId) { + StaticSitesInner client = this.inner(); + return client.listStaticSiteBuildFunctionAppSettingsAsync(resourceGroupName, name, prId) + .map(new Func1() { + @Override + public StringDictionary call(StringDictionaryInner inner) { + return new StringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateStaticSiteBuildFunctionAppSettingsAsync(String resourceGroupName, String name, String prId, StringDictionaryInner appSettings) { + StaticSitesInner client = this.inner(); + return client.createOrUpdateStaticSiteBuildFunctionAppSettingsAsync(resourceGroupName, name, prId, appSettings) + .map(new Func1() { + @Override + public StringDictionary call(StringDictionaryInner inner) { + return new StringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateStaticSiteFunctionAppSettingsAsync(String resourceGroupName, String name, StringDictionaryInner appSettings) { + StaticSitesInner client = this.inner(); + return client.createOrUpdateStaticSiteFunctionAppSettingsAsync(resourceGroupName, name, appSettings) + .map(new Func1() { + @Override + public StringDictionary call(StringDictionaryInner inner) { + return new StringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable listStaticSiteBuildFunctionsAsync(final String resourceGroupName, final String name, final String prId) { + StaticSitesInner client = this.inner(); + return client.listStaticSiteBuildFunctionsAsync(resourceGroupName, name, prId) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StaticSiteFunctionOverviewARMResource call(StaticSiteFunctionOverviewARMResourceInner inner) { + return wrapStaticSiteFunctionOverviewARMResourceModel(inner); + } + }); + } + + @Override + public Observable listStaticSiteFunctionsAsync(final String resourceGroupName, final String name) { + StaticSitesInner client = this.inner(); + return client.listStaticSiteFunctionsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StaticSiteFunctionOverviewARMResource call(StaticSiteFunctionOverviewARMResourceInner inner) { + return new StaticSiteFunctionOverviewARMResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable listStaticSiteCustomDomainsAsync(final String resourceGroupName, final String name) { + StaticSitesInner client = this.inner(); + return client.listStaticSiteCustomDomainsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public StaticSiteCustomDomainOverviewARMResource call(StaticSiteCustomDomainOverviewARMResourceInner inner) { + return wrapStaticSiteCustomDomainOverviewARMResourceModel(inner); + } + }); + } + + @Override + public Completable deleteStaticSiteCustomDomainAsync(String resourceGroupName, String name, String domainName) { + StaticSitesInner client = this.inner(); + return client.deleteStaticSiteCustomDomainAsync(resourceGroupName, name, domainName).toCompletable(); + } + + @Override + public Completable validateCustomDomainCanBeAddedToStaticSiteAsync(String resourceGroupName, String name, String domainName) { + StaticSitesInner client = this.inner(); + return client.validateCustomDomainCanBeAddedToStaticSiteAsync(resourceGroupName, name, domainName).toCompletable(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSitesInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSitesInner.java new file mode 100644 index 0000000000000..0e12e5330b749 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StaticSitesInner.java @@ -0,0 +1,3753 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.appservice.v2019_08_01.DefaultErrorResponseException; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSitePatchResource; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteResetPropertiesARMResource; +import com.microsoft.azure.management.appservice.v2019_08_01.StaticSiteUserInvitationRequestResource; +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 StaticSites. + */ +public class StaticSitesInner implements InnerSupportsGet, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private StaticSitesService service; + /** The service client containing this operation class. */ + private WebSiteManagementClientImpl client; + + /** + * Initializes an instance of StaticSitesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public StaticSitesInner(Retrofit retrofit, WebSiteManagementClientImpl client) { + this.service = retrofit.create(StaticSitesService.class); + this.client = client; + } + + /** + * The interface defining all the services for StaticSites to be + * used by Retrofit to perform actually REST calls. + */ + interface StaticSitesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.StaticSites list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites") + 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.appservice.v2019_08_01.StaticSites listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites") + 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.appservice.v2019_08_01.StaticSites getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{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.appservice.v2019_08_01.StaticSites createOrUpdateStaticSite" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") + Observable> createOrUpdateStaticSite(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body StaticSiteARMResourceInner staticSiteEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.StaticSites deleteStaticSite" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}", method = "DELETE", hasBody = true) + Observable> deleteStaticSite(@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.appservice.v2019_08_01.StaticSites updateStaticSite" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") + Observable> updateStaticSite(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body StaticSitePatchResource staticSiteEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.StaticSites listStaticSiteUsers" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers") + Observable> listStaticSiteUsers(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("authprovider") String authprovider, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.StaticSites deleteStaticSiteUser" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}", method = "DELETE", hasBody = true) + Observable> deleteStaticSiteUser(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("authprovider") String authprovider, @Path("userid") String userid, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.StaticSites updateStaticSiteUser" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}") + Observable> updateStaticSiteUser(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("authprovider") String authprovider, @Path("userid") String userid, @Path("subscriptionId") String subscriptionId, @Body StaticSiteUserARMResourceInner staticSiteUserEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.StaticSites getStaticSiteBuilds" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds") + Observable> getStaticSiteBuilds(@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.appservice.v2019_08_01.StaticSites getStaticSiteBuild" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}") + Observable> getStaticSiteBuild(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("prId") String prId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.StaticSites deleteStaticSiteBuild" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}", method = "DELETE", hasBody = true) + Observable> deleteStaticSiteBuild(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("prId") String prId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.StaticSites createOrUpdateStaticSiteBuildFunctionAppSettings" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings") + Observable> createOrUpdateStaticSiteBuildFunctionAppSettings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("prId") String prId, @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.appservice.v2019_08_01.StaticSites listStaticSiteBuildFunctions" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions") + Observable> listStaticSiteBuildFunctions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("prId") String prId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.StaticSites listStaticSiteBuildFunctionAppSettings" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings") + Observable> listStaticSiteBuildFunctionAppSettings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("prId") String prId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.StaticSites createOrUpdateStaticSiteFunctionAppSettings" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings") + Observable> createOrUpdateStaticSiteFunctionAppSettings(@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.appservice.v2019_08_01.StaticSites createUserRolesInvitationLink" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation") + Observable> createUserRolesInvitationLink(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.StaticSites listStaticSiteCustomDomains" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains") + Observable> listStaticSiteCustomDomains(@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.appservice.v2019_08_01.StaticSites createOrUpdateStaticSiteCustomDomain" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") + Observable> createOrUpdateStaticSiteCustomDomain(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @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.appservice.v2019_08_01.StaticSites deleteStaticSiteCustomDomain" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}", method = "DELETE", hasBody = true) + Observable> deleteStaticSiteCustomDomain(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @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.appservice.v2019_08_01.StaticSites validateCustomDomainCanBeAddedToStaticSite" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate") + Observable> validateCustomDomainCanBeAddedToStaticSite(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @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.appservice.v2019_08_01.StaticSites detachStaticSite" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach") + Observable> detachStaticSite(@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.appservice.v2019_08_01.StaticSites listStaticSiteFunctions" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions") + Observable> listStaticSiteFunctions(@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.appservice.v2019_08_01.StaticSites listStaticSiteFunctionAppSettings" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings") + Observable> listStaticSiteFunctionAppSettings(@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.appservice.v2019_08_01.StaticSites listStaticSiteSecrets" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets") + Observable> listStaticSiteSecrets(@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.appservice.v2019_08_01.StaticSites resetStaticSiteApiKey" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey") + Observable> resetStaticSiteApiKey(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body StaticSiteResetPropertiesARMResource resetPropertiesEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.StaticSites 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.appservice.v2019_08_01.StaticSites 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.appservice.v2019_08_01.StaticSites listStaticSiteUsersNext" }) + @GET + Observable> listStaticSiteUsersNext(@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.appservice.v2019_08_01.StaticSites getStaticSiteBuildsNext" }) + @GET + Observable> getStaticSiteBuildsNext(@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.appservice.v2019_08_01.StaticSites listStaticSiteBuildFunctionsNext" }) + @GET + Observable> listStaticSiteBuildFunctionsNext(@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.appservice.v2019_08_01.StaticSites listStaticSiteCustomDomainsNext" }) + @GET + Observable> listStaticSiteCustomDomainsNext(@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.appservice.v2019_08_01.StaticSites listStaticSiteFunctionsNext" }) + @GET + Observable> listStaticSiteFunctionsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get all Static Sites for a subscription. + * Description for Get all Static Sites for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StaticSiteARMResourceInner> 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 Static Sites for a subscription. + * Description for Get all Static Sites 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 Static Sites for a subscription. + * Description for Get all Static Sites for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StaticSiteARMResourceInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all Static Sites for a subscription. + * Description for Get all Static Sites for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StaticSiteARMResourceInner> 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 Static Sites for a subscription. + * Description for Get all Static Sites for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StaticSiteARMResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all static sites in the specified resource group. + * Description for Gets all static sites 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StaticSiteARMResourceInner> 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 static sites in the specified resource group. + * Description for Gets all static sites 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 static sites in the specified resource group. + * Description for Gets all static sites 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<StaticSiteARMResourceInner> 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 static sites in the specified resource group. + * Description for Gets all static sites 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<StaticSiteARMResourceInner> 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 static sites in the specified resource group. + * Description for Gets all static sites in the specified 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<StaticSiteARMResourceInner> 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the details of a static site. + * Description for Gets the details of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StaticSiteARMResourceInner object if successful. + */ + public StaticSiteARMResourceInner getByResourceGroup(String resourceGroupName, String name) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the details of a static site. + * Description for Gets the details of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param serviceCallback 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 static site. + * Description for Gets the details of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StaticSiteARMResourceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String name) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).map(new Func1, StaticSiteARMResourceInner>() { + @Override + public StaticSiteARMResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the details of a static site. + * Description for Gets the details of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StaticSiteARMResourceInner 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a new static site in an existing resource group, or updates an existing static site. + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StaticSiteARMResourceInner object if successful. + */ + public StaticSiteARMResourceInner createOrUpdateStaticSite(String resourceGroupName, String name, StaticSiteARMResourceInner staticSiteEnvelope) { + return createOrUpdateStaticSiteWithServiceResponseAsync(resourceGroupName, name, staticSiteEnvelope).toBlocking().single().body(); + } + + /** + * Creates a new static site in an existing resource group, or updates an existing static site. + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite 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 createOrUpdateStaticSiteAsync(String resourceGroupName, String name, StaticSiteARMResourceInner staticSiteEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateStaticSiteWithServiceResponseAsync(resourceGroupName, name, staticSiteEnvelope), serviceCallback); + } + + /** + * Creates a new static site in an existing resource group, or updates an existing static site. + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StaticSiteARMResourceInner object + */ + public Observable createOrUpdateStaticSiteAsync(String resourceGroupName, String name, StaticSiteARMResourceInner staticSiteEnvelope) { + return createOrUpdateStaticSiteWithServiceResponseAsync(resourceGroupName, name, staticSiteEnvelope).map(new Func1, StaticSiteARMResourceInner>() { + @Override + public StaticSiteARMResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new static site in an existing resource group, or updates an existing static site. + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StaticSiteARMResourceInner object + */ + public Observable> createOrUpdateStaticSiteWithServiceResponseAsync(String resourceGroupName, String name, StaticSiteARMResourceInner staticSiteEnvelope) { + if (resourceGroupName == null) { + throw new 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 (staticSiteEnvelope == null) { + throw new IllegalArgumentException("Parameter staticSiteEnvelope is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(staticSiteEnvelope); + return service.createOrUpdateStaticSite(resourceGroupName, name, this.client.subscriptionId(), staticSiteEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateStaticSiteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateStaticSiteDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a static site. + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteStaticSite(String resourceGroupName, String name) { + deleteStaticSiteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Deletes a static site. + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site 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 deleteStaticSiteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteStaticSiteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Deletes a static site. + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteStaticSiteAsync(String resourceGroupName, String name) { + return deleteStaticSiteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a static site. + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteStaticSiteWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteStaticSite(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteStaticSiteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteStaticSiteDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a new static site in an existing resource group, or updates an existing static site. + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StaticSiteARMResourceInner object if successful. + */ + public StaticSiteARMResourceInner updateStaticSite(String resourceGroupName, String name, StaticSitePatchResource staticSiteEnvelope) { + return updateStaticSiteWithServiceResponseAsync(resourceGroupName, name, staticSiteEnvelope).toBlocking().single().body(); + } + + /** + * Creates a new static site in an existing resource group, or updates an existing static site. + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite 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 updateStaticSiteAsync(String resourceGroupName, String name, StaticSitePatchResource staticSiteEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateStaticSiteWithServiceResponseAsync(resourceGroupName, name, staticSiteEnvelope), serviceCallback); + } + + /** + * Creates a new static site in an existing resource group, or updates an existing static site. + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StaticSiteARMResourceInner object + */ + public Observable updateStaticSiteAsync(String resourceGroupName, String name, StaticSitePatchResource staticSiteEnvelope) { + return updateStaticSiteWithServiceResponseAsync(resourceGroupName, name, staticSiteEnvelope).map(new Func1, StaticSiteARMResourceInner>() { + @Override + public StaticSiteARMResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new static site in an existing resource group, or updates an existing static site. + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StaticSiteARMResourceInner object + */ + public Observable> updateStaticSiteWithServiceResponseAsync(String resourceGroupName, String name, StaticSitePatchResource staticSiteEnvelope) { + if (resourceGroupName == null) { + throw new 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 (staticSiteEnvelope == null) { + throw new IllegalArgumentException("Parameter staticSiteEnvelope is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(staticSiteEnvelope); + return service.updateStaticSite(resourceGroupName, name, this.client.subscriptionId(), staticSiteEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateStaticSiteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateStaticSiteDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the list of users of a static site. + * Description for Gets the list of users of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for the users. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StaticSiteUserARMResourceInner> object if successful. + */ + public PagedList listStaticSiteUsers(final String resourceGroupName, final String name, final String authprovider) { + ServiceResponse> response = listStaticSiteUsersSinglePageAsync(resourceGroupName, name, authprovider).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listStaticSiteUsersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of users of a static site. + * Description for Gets the list of users of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for the users. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listStaticSiteUsersAsync(final String resourceGroupName, final String name, final String authprovider, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listStaticSiteUsersSinglePageAsync(resourceGroupName, name, authprovider), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listStaticSiteUsersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of users of a static site. + * Description for Gets the list of users of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for the users. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StaticSiteUserARMResourceInner> object + */ + public Observable> listStaticSiteUsersAsync(final String resourceGroupName, final String name, final String authprovider) { + return listStaticSiteUsersWithServiceResponseAsync(resourceGroupName, name, authprovider) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of users of a static site. + * Description for Gets the list of users of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for the users. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StaticSiteUserARMResourceInner> object + */ + public Observable>> listStaticSiteUsersWithServiceResponseAsync(final String resourceGroupName, final String name, final String authprovider) { + return listStaticSiteUsersSinglePageAsync(resourceGroupName, name, authprovider) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listStaticSiteUsersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of users of a static site. + * Description for Gets the list of users of a static site. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the static site. + ServiceResponse> * @param authprovider The auth provider for the users. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StaticSiteUserARMResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listStaticSiteUsersSinglePageAsync(final String resourceGroupName, final String name, final String authprovider) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (authprovider == null) { + throw new IllegalArgumentException("Parameter authprovider is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listStaticSiteUsers(resourceGroupName, name, authprovider, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listStaticSiteUsersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listStaticSiteUsersDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes the user entry from the static site. + * Description for Deletes the user entry from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the staticsite. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteStaticSiteUser(String resourceGroupName, String name, String authprovider, String userid) { + deleteStaticSiteUserWithServiceResponseAsync(resourceGroupName, name, authprovider, userid).toBlocking().single().body(); + } + + /** + * Deletes the user entry from the static site. + * Description for Deletes the user entry from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the staticsite. + * @param authprovider The auth provider for this user. + * @param userid The user id of the 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 deleteStaticSiteUserAsync(String resourceGroupName, String name, String authprovider, String userid, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteStaticSiteUserWithServiceResponseAsync(resourceGroupName, name, authprovider, userid), serviceCallback); + } + + /** + * Deletes the user entry from the static site. + * Description for Deletes the user entry from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the staticsite. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteStaticSiteUserAsync(String resourceGroupName, String name, String authprovider, String userid) { + return deleteStaticSiteUserWithServiceResponseAsync(resourceGroupName, name, authprovider, userid).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the user entry from the static site. + * Description for Deletes the user entry from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the staticsite. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteStaticSiteUserWithServiceResponseAsync(String resourceGroupName, String name, String authprovider, String userid) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (authprovider == null) { + throw new IllegalArgumentException("Parameter authprovider is required and cannot be null."); + } + if (userid == null) { + throw new IllegalArgumentException("Parameter userid is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteStaticSiteUser(resourceGroupName, name, authprovider, userid, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteStaticSiteUserDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteStaticSiteUserDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates a user entry with the listed roles. + * Description for Updates a user entry with the listed roles. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param staticSiteUserEnvelope A JSON representation of the StaticSiteUser properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StaticSiteUserARMResourceInner object if successful. + */ + public StaticSiteUserARMResourceInner updateStaticSiteUser(String resourceGroupName, String name, String authprovider, String userid, StaticSiteUserARMResourceInner staticSiteUserEnvelope) { + return updateStaticSiteUserWithServiceResponseAsync(resourceGroupName, name, authprovider, userid, staticSiteUserEnvelope).toBlocking().single().body(); + } + + /** + * Updates a user entry with the listed roles. + * Description for Updates a user entry with the listed roles. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param staticSiteUserEnvelope A JSON representation of the StaticSiteUser 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 updateStaticSiteUserAsync(String resourceGroupName, String name, String authprovider, String userid, StaticSiteUserARMResourceInner staticSiteUserEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateStaticSiteUserWithServiceResponseAsync(resourceGroupName, name, authprovider, userid, staticSiteUserEnvelope), serviceCallback); + } + + /** + * Updates a user entry with the listed roles. + * Description for Updates a user entry with the listed roles. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param staticSiteUserEnvelope A JSON representation of the StaticSiteUser properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StaticSiteUserARMResourceInner object + */ + public Observable updateStaticSiteUserAsync(String resourceGroupName, String name, String authprovider, String userid, StaticSiteUserARMResourceInner staticSiteUserEnvelope) { + return updateStaticSiteUserWithServiceResponseAsync(resourceGroupName, name, authprovider, userid, staticSiteUserEnvelope).map(new Func1, StaticSiteUserARMResourceInner>() { + @Override + public StaticSiteUserARMResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a user entry with the listed roles. + * Description for Updates a user entry with the listed roles. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param staticSiteUserEnvelope A JSON representation of the StaticSiteUser properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StaticSiteUserARMResourceInner object + */ + public Observable> updateStaticSiteUserWithServiceResponseAsync(String resourceGroupName, String name, String authprovider, String userid, StaticSiteUserARMResourceInner staticSiteUserEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (authprovider == null) { + throw new IllegalArgumentException("Parameter authprovider is required and cannot be null."); + } + if (userid == null) { + throw new IllegalArgumentException("Parameter userid is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (staticSiteUserEnvelope == null) { + throw new IllegalArgumentException("Parameter staticSiteUserEnvelope is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(staticSiteUserEnvelope); + return service.updateStaticSiteUser(resourceGroupName, name, authprovider, userid, this.client.subscriptionId(), staticSiteUserEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateStaticSiteUserDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateStaticSiteUserDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all static site builds for a particular static site. + * Description for Gets all static site builds for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StaticSiteBuildARMResourceInner> object if successful. + */ + public PagedList getStaticSiteBuilds(final String resourceGroupName, final String name) { + ServiceResponse> response = getStaticSiteBuildsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getStaticSiteBuildsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all static site builds for a particular static site. + * Description for Gets all static site builds for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getStaticSiteBuildsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getStaticSiteBuildsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getStaticSiteBuildsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all static site builds for a particular static site. + * Description for Gets all static site builds for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StaticSiteBuildARMResourceInner> object + */ + public Observable> getStaticSiteBuildsAsync(final String resourceGroupName, final String name) { + return getStaticSiteBuildsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all static site builds for a particular static site. + * Description for Gets all static site builds for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StaticSiteBuildARMResourceInner> object + */ + public Observable>> getStaticSiteBuildsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return getStaticSiteBuildsSinglePageAsync(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(getStaticSiteBuildsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all static site builds for a particular static site. + * Description for Gets all static site builds for a particular static site. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StaticSiteBuildARMResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getStaticSiteBuildsSinglePageAsync(final String resourceGroupName, final String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getStaticSiteBuilds(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getStaticSiteBuildsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getStaticSiteBuildsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the details of a static site build. + * Description for Gets the details of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StaticSiteBuildARMResourceInner object if successful. + */ + public StaticSiteBuildARMResourceInner getStaticSiteBuild(String resourceGroupName, String name, String prId) { + return getStaticSiteBuildWithServiceResponseAsync(resourceGroupName, name, prId).toBlocking().single().body(); + } + + /** + * Gets the details of a static site build. + * Description for Gets the details of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site 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 getStaticSiteBuildAsync(String resourceGroupName, String name, String prId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getStaticSiteBuildWithServiceResponseAsync(resourceGroupName, name, prId), serviceCallback); + } + + /** + * Gets the details of a static site build. + * Description for Gets the details of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StaticSiteBuildARMResourceInner object + */ + public Observable getStaticSiteBuildAsync(String resourceGroupName, String name, String prId) { + return getStaticSiteBuildWithServiceResponseAsync(resourceGroupName, name, prId).map(new Func1, StaticSiteBuildARMResourceInner>() { + @Override + public StaticSiteBuildARMResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the details of a static site build. + * Description for Gets the details of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StaticSiteBuildARMResourceInner object + */ + public Observable> getStaticSiteBuildWithServiceResponseAsync(String resourceGroupName, String name, String prId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (prId == null) { + throw new IllegalArgumentException("Parameter prId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getStaticSiteBuild(resourceGroupName, name, prId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getStaticSiteBuildDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getStaticSiteBuildDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a static site build. + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteStaticSiteBuild(String resourceGroupName, String name, String prId) { + deleteStaticSiteBuildWithServiceResponseAsync(resourceGroupName, name, prId).toBlocking().single().body(); + } + + /** + * Deletes a static site build. + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site 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 deleteStaticSiteBuildAsync(String resourceGroupName, String name, String prId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteStaticSiteBuildWithServiceResponseAsync(resourceGroupName, name, prId), serviceCallback); + } + + /** + * Deletes a static site build. + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteStaticSiteBuildAsync(String resourceGroupName, String name, String prId) { + return deleteStaticSiteBuildWithServiceResponseAsync(resourceGroupName, name, prId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a static site build. + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteStaticSiteBuildWithServiceResponseAsync(String resourceGroupName, String name, String prId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (prId == null) { + throw new IllegalArgumentException("Parameter prId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteStaticSiteBuild(resourceGroupName, name, prId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteStaticSiteBuildDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteStaticSiteBuildDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates or updates the function app settings of a static site build. + * Description for Creates or updates the function app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @param appSettings the StringDictionaryInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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 createOrUpdateStaticSiteBuildFunctionAppSettings(String resourceGroupName, String name, String prId, StringDictionaryInner appSettings) { + return createOrUpdateStaticSiteBuildFunctionAppSettingsWithServiceResponseAsync(resourceGroupName, name, prId, appSettings).toBlocking().single().body(); + } + + /** + * Creates or updates the function app settings of a static site build. + * Description for Creates or updates the function app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @param appSettings the StringDictionaryInner value + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateStaticSiteBuildFunctionAppSettingsAsync(String resourceGroupName, String name, String prId, StringDictionaryInner appSettings, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateStaticSiteBuildFunctionAppSettingsWithServiceResponseAsync(resourceGroupName, name, prId, appSettings), serviceCallback); + } + + /** + * Creates or updates the function app settings of a static site build. + * Description for Creates or updates the function app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @param appSettings the StringDictionaryInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable createOrUpdateStaticSiteBuildFunctionAppSettingsAsync(String resourceGroupName, String name, String prId, StringDictionaryInner appSettings) { + return createOrUpdateStaticSiteBuildFunctionAppSettingsWithServiceResponseAsync(resourceGroupName, name, prId, appSettings).map(new Func1, StringDictionaryInner>() { + @Override + public StringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the function app settings of a static site build. + * Description for Creates or updates the function app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @param appSettings the StringDictionaryInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable> createOrUpdateStaticSiteBuildFunctionAppSettingsWithServiceResponseAsync(String resourceGroupName, String name, String prId, 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 (prId == null) { + throw new IllegalArgumentException("Parameter prId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (appSettings == null) { + throw new IllegalArgumentException("Parameter appSettings is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(appSettings); + return service.createOrUpdateStaticSiteBuildFunctionAppSettings(resourceGroupName, name, prId, this.client.subscriptionId(), appSettings, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateStaticSiteBuildFunctionAppSettingsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateStaticSiteBuildFunctionAppSettingsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the functions of a particular static site build. + * Description for Gets the functions of a particular static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StaticSiteFunctionOverviewARMResourceInner> object if successful. + */ + public PagedList listStaticSiteBuildFunctions(final String resourceGroupName, final String name, final String prId) { + ServiceResponse> response = listStaticSiteBuildFunctionsSinglePageAsync(resourceGroupName, name, prId).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listStaticSiteBuildFunctionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the functions of a particular static site build. + * Description for Gets the functions of a particular static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site 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> listStaticSiteBuildFunctionsAsync(final String resourceGroupName, final String name, final String prId, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listStaticSiteBuildFunctionsSinglePageAsync(resourceGroupName, name, prId), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listStaticSiteBuildFunctionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the functions of a particular static site build. + * Description for Gets the functions of a particular static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StaticSiteFunctionOverviewARMResourceInner> object + */ + public Observable> listStaticSiteBuildFunctionsAsync(final String resourceGroupName, final String name, final String prId) { + return listStaticSiteBuildFunctionsWithServiceResponseAsync(resourceGroupName, name, prId) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the functions of a particular static site build. + * Description for Gets the functions of a particular static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StaticSiteFunctionOverviewARMResourceInner> object + */ + public Observable>> listStaticSiteBuildFunctionsWithServiceResponseAsync(final String resourceGroupName, final String name, final String prId) { + return listStaticSiteBuildFunctionsSinglePageAsync(resourceGroupName, name, prId) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listStaticSiteBuildFunctionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the functions of a particular static site build. + * Description for Gets the functions of a particular static site build. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the static site. + ServiceResponse> * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StaticSiteFunctionOverviewARMResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listStaticSiteBuildFunctionsSinglePageAsync(final String resourceGroupName, final String name, final String prId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (prId == null) { + throw new IllegalArgumentException("Parameter prId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listStaticSiteBuildFunctions(resourceGroupName, name, prId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listStaticSiteBuildFunctionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listStaticSiteBuildFunctionsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the application settings of a static site. + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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 listStaticSiteBuildFunctionAppSettings(String resourceGroupName, String name, String prId) { + return listStaticSiteBuildFunctionAppSettingsWithServiceResponseAsync(resourceGroupName, name, prId).toBlocking().single().body(); + } + + /** + * Gets the application settings of a static site. + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site 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 listStaticSiteBuildFunctionAppSettingsAsync(String resourceGroupName, String name, String prId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listStaticSiteBuildFunctionAppSettingsWithServiceResponseAsync(resourceGroupName, name, prId), serviceCallback); + } + + /** + * Gets the application settings of a static site. + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable listStaticSiteBuildFunctionAppSettingsAsync(String resourceGroupName, String name, String prId) { + return listStaticSiteBuildFunctionAppSettingsWithServiceResponseAsync(resourceGroupName, name, prId).map(new Func1, StringDictionaryInner>() { + @Override + public StringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the application settings of a static site. + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param prId The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable> listStaticSiteBuildFunctionAppSettingsWithServiceResponseAsync(String resourceGroupName, String name, String prId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (prId == null) { + throw new IllegalArgumentException("Parameter prId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listStaticSiteBuildFunctionAppSettings(resourceGroupName, name, prId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listStaticSiteBuildFunctionAppSettingsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listStaticSiteBuildFunctionAppSettingsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates or updates the function app settings of a static site. + * Description for Creates or updates the function app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings the StringDictionaryInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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 createOrUpdateStaticSiteFunctionAppSettings(String resourceGroupName, String name, StringDictionaryInner appSettings) { + return createOrUpdateStaticSiteFunctionAppSettingsWithServiceResponseAsync(resourceGroupName, name, appSettings).toBlocking().single().body(); + } + + /** + * Creates or updates the function app settings of a static site. + * Description for Creates or updates the function app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings the StringDictionaryInner value + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateStaticSiteFunctionAppSettingsAsync(String resourceGroupName, String name, StringDictionaryInner appSettings, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateStaticSiteFunctionAppSettingsWithServiceResponseAsync(resourceGroupName, name, appSettings), serviceCallback); + } + + /** + * Creates or updates the function app settings of a static site. + * Description for Creates or updates the function app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings the StringDictionaryInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable createOrUpdateStaticSiteFunctionAppSettingsAsync(String resourceGroupName, String name, StringDictionaryInner appSettings) { + return createOrUpdateStaticSiteFunctionAppSettingsWithServiceResponseAsync(resourceGroupName, name, appSettings).map(new Func1, StringDictionaryInner>() { + @Override + public StringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates the function app settings of a static site. + * Description for Creates or updates the function app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings the StringDictionaryInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable> createOrUpdateStaticSiteFunctionAppSettingsWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(appSettings); + return service.createOrUpdateStaticSiteFunctionAppSettings(resourceGroupName, name, this.client.subscriptionId(), appSettings, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateStaticSiteFunctionAppSettingsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateStaticSiteFunctionAppSettingsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates an invitation link for a user with the role. + * Description for Creates an invitation link for a user with the role. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteUserRolesInvitationEnvelope the StaticSiteUserInvitationRequestResource value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StaticSiteUserInvitationResponseResourceInner object if successful. + */ + public StaticSiteUserInvitationResponseResourceInner createUserRolesInvitationLink(String resourceGroupName, String name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope) { + return createUserRolesInvitationLinkWithServiceResponseAsync(resourceGroupName, name, staticSiteUserRolesInvitationEnvelope).toBlocking().single().body(); + } + + /** + * Creates an invitation link for a user with the role. + * Description for Creates an invitation link for a user with the role. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteUserRolesInvitationEnvelope the StaticSiteUserInvitationRequestResource value + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createUserRolesInvitationLinkAsync(String resourceGroupName, String name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createUserRolesInvitationLinkWithServiceResponseAsync(resourceGroupName, name, staticSiteUserRolesInvitationEnvelope), serviceCallback); + } + + /** + * Creates an invitation link for a user with the role. + * Description for Creates an invitation link for a user with the role. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteUserRolesInvitationEnvelope the StaticSiteUserInvitationRequestResource value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StaticSiteUserInvitationResponseResourceInner object + */ + public Observable createUserRolesInvitationLinkAsync(String resourceGroupName, String name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope) { + return createUserRolesInvitationLinkWithServiceResponseAsync(resourceGroupName, name, staticSiteUserRolesInvitationEnvelope).map(new Func1, StaticSiteUserInvitationResponseResourceInner>() { + @Override + public StaticSiteUserInvitationResponseResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates an invitation link for a user with the role. + * Description for Creates an invitation link for a user with the role. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteUserRolesInvitationEnvelope the StaticSiteUserInvitationRequestResource value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StaticSiteUserInvitationResponseResourceInner object + */ + public Observable> createUserRolesInvitationLinkWithServiceResponseAsync(String resourceGroupName, String name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope) { + if (resourceGroupName == null) { + throw new 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 (staticSiteUserRolesInvitationEnvelope == null) { + throw new IllegalArgumentException("Parameter staticSiteUserRolesInvitationEnvelope is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(staticSiteUserRolesInvitationEnvelope); + return service.createUserRolesInvitationLink(resourceGroupName, name, this.client.subscriptionId(), staticSiteUserRolesInvitationEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createUserRolesInvitationLinkDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createUserRolesInvitationLinkDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all static site custom domains for a particular static site. + * Description for Gets all static site custom domains for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StaticSiteCustomDomainOverviewARMResourceInner> object if successful. + */ + public PagedList listStaticSiteCustomDomains(final String resourceGroupName, final String name) { + ServiceResponse> response = listStaticSiteCustomDomainsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listStaticSiteCustomDomainsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all static site custom domains for a particular static site. + * Description for Gets all static site custom domains for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listStaticSiteCustomDomainsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listStaticSiteCustomDomainsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listStaticSiteCustomDomainsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all static site custom domains for a particular static site. + * Description for Gets all static site custom domains for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StaticSiteCustomDomainOverviewARMResourceInner> object + */ + public Observable> listStaticSiteCustomDomainsAsync(final String resourceGroupName, final String name) { + return listStaticSiteCustomDomainsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all static site custom domains for a particular static site. + * Description for Gets all static site custom domains for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StaticSiteCustomDomainOverviewARMResourceInner> object + */ + public Observable>> listStaticSiteCustomDomainsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listStaticSiteCustomDomainsSinglePageAsync(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(listStaticSiteCustomDomainsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all static site custom domains for a particular static site. + * Description for Gets all static site custom domains for a particular static site. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the static site resource to search in. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StaticSiteCustomDomainOverviewARMResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listStaticSiteCustomDomainsSinglePageAsync(final String resourceGroupName, final String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listStaticSiteCustomDomains(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listStaticSiteCustomDomainsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listStaticSiteCustomDomainsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a new static site custom domain in an existing resource group and static site. + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the StaticSiteCustomDomainOverviewARMResourceInner object if successful. + */ + public StaticSiteCustomDomainOverviewARMResourceInner createOrUpdateStaticSiteCustomDomain(String resourceGroupName, String name, String domainName) { + return createOrUpdateStaticSiteCustomDomainWithServiceResponseAsync(resourceGroupName, name, domainName).toBlocking().single().body(); + } + + /** + * Creates a new static site custom domain in an existing resource group and static site. + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateStaticSiteCustomDomainAsync(String resourceGroupName, String name, String domainName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateStaticSiteCustomDomainWithServiceResponseAsync(resourceGroupName, name, domainName), serviceCallback); + } + + /** + * Creates a new static site custom domain in an existing resource group and static site. + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StaticSiteCustomDomainOverviewARMResourceInner object + */ + public Observable createOrUpdateStaticSiteCustomDomainAsync(String resourceGroupName, String name, String domainName) { + return createOrUpdateStaticSiteCustomDomainWithServiceResponseAsync(resourceGroupName, name, domainName).map(new Func1, StaticSiteCustomDomainOverviewARMResourceInner>() { + @Override + public StaticSiteCustomDomainOverviewARMResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates a new static site custom domain in an existing resource group and static site. + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StaticSiteCustomDomainOverviewARMResourceInner object + */ + public Observable> createOrUpdateStaticSiteCustomDomainWithServiceResponseAsync(String resourceGroupName, String name, String domainName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.createOrUpdateStaticSiteCustomDomain(resourceGroupName, name, domainName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateStaticSiteCustomDomainDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateStaticSiteCustomDomainDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a custom domain. + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteStaticSiteCustomDomain(String resourceGroupName, String name, String domainName) { + deleteStaticSiteCustomDomainWithServiceResponseAsync(resourceGroupName, name, domainName).toBlocking().single().body(); + } + + /** + * Deletes a custom domain. + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain 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 deleteStaticSiteCustomDomainAsync(String resourceGroupName, String name, String domainName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteStaticSiteCustomDomainWithServiceResponseAsync(resourceGroupName, name, domainName), serviceCallback); + } + + /** + * Deletes a custom domain. + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteStaticSiteCustomDomainAsync(String resourceGroupName, String name, String domainName) { + return deleteStaticSiteCustomDomainWithServiceResponseAsync(resourceGroupName, name, domainName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a custom domain. + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteStaticSiteCustomDomainWithServiceResponseAsync(String resourceGroupName, String name, String domainName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteStaticSiteCustomDomain(resourceGroupName, name, domainName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteStaticSiteCustomDomainDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteStaticSiteCustomDomainDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Validates a particular custom domain can be added to a static site. + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void validateCustomDomainCanBeAddedToStaticSite(String resourceGroupName, String name, String domainName) { + validateCustomDomainCanBeAddedToStaticSiteWithServiceResponseAsync(resourceGroupName, name, domainName).toBlocking().single().body(); + } + + /** + * Validates a particular custom domain can be added to a static site. + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain 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 validateCustomDomainCanBeAddedToStaticSiteAsync(String resourceGroupName, String name, String domainName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(validateCustomDomainCanBeAddedToStaticSiteWithServiceResponseAsync(resourceGroupName, name, domainName), serviceCallback); + } + + /** + * Validates a particular custom domain can be added to a static site. + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable validateCustomDomainCanBeAddedToStaticSiteAsync(String resourceGroupName, String name, String domainName) { + return validateCustomDomainCanBeAddedToStaticSiteWithServiceResponseAsync(resourceGroupName, name, domainName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Validates a particular custom domain can be added to a static site. + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> validateCustomDomainCanBeAddedToStaticSiteWithServiceResponseAsync(String resourceGroupName, String name, String domainName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.validateCustomDomainCanBeAddedToStaticSite(resourceGroupName, name, domainName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = validateCustomDomainCanBeAddedToStaticSiteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse validateCustomDomainCanBeAddedToStaticSiteDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Detaches a static site. + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void detachStaticSite(String resourceGroupName, String name) { + detachStaticSiteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Detaches a static site. + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture detachStaticSiteAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(detachStaticSiteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Detaches a static site. + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable detachStaticSiteAsync(String resourceGroupName, String name) { + return detachStaticSiteWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Detaches a static site. + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> detachStaticSiteWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.detachStaticSite(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = detachStaticSiteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse detachStaticSiteDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the functions of a static site. + * Description for Gets the functions of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StaticSiteFunctionOverviewARMResourceInner> object if successful. + */ + public PagedList listStaticSiteFunctions(final String resourceGroupName, final String name) { + ServiceResponse> response = listStaticSiteFunctionsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listStaticSiteFunctionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the functions of a static site. + * Description for Gets the functions of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listStaticSiteFunctionsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listStaticSiteFunctionsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listStaticSiteFunctionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the functions of a static site. + * Description for Gets the functions of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StaticSiteFunctionOverviewARMResourceInner> object + */ + public Observable> listStaticSiteFunctionsAsync(final String resourceGroupName, final String name) { + return listStaticSiteFunctionsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the functions of a static site. + * Description for Gets the functions of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<StaticSiteFunctionOverviewARMResourceInner> object + */ + public Observable>> listStaticSiteFunctionsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listStaticSiteFunctionsSinglePageAsync(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(listStaticSiteFunctionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the functions of a static site. + * Description for Gets the functions of a static site. + * + ServiceResponse> * @param resourceGroupName Name of the resource group to which the resource belongs. + ServiceResponse> * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StaticSiteFunctionOverviewARMResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listStaticSiteFunctionsSinglePageAsync(final String resourceGroupName, final String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listStaticSiteFunctions(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listStaticSiteFunctionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listStaticSiteFunctionsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the application settings of a static site. + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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 listStaticSiteFunctionAppSettings(String resourceGroupName, String name) { + return listStaticSiteFunctionAppSettingsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the application settings of a static site. + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listStaticSiteFunctionAppSettingsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listStaticSiteFunctionAppSettingsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the application settings of a static site. + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable listStaticSiteFunctionAppSettingsAsync(String resourceGroupName, String name) { + return listStaticSiteFunctionAppSettingsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, StringDictionaryInner>() { + @Override + public StringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the application settings of a static site. + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable> listStaticSiteFunctionAppSettingsWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listStaticSiteFunctionAppSettings(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listStaticSiteFunctionAppSettingsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listStaticSiteFunctionAppSettingsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Lists the secrets for an existing static site. + * Description for Lists the secrets for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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 listStaticSiteSecrets(String resourceGroupName, String name) { + return listStaticSiteSecretsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Lists the secrets for an existing static site. + * Description for Lists the secrets for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listStaticSiteSecretsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listStaticSiteSecretsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Lists the secrets for an existing static site. + * Description for Lists the secrets for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable listStaticSiteSecretsAsync(String resourceGroupName, String name) { + return listStaticSiteSecretsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, StringDictionaryInner>() { + @Override + public StringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists the secrets for an existing static site. + * Description for Lists the secrets for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable> listStaticSiteSecretsWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listStaticSiteSecrets(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listStaticSiteSecretsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listStaticSiteSecretsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Resets the api key for an existing static site. + * Description for Resets the api key for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param resetPropertiesEnvelope the StaticSiteResetPropertiesARMResource value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void resetStaticSiteApiKey(String resourceGroupName, String name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope) { + resetStaticSiteApiKeyWithServiceResponseAsync(resourceGroupName, name, resetPropertiesEnvelope).toBlocking().single().body(); + } + + /** + * Resets the api key for an existing static site. + * Description for Resets the api key for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param resetPropertiesEnvelope the StaticSiteResetPropertiesARMResource value + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture resetStaticSiteApiKeyAsync(String resourceGroupName, String name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetStaticSiteApiKeyWithServiceResponseAsync(resourceGroupName, name, resetPropertiesEnvelope), serviceCallback); + } + + /** + * Resets the api key for an existing static site. + * Description for Resets the api key for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param resetPropertiesEnvelope the StaticSiteResetPropertiesARMResource value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable resetStaticSiteApiKeyAsync(String resourceGroupName, String name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope) { + return resetStaticSiteApiKeyWithServiceResponseAsync(resourceGroupName, name, resetPropertiesEnvelope).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resets the api key for an existing static site. + * Description for Resets the api key for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param resetPropertiesEnvelope the StaticSiteResetPropertiesARMResource value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> resetStaticSiteApiKeyWithServiceResponseAsync(String resourceGroupName, String name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope) { + if (resourceGroupName == null) { + throw new 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 (resetPropertiesEnvelope == null) { + throw new IllegalArgumentException("Parameter resetPropertiesEnvelope is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(resetPropertiesEnvelope); + return service.resetStaticSiteApiKey(resourceGroupName, name, this.client.subscriptionId(), resetPropertiesEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = resetStaticSiteApiKeyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse resetStaticSiteApiKeyDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all Static Sites for a subscription. + * Description for Get all Static Sites for a subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StaticSiteARMResourceInner> 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 Static Sites for a subscription. + * Description for Get all Static Sites 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 Static Sites for a subscription. + * Description for Get all Static Sites 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<StaticSiteARMResourceInner> 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 Static Sites for a subscription. + * Description for Get all Static Sites 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<StaticSiteARMResourceInner> 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 Static Sites for a subscription. + * Description for Get all Static Sites 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<StaticSiteARMResourceInner> 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all static sites in the specified resource group. + * Description for Gets all static sites 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StaticSiteARMResourceInner> 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 static sites in the specified resource group. + * Description for Gets all static sites 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 static sites in the specified resource group. + * Description for Gets all static sites 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<StaticSiteARMResourceInner> 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 static sites in the specified resource group. + * Description for Gets all static sites 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<StaticSiteARMResourceInner> 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 static sites in the specified resource group. + * Description for Gets all static sites 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<StaticSiteARMResourceInner> 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the list of users of a static site. + * Description for Gets the list of users of a static site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StaticSiteUserARMResourceInner> object if successful. + */ + public PagedList listStaticSiteUsersNext(final String nextPageLink) { + ServiceResponse> response = listStaticSiteUsersNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listStaticSiteUsersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the list of users of a static site. + * Description for Gets the list of users of a static 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> listStaticSiteUsersNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listStaticSiteUsersNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listStaticSiteUsersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the list of users of a static site. + * Description for Gets the list of users of a static 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<StaticSiteUserARMResourceInner> object + */ + public Observable> listStaticSiteUsersNextAsync(final String nextPageLink) { + return listStaticSiteUsersNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the list of users of a static site. + * Description for Gets the list of users of a static 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<StaticSiteUserARMResourceInner> object + */ + public Observable>> listStaticSiteUsersNextWithServiceResponseAsync(final String nextPageLink) { + return listStaticSiteUsersNextSinglePageAsync(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(listStaticSiteUsersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the list of users of a static site. + * Description for Gets the list of users of a static 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<StaticSiteUserARMResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listStaticSiteUsersNextSinglePageAsync(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.listStaticSiteUsersNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listStaticSiteUsersNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listStaticSiteUsersNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all static site builds for a particular static site. + * Description for Gets all static site builds for a particular static site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StaticSiteBuildARMResourceInner> object if successful. + */ + public PagedList getStaticSiteBuildsNext(final String nextPageLink) { + ServiceResponse> response = getStaticSiteBuildsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getStaticSiteBuildsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all static site builds for a particular static site. + * Description for Gets all static site builds for a particular static 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> getStaticSiteBuildsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getStaticSiteBuildsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getStaticSiteBuildsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all static site builds for a particular static site. + * Description for Gets all static site builds for a particular static 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<StaticSiteBuildARMResourceInner> object + */ + public Observable> getStaticSiteBuildsNextAsync(final String nextPageLink) { + return getStaticSiteBuildsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all static site builds for a particular static site. + * Description for Gets all static site builds for a particular static 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<StaticSiteBuildARMResourceInner> object + */ + public Observable>> getStaticSiteBuildsNextWithServiceResponseAsync(final String nextPageLink) { + return getStaticSiteBuildsNextSinglePageAsync(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(getStaticSiteBuildsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all static site builds for a particular static site. + * Description for Gets all static site builds for a particular static 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<StaticSiteBuildARMResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getStaticSiteBuildsNextSinglePageAsync(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.getStaticSiteBuildsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getStaticSiteBuildsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getStaticSiteBuildsNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the functions of a particular static site build. + * Description for Gets the functions of a particular static site build. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StaticSiteFunctionOverviewARMResourceInner> object if successful. + */ + public PagedList listStaticSiteBuildFunctionsNext(final String nextPageLink) { + ServiceResponse> response = listStaticSiteBuildFunctionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listStaticSiteBuildFunctionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the functions of a particular static site build. + * Description for Gets the functions of a particular static site build. + * + * @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> listStaticSiteBuildFunctionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listStaticSiteBuildFunctionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listStaticSiteBuildFunctionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the functions of a particular static site build. + * Description for Gets the functions of a particular static site build. + * + * @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<StaticSiteFunctionOverviewARMResourceInner> object + */ + public Observable> listStaticSiteBuildFunctionsNextAsync(final String nextPageLink) { + return listStaticSiteBuildFunctionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the functions of a particular static site build. + * Description for Gets the functions of a particular static site build. + * + * @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<StaticSiteFunctionOverviewARMResourceInner> object + */ + public Observable>> listStaticSiteBuildFunctionsNextWithServiceResponseAsync(final String nextPageLink) { + return listStaticSiteBuildFunctionsNextSinglePageAsync(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(listStaticSiteBuildFunctionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the functions of a particular static site build. + * Description for Gets the functions of a particular static site build. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<StaticSiteFunctionOverviewARMResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listStaticSiteBuildFunctionsNextSinglePageAsync(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.listStaticSiteBuildFunctionsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listStaticSiteBuildFunctionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listStaticSiteBuildFunctionsNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all static site custom domains for a particular static site. + * Description for Gets all static site custom domains for a particular static site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StaticSiteCustomDomainOverviewARMResourceInner> object if successful. + */ + public PagedList listStaticSiteCustomDomainsNext(final String nextPageLink) { + ServiceResponse> response = listStaticSiteCustomDomainsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listStaticSiteCustomDomainsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets all static site custom domains for a particular static site. + * Description for Gets all static site custom domains for a particular static 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> listStaticSiteCustomDomainsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listStaticSiteCustomDomainsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listStaticSiteCustomDomainsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets all static site custom domains for a particular static site. + * Description for Gets all static site custom domains for a particular static 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<StaticSiteCustomDomainOverviewARMResourceInner> object + */ + public Observable> listStaticSiteCustomDomainsNextAsync(final String nextPageLink) { + return listStaticSiteCustomDomainsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all static site custom domains for a particular static site. + * Description for Gets all static site custom domains for a particular static 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<StaticSiteCustomDomainOverviewARMResourceInner> object + */ + public Observable>> listStaticSiteCustomDomainsNextWithServiceResponseAsync(final String nextPageLink) { + return listStaticSiteCustomDomainsNextSinglePageAsync(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(listStaticSiteCustomDomainsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all static site custom domains for a particular static site. + * Description for Gets all static site custom domains for a particular static 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<StaticSiteCustomDomainOverviewARMResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listStaticSiteCustomDomainsNextSinglePageAsync(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.listStaticSiteCustomDomainsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listStaticSiteCustomDomainsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listStaticSiteCustomDomainsNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the functions of a static site. + * Description for Gets the functions of a static site. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<StaticSiteFunctionOverviewARMResourceInner> object if successful. + */ + public PagedList listStaticSiteFunctionsNext(final String nextPageLink) { + ServiceResponse> response = listStaticSiteFunctionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listStaticSiteFunctionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the functions of a static site. + * Description for Gets the functions of a static 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> listStaticSiteFunctionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listStaticSiteFunctionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listStaticSiteFunctionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the functions of a static site. + * Description for Gets the functions of a static 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<StaticSiteFunctionOverviewARMResourceInner> object + */ + public Observable> listStaticSiteFunctionsNextAsync(final String nextPageLink) { + return listStaticSiteFunctionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the functions of a static site. + * Description for Gets the functions of a static 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<StaticSiteFunctionOverviewARMResourceInner> object + */ + public Observable>> listStaticSiteFunctionsNextWithServiceResponseAsync(final String nextPageLink) { + return listStaticSiteFunctionsNextSinglePageAsync(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(listStaticSiteFunctionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the functions of a static site. + * Description for Gets the functions of a static 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<StaticSiteFunctionOverviewARMResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listStaticSiteFunctionsNextSinglePageAsync(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.listStaticSiteFunctionsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listStaticSiteFunctionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listStaticSiteFunctionsNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StorageMigrationResponseImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StorageMigrationResponseImpl.java new file mode 100644 index 0000000000000..e1d6e4e08affd --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StorageMigrationResponseImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.StorageMigrationResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class StorageMigrationResponseImpl extends WrapperImpl implements StorageMigrationResponse { + private final CertificateRegistrationManager manager; + StorageMigrationResponseImpl(StorageMigrationResponseInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String operationId() { + return this.inner().operationId(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StorageMigrationResponseInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StorageMigrationResponseInner.java new file mode 100644 index 0000000000000..ef9b8bb5460ce --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 when server starts the migration process, it will return an operation ID identifying that particular migration operation. + * + * @return the operationId value + */ + public String operationId() { + return this.operationId; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StringDictionaryImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StringDictionaryImpl.java new file mode 100644 index 0000000000000..8bb6829b50666 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StringDictionaryImpl.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.StringDictionary; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.Map; + +class StringDictionaryImpl extends WrapperImpl implements StringDictionary { + private final CertificateRegistrationManager manager; + StringDictionaryImpl(StringDictionaryInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Map properties() { + return this.inner().properties(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StringDictionaryInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/StringDictionaryInner.java new file mode 100644 index 0000000000000..78f78c9b6bf2f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * String dictionary resource. + */ +public class StringDictionaryInner extends ProxyOnlyResource { + /** + * Settings. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get settings. + * + * @return the properties value + */ + public Map properties() { + return this.properties; + } + + /** + * Set settings. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SwiftVirtualNetworkImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SwiftVirtualNetworkImpl.java new file mode 100644 index 0000000000000..059e211dc8ec0 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SwiftVirtualNetworkImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SwiftVirtualNetwork; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class SwiftVirtualNetworkImpl extends WrapperImpl implements SwiftVirtualNetwork { + private final CertificateRegistrationManager manager; + SwiftVirtualNetworkImpl(SwiftVirtualNetworkInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String subnetResourceId() { + return this.inner().subnetResourceId(); + } + + @Override + public Boolean swiftSupported() { + return this.inner().swiftSupported(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SwiftVirtualNetworkInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SwiftVirtualNetworkInner.java new file mode 100644 index 0000000000000..ff18b1fa4e32d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/SwiftVirtualNetworkInner.java @@ -0,0 +1,76 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Swift Virtual Network Contract. This is used to enable the new Swift way of + * doing virtual network integration. + */ +@JsonFlatten +public class SwiftVirtualNetworkInner extends ProxyOnlyResource { + /** + * The Virtual Network subnet's resource ID. This is the subnet that this + * Web App will join. This subnet must have a delegation to + * Microsoft.Web/serverFarms defined first. + */ + @JsonProperty(value = "properties.subnetResourceId") + private String subnetResourceId; + + /** + * A flag that specifies if the scale unit this Web App is on supports + * Swift integration. + */ + @JsonProperty(value = "properties.swiftSupported") + private Boolean swiftSupported; + + /** + * Get the Virtual Network subnet's resource ID. This is the subnet that this Web App will join. This subnet must have a delegation to Microsoft.Web/serverFarms defined first. + * + * @return the subnetResourceId value + */ + public String subnetResourceId() { + return this.subnetResourceId; + } + + /** + * Set the Virtual Network subnet's resource ID. This is the subnet that this Web App will join. This subnet must have a delegation to Microsoft.Web/serverFarms defined first. + * + * @param subnetResourceId the subnetResourceId value to set + * @return the SwiftVirtualNetworkInner object itself. + */ + public SwiftVirtualNetworkInner withSubnetResourceId(String subnetResourceId) { + this.subnetResourceId = subnetResourceId; + return this; + } + + /** + * Get a flag that specifies if the scale unit this Web App is on supports Swift integration. + * + * @return the swiftSupported value + */ + public Boolean swiftSupported() { + return this.swiftSupported; + } + + /** + * Set a flag that specifies if the scale unit this Web App is on supports Swift integration. + * + * @param swiftSupported the swiftSupported value to set + * @return the SwiftVirtualNetworkInner object itself. + */ + public SwiftVirtualNetworkInner withSwiftSupported(Boolean swiftSupported) { + this.swiftSupported = swiftSupported; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TldLegalAgreementImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TldLegalAgreementImpl.java new file mode 100644 index 0000000000000..72a81ee33b75a --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TldLegalAgreementImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.TldLegalAgreement; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class TldLegalAgreementImpl extends WrapperImpl implements TldLegalAgreement { + private final CertificateRegistrationManager manager; + TldLegalAgreementImpl(TldLegalAgreementInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String agreementKey() { + return this.inner().agreementKey(); + } + + @Override + public String content() { + return this.inner().content(); + } + + @Override + public String title() { + return this.inner().title(); + } + + @Override + public String url() { + return this.inner().url(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TldLegalAgreementInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TldLegalAgreementInner.java new file mode 100644 index 0000000000000..ef8beb4e8460f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.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 unique identifier for the agreement. + * + * @return the agreementKey value + */ + public String agreementKey() { + return this.agreementKey; + } + + /** + * Set unique identifier for the agreement. + * + * @param agreementKey the agreementKey value to set + * @return the TldLegalAgreementInner object itself. + */ + public TldLegalAgreementInner withAgreementKey(String agreementKey) { + this.agreementKey = agreementKey; + return this; + } + + /** + * Get agreement title. + * + * @return the title value + */ + public String title() { + return this.title; + } + + /** + * Set agreement title. + * + * @param title the title value to set + * @return the TldLegalAgreementInner object itself. + */ + public TldLegalAgreementInner withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get agreement details. + * + * @return the content value + */ + public String content() { + return this.content; + } + + /** + * Set agreement details. + * + * @param content the content value to set + * @return the TldLegalAgreementInner object itself. + */ + public TldLegalAgreementInner withContent(String content) { + this.content = content; + return this; + } + + /** + * Get uRL where a copy of the agreement details is hosted. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Set uRL where a copy of the agreement details is hosted. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TopLevelDomainImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TopLevelDomainImpl.java new file mode 100644 index 0000000000000..9bfe2c9e36d9b --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TopLevelDomainImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.TopLevelDomain; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; + +class TopLevelDomainImpl extends IndexableRefreshableWrapperImpl implements TopLevelDomain { + private String name; + private final CertificateRegistrationManager manager; + + TopLevelDomainImpl(TopLevelDomainInner inner, CertificateRegistrationManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "topLevelDomains"); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + TopLevelDomainsInner client = this.manager().inner().topLevelDomains(); + return client.getAsync(this.name); + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Boolean privacy() { + return this.inner().privacy(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TopLevelDomainInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TopLevelDomainInner.java new file mode 100644 index 0000000000000..9235c5d26ac43 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TopLevelDomainInner.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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * A top level domain object. + */ +@JsonFlatten +public class TopLevelDomainInner extends ProxyOnlyResource { + /** + * If <code>true</code>, then the top level domain supports + * domain privacy; otherwise, <code>false</code>. + */ + @JsonProperty(value = "properties.privacy") + private Boolean privacy; + + /** + * Get if <code>true</code>, then the top level domain supports domain privacy; otherwise, <code>false</code>. + * + * @return the privacy value + */ + public Boolean privacy() { + return this.privacy; + } + + /** + * Set if <code>true</code>, then the top level domain supports domain privacy; otherwise, <code>false</code>. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TopLevelDomainsImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TopLevelDomainsImpl.java new file mode 100644 index 0000000000000..54cada79e02ea --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TopLevelDomainsImpl.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. + * jkl + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.TopLevelDomains; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.appservice.v2019_08_01.TopLevelDomain; +import com.microsoft.azure.management.appservice.v2019_08_01.TldLegalAgreement; +import com.microsoft.azure.management.appservice.v2019_08_01.TopLevelDomainAgreementOption; +import com.microsoft.azure.arm.utils.PagedListConverter; + +class TopLevelDomainsImpl extends WrapperImpl implements TopLevelDomains { + private PagedListConverter converter; + private final CertificateRegistrationManager manager; + + TopLevelDomainsImpl(CertificateRegistrationManager manager) { + super(manager.inner().topLevelDomains()); + this.manager = manager; + this.converter = new PagedListConverter() { + @Override + public Observable typeConvertAsync(TopLevelDomainInner inner) { + return Observable.just((TopLevelDomain) wrapModel(inner)); + } + }; + } + + public CertificateRegistrationManager manager() { + return this.manager; + } + + private TopLevelDomainImpl wrapModel(TopLevelDomainInner inner) { + return new TopLevelDomainImpl(inner, manager()); + } + + @Override + public Observable getAsync(String name) { + TopLevelDomainsInner client = this.inner(); + return client.getAsync(name) + .map(new Func1() { + @Override + public TopLevelDomain call(TopLevelDomainInner inner) { + return new TopLevelDomainImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAgreementsAsync(final String name, final TopLevelDomainAgreementOption agreementOption) { + TopLevelDomainsInner client = this.inner(); + return client.listAgreementsAsync(name, agreementOption) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public TldLegalAgreement call(TldLegalAgreementInner inner) { + return new TldLegalAgreementImpl(inner, manager()); + } + }); + } + + @Override + public PagedList list() { + TopLevelDomainsInner client = this.inner(); + return converter.convert(client.list()); + } + + @Override + public Observable listAsync() { + TopLevelDomainsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public TopLevelDomain call(TopLevelDomainInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TopLevelDomainsInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TopLevelDomainsInner.java new file mode 100644 index 0000000000000..43aca0544fc10 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TopLevelDomainsInner.java @@ -0,0 +1,642 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.appservice.v2019_08_01.DefaultErrorResponseException; +import com.microsoft.azure.management.appservice.v2019_08_01.TopLevelDomainAgreementOption; +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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.TopLevelDomains listAgreements" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements") + Observable> listAgreements(@Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body TopLevelDomainAgreementOption 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.appservice.v2019_08_01.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.appservice.v2019_08_01.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. + * Description for Get all top-level domains supported for registration. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get details of a top-level domain. + * Description for Get details of a top-level domain. + * + * @param name Name of the top-level domain. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all legal agreements that user needs to accept before purchasing a domain. + * Description for 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 DefaultErrorResponseException thrown 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 TopLevelDomainAgreementOption 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. + * Description for 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 TopLevelDomainAgreementOption 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. + * Description for 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 TopLevelDomainAgreementOption 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. + * Description for 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 TopLevelDomainAgreementOption 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. + * Description for 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 TopLevelDomainAgreementOption 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(agreementOption); + return service.listAgreements(name, this.client.subscriptionId(), agreementOption, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all top-level domains supported for registration. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all legal agreements that user needs to accept before purchasing a domain. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TriggeredJobHistoryImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TriggeredJobHistoryImpl.java new file mode 100644 index 0000000000000..3ac0ee517ab3c --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TriggeredJobHistoryImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.TriggeredJobHistory; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.TriggeredJobRun; + +class TriggeredJobHistoryImpl extends WrapperImpl implements TriggeredJobHistory { + private final CertificateRegistrationManager manager; + TriggeredJobHistoryImpl(TriggeredJobHistoryInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List runs() { + return this.inner().runs(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TriggeredJobHistoryInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TriggeredJobHistoryInner.java new file mode 100644 index 0000000000000..f715e0425f6be --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.TriggeredJobRun; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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.runs") + private List runs; + + /** + * Get list of triggered web job runs. + * + * @return the runs value + */ + public List runs() { + return this.runs; + } + + /** + * Set list of triggered web job runs. + * + * @param runs the runs value to set + * @return the TriggeredJobHistoryInner object itself. + */ + public TriggeredJobHistoryInner withRuns(List runs) { + this.runs = runs; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TriggeredWebJobImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TriggeredWebJobImpl.java new file mode 100644 index 0000000000000..56b7361e05821 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TriggeredWebJobImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.TriggeredWebJob; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.TriggeredJobRun; +import java.util.Map; +import com.microsoft.azure.management.appservice.v2019_08_01.WebJobType; + +class TriggeredWebJobImpl extends IndexableRefreshableWrapperImpl implements TriggeredWebJob { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String webJobName; + private String slot; + + TriggeredWebJobImpl(TriggeredWebJobInner inner, CertificateRegistrationManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.webJobName = IdParsingUtils.getValueFromIdByName(inner.id(), "triggeredwebjobs"); + this.slot = IdParsingUtils.getValueFromIdByName(inner.id(), "slots"); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getTriggeredWebJobSlotAsync(this.resourceGroupName, this.name, this.webJobName, this.slot); + } + + + + @Override + public String error() { + return this.inner().error(); + } + + @Override + public String extraInfoUrl() { + return this.inner().extraInfoUrl(); + } + + @Override + public String historyUrl() { + return this.inner().historyUrl(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public TriggeredJobRun latestRun() { + return this.inner().latestRun(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String runCommand() { + return this.inner().runCommand(); + } + + @Override + public String schedulerLogsUrl() { + return this.inner().schedulerLogsUrl(); + } + + @Override + public Map settings() { + return this.inner().settings(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String url() { + return this.inner().url(); + } + + @Override + public Boolean usingSdk() { + return this.inner().usingSdk(); + } + + @Override + public WebJobType webJobType() { + return this.inner().webJobType(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TriggeredWebJobInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TriggeredWebJobInner.java new file mode 100644 index 0000000000000..69a172a2f16fa --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/TriggeredWebJobInner.java @@ -0,0 +1,283 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.TriggeredJobRun; +import com.microsoft.azure.management.appservice.v2019_08_01.WebJobType; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Triggered Web Job Information. + */ +@JsonFlatten +public class TriggeredWebJobInner extends ProxyOnlyResource { + /** + * Latest job run information. + */ + @JsonProperty(value = "properties.latest_run") + private TriggeredJobRun latestRun; + + /** + * History URL. + */ + @JsonProperty(value = "properties.history_url") + private String historyUrl; + + /** + * Scheduler Logs URL. + */ + @JsonProperty(value = "properties.scheduler_logs_url") + private String schedulerLogsUrl; + + /** + * Run command. + */ + @JsonProperty(value = "properties.run_command") + private String runCommand; + + /** + * Job URL. + */ + @JsonProperty(value = "properties.url") + private String url; + + /** + * Extra Info URL. + */ + @JsonProperty(value = "properties.extra_info_url") + private String extraInfoUrl; + + /** + * Job type. Possible values include: 'Continuous', 'Triggered'. + */ + @JsonProperty(value = "properties.web_job_type") + private WebJobType webJobType; + + /** + * Error information. + */ + @JsonProperty(value = "properties.error") + private String error; + + /** + * Using SDK?. + */ + @JsonProperty(value = "properties.using_sdk") + private Boolean usingSdk; + + /** + * Job settings. + */ + @JsonProperty(value = "properties.settings") + private Map settings; + + /** + * Get latest job run information. + * + * @return the latestRun value + */ + public TriggeredJobRun latestRun() { + return this.latestRun; + } + + /** + * Set latest job run information. + * + * @param latestRun the latestRun value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withLatestRun(TriggeredJobRun latestRun) { + this.latestRun = latestRun; + return this; + } + + /** + * Get history URL. + * + * @return the historyUrl value + */ + public String historyUrl() { + return this.historyUrl; + } + + /** + * Set history URL. + * + * @param historyUrl the historyUrl value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withHistoryUrl(String historyUrl) { + this.historyUrl = historyUrl; + return this; + } + + /** + * Get scheduler Logs URL. + * + * @return the schedulerLogsUrl value + */ + public String schedulerLogsUrl() { + return this.schedulerLogsUrl; + } + + /** + * Set scheduler Logs URL. + * + * @param schedulerLogsUrl the schedulerLogsUrl value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withSchedulerLogsUrl(String schedulerLogsUrl) { + this.schedulerLogsUrl = schedulerLogsUrl; + return this; + } + + /** + * Get run command. + * + * @return the runCommand value + */ + public String runCommand() { + return this.runCommand; + } + + /** + * Set run command. + * + * @param runCommand the runCommand value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withRunCommand(String runCommand) { + this.runCommand = runCommand; + return this; + } + + /** + * Get job URL. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Set job URL. + * + * @param url the url value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get extra Info URL. + * + * @return the extraInfoUrl value + */ + public String extraInfoUrl() { + return this.extraInfoUrl; + } + + /** + * Set extra Info URL. + * + * @param extraInfoUrl the extraInfoUrl value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withExtraInfoUrl(String extraInfoUrl) { + this.extraInfoUrl = extraInfoUrl; + return this; + } + + /** + * Get job type. Possible values include: 'Continuous', 'Triggered'. + * + * @return the webJobType value + */ + public WebJobType webJobType() { + return this.webJobType; + } + + /** + * Set job type. Possible values include: 'Continuous', 'Triggered'. + * + * @param webJobType the webJobType value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withWebJobType(WebJobType webJobType) { + this.webJobType = webJobType; + return this; + } + + /** + * Get error information. + * + * @return the error value + */ + public String error() { + return this.error; + } + + /** + * Set error information. + * + * @param error the error value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withError(String error) { + this.error = error; + return this; + } + + /** + * Get using SDK?. + * + * @return the usingSdk value + */ + public Boolean usingSdk() { + return this.usingSdk; + } + + /** + * Set using SDK?. + * + * @param usingSdk the usingSdk value to set + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withUsingSdk(Boolean usingSdk) { + this.usingSdk = usingSdk; + return this; + } + + /** + * Get job settings. + * + * @return the settings value + */ + public Map settings() { + return this.settings; + } + + /** + * Set job settings. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/UsageImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/UsageImpl.java new file mode 100644 index 0000000000000..54028cba17b48 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/UsageImpl.java @@ -0,0 +1,88 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.Usage; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.ComputeModeOptions; +import org.joda.time.DateTime; + +class UsageImpl extends WrapperImpl implements Usage { + private final CertificateRegistrationManager manager; + UsageImpl(UsageInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public ComputeModeOptions computeMode() { + return this.inner().computeMode(); + } + + @Override + public Long currentValue() { + return this.inner().currentValue(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public Long limit() { + return this.inner().limit(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public DateTime nextResetTime() { + return this.inner().nextResetTime(); + } + + @Override + public String resourceName() { + return this.inner().resourceName(); + } + + @Override + public String siteMode() { + return this.inner().siteMode(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String unit() { + return this.inner().unit(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/UsageInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/UsageInner.java new file mode 100644 index 0000000000000..319e826149d6e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/UsageInner.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.appservice.v2019_08_01.ComputeModeOptions; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 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 friendly name shown in the UI. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Get name of the quota resource. + * + * @return the resourceName value + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Get units of measurement for the quota resource. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Get the current value of the resource counter. + * + * @return the currentValue value + */ + public Long currentValue() { + return this.currentValue; + } + + /** + * Get the resource limit. + * + * @return the limit value + */ + public Long limit() { + return this.limit; + } + + /** + * Get next reset time for the resource counter. + * + * @return the nextResetTime value + */ + public DateTime nextResetTime() { + return this.nextResetTime; + } + + /** + * Get compute mode used for this usage. Possible values include: 'Shared', 'Dedicated', 'Dynamic'. + * + * @return the computeMode value + */ + public ComputeModeOptions computeMode() { + return this.computeMode; + } + + /** + * Get site mode used for this usage. + * + * @return the siteMode value + */ + public String siteMode() { + return this.siteMode; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/UserImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/UserImpl.java new file mode 100644 index 0000000000000..45abf7967ac7f --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/UserImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.User; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class UserImpl extends WrapperImpl implements User { + private final CertificateRegistrationManager manager; + UserImpl(UserInner inner, CertificateRegistrationManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String publishingPassword() { + return this.inner().publishingPassword(); + } + + @Override + public String publishingPasswordHash() { + return this.inner().publishingPasswordHash(); + } + + @Override + public String publishingPasswordHashSalt() { + return this.inner().publishingPasswordHashSalt(); + } + + @Override + public String publishingUserName() { + return this.inner().publishingUserName(); + } + + @Override + public String scmUri() { + return this.inner().scmUri(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/UserInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/UserInner.java new file mode 100644 index 0000000000000..a445ce551b4d7 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * User credentials used for publishing activity. + */ +@JsonFlatten +public class UserInner extends ProxyOnlyResource { + /** + * 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; + + /** + * Url of SCM site. + */ + @JsonProperty(value = "properties.scmUri") + private String scmUri; + + /** + * Get username used for publishing. + * + * @return the publishingUserName value + */ + public String publishingUserName() { + return this.publishingUserName; + } + + /** + * Set username used for publishing. + * + * @param publishingUserName the publishingUserName value to set + * @return the UserInner object itself. + */ + public UserInner withPublishingUserName(String publishingUserName) { + this.publishingUserName = publishingUserName; + return this; + } + + /** + * Get password used for publishing. + * + * @return the publishingPassword value + */ + public String publishingPassword() { + return this.publishingPassword; + } + + /** + * Set password used for publishing. + * + * @param publishingPassword the publishingPassword value to set + * @return the UserInner object itself. + */ + public UserInner withPublishingPassword(String publishingPassword) { + this.publishingPassword = publishingPassword; + return this; + } + + /** + * Get password hash used for publishing. + * + * @return the publishingPasswordHash value + */ + public String publishingPasswordHash() { + return this.publishingPasswordHash; + } + + /** + * Set password hash used for publishing. + * + * @param publishingPasswordHash the publishingPasswordHash value to set + * @return the UserInner object itself. + */ + public UserInner withPublishingPasswordHash(String publishingPasswordHash) { + this.publishingPasswordHash = publishingPasswordHash; + return this; + } + + /** + * Get password hash salt used for publishing. + * + * @return the publishingPasswordHashSalt value + */ + public String publishingPasswordHashSalt() { + return this.publishingPasswordHashSalt; + } + + /** + * Set password hash salt used for publishing. + * + * @param publishingPasswordHashSalt the publishingPasswordHashSalt value to set + * @return the UserInner object itself. + */ + public UserInner withPublishingPasswordHashSalt(String publishingPasswordHashSalt) { + this.publishingPasswordHashSalt = publishingPasswordHashSalt; + return this; + } + + /** + * Get url of SCM site. + * + * @return the scmUri value + */ + public String scmUri() { + return this.scmUri; + } + + /** + * Set url of SCM site. + * + * @param scmUri the scmUri value to set + * @return the UserInner object itself. + */ + public UserInner withScmUri(String scmUri) { + this.scmUri = scmUri; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ValidateResponseInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/ValidateResponseInner.java new file mode 100644 index 0000000000000..8da9ea5ec74d1 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.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 result of validation. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set result of validation. + * + * @param status the status value to set + * @return the ValidateResponseInner object itself. + */ + public ValidateResponseInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get error details for the case when validation fails. + * + * @return the error value + */ + public ValidateResponseError error() { + return this.error; + } + + /** + * Set error details for the case when validation fails. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/VnetGatewayInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/VnetGatewayInner.java new file mode 100644 index 0000000000000..0d847b6904b81 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 Virtual Network name. + * + * @return the vnetName value + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set the Virtual Network name. + * + * @param vnetName the vnetName value to set + * @return the VnetGatewayInner object itself. + */ + public VnetGatewayInner withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get the URI where the VPN package can be downloaded. + * + * @return the vpnPackageUri value + */ + public String vpnPackageUri() { + return this.vpnPackageUri; + } + + /** + * Set the URI where the VPN package can be downloaded. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/VnetInfoInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/VnetInfoInner.java new file mode 100644 index 0000000000000..425270c441766 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/VnetInfoInner.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 String 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; + + /** + * Flag that is used to denote if this is VNET injection. + */ + @JsonProperty(value = "properties.isSwift") + private Boolean isSwift; + + /** + * Get the Virtual Network's resource ID. + * + * @return the vnetResourceId value + */ + public String vnetResourceId() { + return this.vnetResourceId; + } + + /** + * Set the Virtual Network's resource ID. + * + * @param vnetResourceId the vnetResourceId value to set + * @return the VnetInfoInner object itself. + */ + public VnetInfoInner withVnetResourceId(String vnetResourceId) { + this.vnetResourceId = vnetResourceId; + return this; + } + + /** + * Get the client certificate thumbprint. + * + * @return the certThumbprint value + */ + public String certThumbprint() { + return this.certThumbprint; + } + + /** + * Get a certificate file (.cer) blob containing the public key of the private key used to authenticate a + Point-To-Site VPN connection. + * + * @return the certBlob value + */ + public String certBlob() { + return this.certBlob; + } + + /** + * Set a certificate file (.cer) blob containing the public key of the private key used to authenticate a + Point-To-Site VPN connection. + * + * @param certBlob the certBlob value to set + * @return the VnetInfoInner object itself. + */ + public VnetInfoInner withCertBlob(String certBlob) { + this.certBlob = certBlob; + return this; + } + + /** + * Get the routes that this Virtual Network connection uses. + * + * @return the routes value + */ + public List routes() { + return this.routes; + } + + /** + * Get <code>true</code> if a resync is required; otherwise, <code>false</code>. + * + * @return the resyncRequired value + */ + public Boolean resyncRequired() { + return this.resyncRequired; + } + + /** + * Get dNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses. + * + * @return the dnsServers value + */ + public String dnsServers() { + return this.dnsServers; + } + + /** + * Set dNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses. + * + * @param dnsServers the dnsServers value to set + * @return the VnetInfoInner object itself. + */ + public VnetInfoInner withDnsServers(String dnsServers) { + this.dnsServers = dnsServers; + return this; + } + + /** + * Get flag that is used to denote if this is VNET injection. + * + * @return the isSwift value + */ + public Boolean isSwift() { + return this.isSwift; + } + + /** + * Set flag that is used to denote if this is VNET injection. + * + * @param isSwift the isSwift value to set + * @return the VnetInfoInner object itself. + */ + public VnetInfoInner withIsSwift(Boolean isSwift) { + this.isSwift = isSwift; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/VnetRouteImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/VnetRouteImpl.java new file mode 100644 index 0000000000000..466345f5f5b8e --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/VnetRouteImpl.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.VnetRoute; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.RouteType; + +class VnetRouteImpl extends CreatableUpdatableImpl implements VnetRoute, VnetRoute.Definition, VnetRoute.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String vnetName; + private String routeName; + + VnetRouteImpl(String name, CertificateRegistrationManager manager) { + super(name, new VnetRouteInner()); + this.manager = manager; + // Set resource name + this.routeName = name; + // + } + + VnetRouteImpl(VnetRouteInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.routeName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "serverfarms"); + this.vnetName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualNetworkConnections"); + this.routeName = IdParsingUtils.getValueFromIdByName(inner.id(), "routes"); + // + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + AppServicePlansInner client = this.manager().inner().appServicePlans(); + return client.createOrUpdateVnetRouteAsync(this.resourceGroupName, this.name, this.vnetName, this.routeName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + AppServicePlansInner client = this.manager().inner().appServicePlans(); + return client.updateVnetRouteAsync(this.resourceGroupName, this.name, this.vnetName, this.routeName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + AppServicePlansInner client = this.manager().inner().appServicePlans(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String endAddress() { + return this.inner().endAddress(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public RouteType routeType() { + return this.inner().routeType(); + } + + @Override + public String startAddress() { + return this.inner().startAddress(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public VnetRouteImpl withExistingVirtualNetworkConnection(String resourceGroupName, String name, String vnetName) { + this.resourceGroupName = resourceGroupName; + this.name = name; + this.vnetName = vnetName; + return this; + } + + @Override + public VnetRouteImpl withEndAddress(String endAddress) { + this.inner().withEndAddress(endAddress); + return this; + } + + @Override + public VnetRouteImpl withKind(String kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public VnetRouteImpl withRouteType(RouteType routeType) { + this.inner().withRouteType(routeType); + return this; + } + + @Override + public VnetRouteImpl withStartAddress(String startAddress) { + this.inner().withStartAddress(startAddress); + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/VnetRouteInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/VnetRouteInner.java new file mode 100644 index 0000000000000..7461ee08c37e2 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/VnetRouteInner.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.RouteType; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Virtual Network route contract used to pass routing information for a + * Virtual Network. + */ +@JsonFlatten +public class VnetRouteInner extends ProxyOnlyResource { + /** + * 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 starting address for this route. This may also include a CIDR notation, in which case the end address must not be specified. + * + * @return the startAddress value + */ + public String startAddress() { + return this.startAddress; + } + + /** + * Set the starting address for this route. This may also include a CIDR notation, in which case the end address must not be specified. + * + * @param startAddress the startAddress value to set + * @return the VnetRouteInner object itself. + */ + public VnetRouteInner withStartAddress(String startAddress) { + this.startAddress = startAddress; + return this; + } + + /** + * Get the ending address for this route. If the start address is specified in CIDR notation, this must be omitted. + * + * @return the endAddress value + */ + public String endAddress() { + return this.endAddress; + } + + /** + * Set the ending address for this route. If the start address is specified in CIDR notation, this must be omitted. + * + * @param endAddress the endAddress value to set + * @return the VnetRouteInner object itself. + */ + public VnetRouteInner withEndAddress(String endAddress) { + this.endAddress = endAddress; + return this; + } + + /** + * Get 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'. + * + * @return the routeType value + */ + public RouteType routeType() { + return this.routeType; + } + + /** + * Set 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'. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/VnetValidationFailureDetailsInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/VnetValidationFailureDetailsInner.java new file mode 100644 index 0000000000000..f43dcc9d66330 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.VnetValidationTestFailure; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 a flag describing whether or not validation failed. + * + * @return the failed value + */ + public Boolean failed() { + return this.failed; + } + + /** + * Set a flag describing whether or not validation failed. + * + * @param failed the failed value to set + * @return the VnetValidationFailureDetailsInner object itself. + */ + public VnetValidationFailureDetailsInner withFailed(Boolean failed) { + this.failed = failed; + return this; + } + + /** + * Get a list of tests that failed in the validation. + * + * @return the failedTests value + */ + public List failedTests() { + return this.failedTests; + } + + /** + * Set a list of tests that failed in the validation. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebAppsImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebAppsImpl.java new file mode 100644 index 0000000000000..4404501814ea7 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebAppsImpl.java @@ -0,0 +1,4613 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.appservice.v2019_08_01.WebApps; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.appservice.v2019_08_01.Sites; +import com.microsoft.azure.Page; +import rx.Completable; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.CustomHostnameAnalysisResult; +import com.microsoft.azure.management.appservice.v2019_08_01.BackupItem; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteConfigResource; +import com.microsoft.azure.management.appservice.v2019_08_01.BackupRequest; +import com.microsoft.azure.management.appservice.v2019_08_01.StringDictionary; +import com.microsoft.azure.management.appservice.v2019_08_01.RestoreRequest; +import com.microsoft.azure.management.appservice.v2019_08_01.HostKeys; +import com.microsoft.azure.management.appservice.v2019_08_01.KeyInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.RelayServiceConnectionEntity; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteCloneability; +import com.microsoft.azure.management.appservice.v2019_08_01.FunctionSecrets; +import com.microsoft.azure.management.appservice.v2019_08_01.StorageMigrationResponse; +import com.microsoft.azure.management.appservice.v2019_08_01.Operation; +import com.microsoft.azure.management.appservice.v2019_08_01.SwiftVirtualNetwork; +import com.microsoft.azure.management.appservice.v2019_08_01.NetworkTrace; +import com.microsoft.azure.management.appservice.v2019_08_01.SitePhpErrorLogFlag; +import com.microsoft.azure.management.appservice.v2019_08_01.SlotDifference; +import com.microsoft.azure.management.appservice.v2019_08_01.Snapshot; +import com.microsoft.azure.management.appservice.v2019_08_01.CsmSlotEntity; +import com.microsoft.azure.management.appservice.v2019_08_01.StorageMigrationOptions; +import com.microsoft.azure.management.appservice.v2019_08_01.MigrateMySqlRequest; +import com.microsoft.azure.management.appservice.v2019_08_01.CsmPublishingProfileOptions; +import com.microsoft.azure.management.appservice.v2019_08_01.DeletedAppRestoreRequest; +import com.microsoft.azure.management.appservice.v2019_08_01.SnapshotRestoreRequest; +import com.microsoft.azure.management.appservice.v2019_08_01.CsmCopySlotEntity; +import com.microsoft.azure.management.appservice.v2019_08_01.CsmPublishingCredentialsPoliciesCollection; +import com.microsoft.azure.management.appservice.v2019_08_01.CsmPublishingCredentialsPoliciesEntity; +import com.microsoft.azure.management.appservice.v2019_08_01.KeyVaultReferenceCollection; +import com.microsoft.azure.management.appservice.v2019_08_01.KeyVaultReferenceResource; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteAuthSettings; +import com.microsoft.azure.management.appservice.v2019_08_01.AzureStoragePropertyDictionaryResource; +import com.microsoft.azure.management.appservice.v2019_08_01.ConnectionStringDictionary; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteLogsConfig; +import com.microsoft.azure.management.appservice.v2019_08_01.User; +import com.microsoft.azure.management.appservice.v2019_08_01.PushSettings; +import com.microsoft.azure.management.appservice.v2019_08_01.SlotConfigNamesResource; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteConfigurationSnapshotInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.ContinuousWebJob; +import com.microsoft.azure.management.appservice.v2019_08_01.Deployment; +import com.microsoft.azure.management.appservice.v2019_08_01.Identifier; +import com.microsoft.azure.management.appservice.v2019_08_01.MSDeployStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.MSDeployLog; +import com.microsoft.azure.management.appservice.v2019_08_01.MSDeploy; +import com.microsoft.azure.management.appservice.v2019_08_01.FunctionEnvelope; +import com.microsoft.azure.management.appservice.v2019_08_01.HostNameBinding; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteHybridConnection; +import com.microsoft.azure.management.appservice.v2019_08_01.WebSiteInstanceStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteInstance; +import com.microsoft.azure.management.appservice.v2019_08_01.ProcessInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.ProcessModuleInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.ProcessThreadInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.MigrateMySqlStatus; +import com.microsoft.azure.management.appservice.v2019_08_01.NetworkFeatures; +import com.microsoft.azure.management.appservice.v2019_08_01.PerfMonResponse; +import com.microsoft.azure.management.appservice.v2019_08_01.PremierAddOn; +import com.microsoft.azure.management.appservice.v2019_08_01.PremierAddOnPatchResource; +import com.microsoft.azure.management.appservice.v2019_08_01.PrivateAccess; +import com.microsoft.azure.management.appservice.v2019_08_01.PublicCertificate; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteExtensionInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.Slots; +import com.microsoft.azure.management.appservice.v2019_08_01.PrivateEndpointConnectionResource; +import com.microsoft.azure.management.appservice.v2019_08_01.PrivateLinkResourcesWrapper; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteSourceControl; +import com.microsoft.azure.management.appservice.v2019_08_01.TriggeredWebJob; +import com.microsoft.azure.management.appservice.v2019_08_01.TriggeredJobHistory; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteCsmUsageQuota; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteVnetInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteVnetGateway; +import com.microsoft.azure.management.appservice.v2019_08_01.WebJob; + +class WebAppsImpl extends WrapperImpl implements WebApps { + private final CertificateRegistrationManager manager; + + WebAppsImpl(CertificateRegistrationManager manager) { + super(manager.inner().webApps()); + this.manager = manager; + } + + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public SitesImpl defineSite(String name) { + return wrapSiteModel(name); + } + + @Override + public DeploymentImpl defineDeployment(String name) { + return wrapDeploymentModel(name); + } + + @Override + public IdentifierImpl defineDomainOwnershipIdentifier(String name) { + return wrapDomainOwnershipIdentifierModel(name); + } + + @Override + public FunctionEnvelopeImpl defineFunction(String name) { + return wrapFunctionModel(name); + } + + @Override + public KeyInfoImpl defineKey(String name) { + return wrapKeyModel(name); + } + + @Override + public HostNameBindingImpl defineHostNameBinding(String name) { + return wrapHostNameBindingModel(name); + } + + @Override + public SiteHybridConnectionImpl defineRelay(String name) { + return wrapRelayModel(name); + } + + @Override + public PremierAddOnImpl definePremieraddon(String name) { + return wrapPremieraddonModel(name); + } + + @Override + public PublicCertificateImpl definePublicCertificate(String name) { + return wrapPublicCertificateModel(name); + } + + @Override + public SiteExtensionInfoImpl defineSiteextension(String name) { + return wrapSiteextensionModel(name); + } + + @Override + public SlotsImpl defineSlot(String name) { + return wrapSlotModel(name); + } + + @Override + public PrivateEndpointConnectionResourceImpl definePrivateEndpointConnection(String name) { + return wrapPrivateEndpointConnectionModel(name); + } + + @Override + public SiteVnetInfoImpl defineVirtualNetworkConnection(String name) { + return wrapVirtualNetworkConnectionModel(name); + } + + @Override + public SiteVnetGatewayImpl defineGateway(String name) { + return wrapGatewayModel(name); + } + + private SitesImpl wrapSiteModel(String name) { + return new SitesImpl(name, new SiteInner(), this.manager()); + } + + private DeploymentImpl wrapDeploymentModel(String name) { + return new DeploymentImpl(name, this.manager()); + } + + private IdentifierImpl wrapDomainOwnershipIdentifierModel(String name) { + return new IdentifierImpl(name, this.manager()); + } + + private FunctionEnvelopeImpl wrapFunctionModel(String name) { + return new FunctionEnvelopeImpl(name, this.manager()); + } + + private KeyInfoImpl wrapKeyModel(String name) { + return new KeyInfoImpl(name, this.manager()); + } + + private HostNameBindingImpl wrapHostNameBindingModel(String name) { + return new HostNameBindingImpl(name, this.manager()); + } + + private SiteHybridConnectionImpl wrapRelayModel(String name) { + return new SiteHybridConnectionImpl(name, this.manager()); + } + + private PremierAddOnImpl wrapPremieraddonModel(String name) { + return new PremierAddOnImpl(name, this.manager()); + } + + private PublicCertificateImpl wrapPublicCertificateModel(String name) { + return new PublicCertificateImpl(name, this.manager()); + } + + private SiteExtensionInfoImpl wrapSiteextensionModel(String name) { + return new SiteExtensionInfoImpl(name, this.manager()); + } + + private SlotsImpl wrapSlotModel(String name) { + return new SlotsImpl(name, this.manager()); + } + + private PrivateEndpointConnectionResourceImpl wrapPrivateEndpointConnectionModel(String name) { + return new PrivateEndpointConnectionResourceImpl(name, this.manager()); + } + + private SiteVnetInfoImpl wrapVirtualNetworkConnectionModel(String name) { + return new SiteVnetInfoImpl(name, this.manager()); + } + + private SiteVnetGatewayImpl wrapGatewayModel(String name) { + return new SiteVnetGatewayImpl(name, this.manager()); + } + + private SitesImpl wrapSitesModel(SiteInner inner) { + return new SitesImpl(inner.name(), inner, manager()); + } + + private BackupItemImpl wrapBackupItemModel(BackupItemInner inner) { + return new BackupItemImpl(inner, manager()); + } + + private SnapshotImpl wrapSnapshotModel(SnapshotInner inner) { + return new SnapshotImpl(inner, manager()); + } + + private ContinuousWebJobImpl wrapContinuousWebJobModel(ContinuousWebJobInner inner) { + return new ContinuousWebJobImpl(inner, manager()); + } + + private DeploymentImpl wrapDeploymentModel(DeploymentInner inner) { + return new DeploymentImpl(inner, manager()); + } + + private IdentifierImpl wrapIdentifierModel(IdentifierInner inner) { + return new IdentifierImpl(inner, manager()); + } + + private FunctionEnvelopeImpl wrapFunctionEnvelopeModel(FunctionEnvelopeInner inner) { + return new FunctionEnvelopeImpl(inner, manager()); + } + + private KeyInfoImpl wrapKeyInfoModel(KeyInfoInner inner) { + return new KeyInfoImpl(inner, manager()); + } + + private HostNameBindingImpl wrapHostNameBindingModel(HostNameBindingInner inner) { + return new HostNameBindingImpl(inner, manager()); + } + + private SiteHybridConnectionImpl wrapSiteHybridConnectionModel(HybridConnectionInner inner) { + return new SiteHybridConnectionImpl(inner, manager()); + } + + private WebSiteInstanceStatusImpl wrapWebSiteInstanceStatusModel(WebSiteInstanceStatusInner inner) { + return new WebSiteInstanceStatusImpl(inner, manager()); + } + + private ProcessInfoImpl wrapProcessInfoModel(ProcessInfoInner inner) { + return new ProcessInfoImpl(inner, manager()); + } + + private ProcessModuleInfoImpl wrapProcessModuleInfoModel(ProcessModuleInfoInner inner) { + return new ProcessModuleInfoImpl(inner, manager()); + } + + private ProcessThreadInfoImpl wrapProcessThreadInfoModel(ProcessThreadInfoInner inner) { + return new ProcessThreadInfoImpl(inner, manager()); + } + + private NetworkFeaturesImpl wrapNetworkFeaturesModel(NetworkFeaturesInner inner) { + return new NetworkFeaturesImpl(inner, manager()); + } + + private PerfMonResponseImpl wrapPerfMonResponseModel(PerfMonResponseInner inner) { + return new PerfMonResponseImpl(inner, manager()); + } + + private PremierAddOnImpl wrapPremierAddOnModel(PremierAddOnInner inner) { + return new PremierAddOnImpl(inner, manager()); + } + + private PublicCertificateImpl wrapPublicCertificateModel(PublicCertificateInner inner) { + return new PublicCertificateImpl(inner, manager()); + } + + private SiteExtensionInfoImpl wrapSiteExtensionInfoModel(SiteExtensionInfoInner inner) { + return new SiteExtensionInfoImpl(inner, manager()); + } + + private SlotsImpl wrapSlotsModel(SiteInner inner) { + return new SlotsImpl(inner, manager()); + } + + private PrivateEndpointConnectionResourceImpl wrapPrivateEndpointConnectionResourceModel(PrivateEndpointConnectionResourceInner inner) { + return new PrivateEndpointConnectionResourceImpl(inner, manager()); + } + + private TriggeredWebJobImpl wrapTriggeredWebJobModel(TriggeredWebJobInner inner) { + return new TriggeredWebJobImpl(inner, manager()); + } + + private SiteCsmUsageQuotaImpl wrapSiteCsmUsageQuotaModel(CsmUsageQuotaInner inner) { + return new SiteCsmUsageQuotaImpl(inner, manager()); + } + + private SiteVnetInfoImpl wrapSiteVnetInfoModel(VnetInfoInner inner) { + return new SiteVnetInfoImpl(inner, manager()); + } + + private SiteVnetGatewayImpl wrapSiteVnetGatewayModel(VnetGatewayInner inner) { + return new SiteVnetGatewayImpl(inner, manager()); + } + + private WebJobImpl wrapWebJobModel(WebJobInner inner) { + return new WebJobImpl(inner, manager()); + } + + private Observable getSiteInnerUsingWebAppsInnerAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + private Observable getBackupItemInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String backupId = IdParsingUtils.getValueFromIdByName(id, "backups"); + WebAppsInner client = this.inner(); + return client.getBackupStatusAsync(resourceGroupName, name, backupId); + } + + private Observable getContinuousWebJobInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String webJobName = IdParsingUtils.getValueFromIdByName(id, "continuouswebjobs"); + WebAppsInner client = this.inner(); + return client.getContinuousWebJobAsync(resourceGroupName, name, webJobName); + } + + private Observable getDeploymentInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String idParameter = IdParsingUtils.getValueFromIdByName(id, "deployments"); + WebAppsInner client = this.inner(); + return client.getDeploymentAsync(resourceGroupName, name, id); + } + + private Observable getIdentifierInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String domainOwnershipIdentifierName = IdParsingUtils.getValueFromIdByName(id, "domainOwnershipIdentifiers"); + WebAppsInner client = this.inner(); + return client.getDomainOwnershipIdentifierAsync(resourceGroupName, name, domainOwnershipIdentifierName); + } + + private Observable getFunctionEnvelopeInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String functionName = IdParsingUtils.getValueFromIdByName(id, "functions"); + WebAppsInner client = this.inner(); + return client.getFunctionAsync(resourceGroupName, name, functionName); + } + + private Observable getHostNameBindingInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String hostName = IdParsingUtils.getValueFromIdByName(id, "hostNameBindings"); + WebAppsInner client = this.inner(); + return client.getHostNameBindingAsync(resourceGroupName, name, hostName); + } + + private Observable getHybridConnectionInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String namespaceName = IdParsingUtils.getValueFromIdByName(id, "hybridConnectionNamespaces"); + String relayName = IdParsingUtils.getValueFromIdByName(id, "relays"); + WebAppsInner client = this.inner(); + return client.getHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName); + } + + private Observable getWebSiteInstanceStatusInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String instanceId = IdParsingUtils.getValueFromIdByName(id, "instances"); + WebAppsInner client = this.inner(); + return client.getInstanceInfoAsync(resourceGroupName, name, instanceId); + } + + private Observable getProcessInfoInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String instanceId = IdParsingUtils.getValueFromIdByName(id, "instances"); + String processId = IdParsingUtils.getValueFromIdByName(id, "processes"); + WebAppsInner client = this.inner(); + return client.getInstanceProcessAsync(resourceGroupName, name, processId, instanceId); + } + + private Observable getProcessModuleInfoInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String instanceId = IdParsingUtils.getValueFromIdByName(id, "instances"); + String processId = IdParsingUtils.getValueFromIdByName(id, "processes"); + String baseAddress = IdParsingUtils.getValueFromIdByName(id, "modules"); + WebAppsInner client = this.inner(); + return client.getInstanceProcessModuleAsync(resourceGroupName, name, processId, baseAddress, instanceId); + } + + private Observable getNetworkFeaturesInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String view = IdParsingUtils.getValueFromIdByName(id, "networkFeatures"); + WebAppsInner client = this.inner(); + return client.listNetworkFeaturesAsync(resourceGroupName, name, view); + } + + private Observable getPremierAddOnInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String premierAddOnName = IdParsingUtils.getValueFromIdByName(id, "premieraddons"); + WebAppsInner client = this.inner(); + return client.getPremierAddOnAsync(resourceGroupName, name, premierAddOnName); + } + + private Observable getPublicCertificateInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String publicCertificateName = IdParsingUtils.getValueFromIdByName(id, "publicCertificates"); + WebAppsInner client = this.inner(); + return client.getPublicCertificateAsync(resourceGroupName, name, publicCertificateName); + } + + private Observable getSiteExtensionInfoInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String siteExtensionId = IdParsingUtils.getValueFromIdByName(id, "siteextensions"); + WebAppsInner client = this.inner(); + return client.getSiteExtensionAsync(resourceGroupName, name, siteExtensionId); + } + + private Observable getSiteInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String slot = IdParsingUtils.getValueFromIdByName(id, "slots"); + WebAppsInner client = this.inner(); + return client.getSlotAsync(resourceGroupName, name, slot); + } + + private Observable getPrivateEndpointConnectionResourceInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String privateEndpointConnectionName = IdParsingUtils.getValueFromIdByName(id, "privateEndpointConnections"); + WebAppsInner client = this.inner(); + return client.getPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName); + } + + private Observable getTriggeredWebJobInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String slot = IdParsingUtils.getValueFromIdByName(id, "slots"); + String webJobName = IdParsingUtils.getValueFromIdByName(id, "triggeredwebjobs"); + WebAppsInner client = this.inner(); + return client.getTriggeredWebJobSlotAsync(resourceGroupName, name, webJobName, slot); + } + + private Observable getVnetInfoInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String slot = IdParsingUtils.getValueFromIdByName(id, "slots"); + String vnetName = IdParsingUtils.getValueFromIdByName(id, "virtualNetworkConnections"); + WebAppsInner client = this.inner(); + return client.getVnetConnectionSlotAsync(resourceGroupName, name, vnetName, slot); + } + + private Observable getVnetGatewayInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String slot = IdParsingUtils.getValueFromIdByName(id, "slots"); + String vnetName = IdParsingUtils.getValueFromIdByName(id, "virtualNetworkConnections"); + String gatewayName = IdParsingUtils.getValueFromIdByName(id, "gateways"); + WebAppsInner client = this.inner(); + return client.getVnetConnectionGatewaySlotAsync(resourceGroupName, name, vnetName, gatewayName, slot); + } + + private Observable getWebJobInnerUsingWebAppsInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String name = IdParsingUtils.getValueFromIdByName(id, "sites"); + String slot = IdParsingUtils.getValueFromIdByName(id, "slots"); + String webJobName = IdParsingUtils.getValueFromIdByName(id, "webjobs"); + WebAppsInner client = this.inner(); + return client.getWebJobSlotAsync(resourceGroupName, name, webJobName, slot); + } + + @Override + public Observable getByResourceGroupAsync(String resourceGroupName, String name) { + return this.getSiteInnerUsingWebAppsInnerAsync(resourceGroupName, name).flatMap(new Func1> () { + @Override + public Observable call(SiteInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Sites)wrapSitesModel(inner)); + } + } + }); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + WebAppsInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Sites call(SiteInner inner) { + return wrapSitesModel(inner); + } + }); + } + + @Override + public Observable listAsync() { + WebAppsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Sites call(SiteInner inner) { + return wrapSitesModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String name) { + return this.inner().deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable analyzeCustomHostnameAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.analyzeCustomHostnameAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public CustomHostnameAnalysisResult call(CustomHostnameAnalysisResultInner inner) { + return new CustomHostnameAnalysisResultImpl(inner, manager()); + } + }); + } + + @Override + public Completable applySlotConfigToProductionAsync(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + WebAppsInner client = this.inner(); + return client.applySlotConfigToProductionAsync(resourceGroupName, name, slotSwapEntity).toCompletable(); + } + + @Override + public Observable backupAsync(String resourceGroupName, String name, BackupRequestInner request) { + WebAppsInner client = this.inner(); + return client.backupAsync(resourceGroupName, name, request) + .map(new Func1() { + @Override + public BackupItem call(BackupItemInner inner) { + return new BackupItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable listConfigurationsAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listConfigurationsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SiteConfigResource call(SiteConfigResourceInner inner) { + return new SiteConfigResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateBackupConfigurationAsync(String resourceGroupName, String name, BackupRequestInner request) { + WebAppsInner client = this.inner(); + return client.updateBackupConfigurationAsync(resourceGroupName, name, request) + .map(new Func1() { + @Override + public BackupRequest call(BackupRequestInner inner) { + return new BackupRequestImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteBackupConfigurationAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.deleteBackupConfigurationAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable getBackupConfigurationAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getBackupConfigurationAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public BackupRequest call(BackupRequestInner inner) { + return new BackupRequestImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateMetadataAsync(String resourceGroupName, String name, StringDictionaryInner metadata) { + WebAppsInner client = this.inner(); + return client.updateMetadataAsync(resourceGroupName, name, metadata) + .map(new Func1() { + @Override + public StringDictionary call(StringDictionaryInner inner) { + return new StringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable listMetadataAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.listMetadataAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public StringDictionary call(StringDictionaryInner inner) { + return new StringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable getConfigurationAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getConfigurationAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public SiteConfigResource call(SiteConfigResourceInner inner) { + return new SiteConfigResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateConfigurationAsync(String resourceGroupName, String name, SiteConfigResourceInner siteConfig) { + WebAppsInner client = this.inner(); + return client.createOrUpdateConfigurationAsync(resourceGroupName, name, siteConfig) + .map(new Func1() { + @Override + public SiteConfigResource call(SiteConfigResourceInner inner) { + return new SiteConfigResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateConfigurationAsync(String resourceGroupName, String name, SiteConfigResourceInner siteConfig) { + WebAppsInner client = this.inner(); + return client.updateConfigurationAsync(resourceGroupName, name, siteConfig) + .map(new Func1() { + @Override + public SiteConfigResource call(SiteConfigResourceInner inner) { + return new SiteConfigResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable getWebSiteContainerLogsAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getWebSiteContainerLogsAsync(resourceGroupName, name) + ;} + + @Override + public Observable discoverBackupAsync(String resourceGroupName, String name, RestoreRequestInner request) { + WebAppsInner client = this.inner(); + return client.discoverBackupAsync(resourceGroupName, name, request) + .map(new Func1() { + @Override + public RestoreRequest call(RestoreRequestInner inner) { + return new RestoreRequestImpl(inner, manager()); + } + }); + } + + @Override + public Observable getFunctionsAdminTokenAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getFunctionsAdminTokenAsync(resourceGroupName, name) + ;} + + @Override + public Observable listHostKeysAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.listHostKeysAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public HostKeys call(HostKeysInner inner) { + return new HostKeysImpl(inner, manager()); + } + }); + } + + @Override + public Completable listSyncStatusAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.listSyncStatusAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Completable syncFunctionsAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.syncFunctionsAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable createOrUpdateHostSecretAsync(String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key) { + WebAppsInner client = this.inner(); + return client.createOrUpdateHostSecretAsync(resourceGroupName, name, keyType, keyName, key) + .map(new Func1() { + @Override + public KeyInfo call(KeyInfoInner inner) { + return new KeyInfoImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteHostSecretAsync(String resourceGroupName, String name, String keyType, String keyName) { + WebAppsInner client = this.inner(); + return client.deleteHostSecretAsync(resourceGroupName, name, keyType, keyName).toCompletable(); + } + + @Override + public Observable listRelayServiceConnectionsAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.listRelayServiceConnectionsAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public RelayServiceConnectionEntity call(RelayServiceConnectionEntityInner inner) { + return new RelayServiceConnectionEntityImpl(inner, manager()); + } + }); + } + + @Override + public Observable getRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName) { + WebAppsInner client = this.inner(); + return client.getRelayServiceConnectionAsync(resourceGroupName, name, entityName) + .map(new Func1() { + @Override + public RelayServiceConnectionEntity call(RelayServiceConnectionEntityInner inner) { + return new RelayServiceConnectionEntityImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { + WebAppsInner client = this.inner(); + return client.createOrUpdateRelayServiceConnectionAsync(resourceGroupName, name, entityName, connectionEnvelope) + .map(new Func1() { + @Override + public RelayServiceConnectionEntity call(RelayServiceConnectionEntityInner inner) { + return new RelayServiceConnectionEntityImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName) { + WebAppsInner client = this.inner(); + return client.deleteRelayServiceConnectionAsync(resourceGroupName, name, entityName).toCompletable(); + } + + @Override + public Observable updateRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { + WebAppsInner client = this.inner(); + return client.updateRelayServiceConnectionAsync(resourceGroupName, name, entityName, connectionEnvelope) + .map(new Func1() { + @Override + public RelayServiceConnectionEntity call(RelayServiceConnectionEntityInner inner) { + return new RelayServiceConnectionEntityImpl(inner, manager()); + } + }); + } + + @Override + public Observable isCloneableAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.isCloneableAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public SiteCloneability call(SiteCloneabilityInner inner) { + return new SiteCloneabilityImpl(inner, manager()); + } + }); + } + + @Override + public Observable listSiteBackupsAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listSiteBackupsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public BackupItem call(BackupItemInner inner) { + return new BackupItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable listSyncFunctionTriggersAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.listSyncFunctionTriggersAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public FunctionSecrets call(FunctionSecretsInner inner) { + return new FunctionSecretsImpl(inner, manager()); + } + }); + } + + @Override + public Observable migrateStorageAsync(String resourceGroupName, String name, String subscriptionName, StorageMigrationOptions migrationOptions) { + WebAppsInner client = this.inner(); + return client.migrateStorageAsync(resourceGroupName, name, subscriptionName, migrationOptions) + .map(new Func1() { + @Override + public StorageMigrationResponse call(StorageMigrationResponseInner inner) { + return new StorageMigrationResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable migrateMySqlAsync(String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope) { + WebAppsInner client = this.inner(); + return client.migrateMySqlAsync(resourceGroupName, name, migrationRequestEnvelope) + .map(new Func1() { + @Override + public Operation call(OperationInner inner) { + return new OperationImpl(inner, manager()); + } + }); + } + + @Override + public Observable getSwiftVirtualNetworkConnectionAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getSwiftVirtualNetworkConnectionAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public SwiftVirtualNetwork call(SwiftVirtualNetworkInner inner) { + return new SwiftVirtualNetworkImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateSwiftVirtualNetworkConnectionAsync(String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope) { + WebAppsInner client = this.inner(); + return client.createOrUpdateSwiftVirtualNetworkConnectionAsync(resourceGroupName, name, connectionEnvelope) + .map(new Func1() { + @Override + public SwiftVirtualNetwork call(SwiftVirtualNetworkInner inner) { + return new SwiftVirtualNetworkImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteSwiftVirtualNetworkAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.deleteSwiftVirtualNetworkAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable updateSwiftVirtualNetworkConnectionAsync(String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope) { + WebAppsInner client = this.inner(); + return client.updateSwiftVirtualNetworkConnectionAsync(resourceGroupName, name, connectionEnvelope) + .map(new Func1() { + @Override + public SwiftVirtualNetwork call(SwiftVirtualNetworkInner inner) { + return new SwiftVirtualNetworkImpl(inner, manager()); + } + }); + } + + @Override + public Observable startWebSiteNetworkTraceAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.startWebSiteNetworkTraceAsync(resourceGroupName, name) + ;} + + @Override + public Observable startWebSiteNetworkTraceOperationAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.startWebSiteNetworkTraceOperationAsync(resourceGroupName, name) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public NetworkTrace call(NetworkTraceInner inner) { + return new NetworkTraceImpl(inner, manager()); + } + }); + } + + @Override + public Completable stopWebSiteNetworkTraceAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.stopWebSiteNetworkTraceAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable getNetworkTracesAsync(String resourceGroupName, String name, String operationId) { + WebAppsInner client = this.inner(); + return client.getNetworkTracesAsync(resourceGroupName, name, operationId) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public NetworkTrace call(NetworkTraceInner inner) { + return new NetworkTraceImpl(inner, manager()); + } + }); + } + + @Override + public Completable generateNewSitePublishingPasswordAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.generateNewSitePublishingPasswordAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable getSitePhpErrorLogFlagAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getSitePhpErrorLogFlagAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public SitePhpErrorLogFlag call(SitePhpErrorLogFlagInner inner) { + return new SitePhpErrorLogFlagImpl(inner, manager()); + } + }); + } + + @Override + public Observable getProcessDumpAsync(String resourceGroupName, String name, String processId) { + WebAppsInner client = this.inner(); + return client.getProcessDumpAsync(resourceGroupName, name, processId) + ;} + + @Override + public Observable listPublishingProfileXmlWithSecretsAsync(String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions) { + WebAppsInner client = this.inner(); + return client.listPublishingProfileXmlWithSecretsAsync(resourceGroupName, name, publishingProfileOptions) + ;} + + @Override + public Completable resetProductionSlotConfigAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.resetProductionSlotConfigAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Completable restartAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.restartAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Completable restoreFromBackupBlobAsync(String resourceGroupName, String name, RestoreRequestInner request) { + WebAppsInner client = this.inner(); + return client.restoreFromBackupBlobAsync(resourceGroupName, name, request).toCompletable(); + } + + @Override + public Completable restoreFromDeletedAppAsync(String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { + WebAppsInner client = this.inner(); + return client.restoreFromDeletedAppAsync(resourceGroupName, name, restoreRequest).toCompletable(); + } + + @Override + public Completable restoreSnapshotAsync(String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { + WebAppsInner client = this.inner(); + return client.restoreSnapshotAsync(resourceGroupName, name, restoreRequest).toCompletable(); + } + + @Override + public Completable copyProductionSlotAsync(String resourceGroupName, String name, CsmCopySlotEntity copySlotEntity) { + WebAppsInner client = this.inner(); + return client.copyProductionSlotAsync(resourceGroupName, name, copySlotEntity).toCompletable(); + } + + @Override + public Observable listSlotDifferencesFromProductionAsync(final String resourceGroupName, final String name, final CsmSlotEntity slotSwapEntity) { + WebAppsInner client = this.inner(); + return client.listSlotDifferencesFromProductionAsync(resourceGroupName, name, slotSwapEntity) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SlotDifference call(SlotDifferenceInner inner) { + return new SlotDifferenceImpl(inner, manager()); + } + }); + } + + @Override + public Completable swapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + WebAppsInner client = this.inner(); + return client.swapSlotWithProductionAsync(resourceGroupName, name, slotSwapEntity).toCompletable(); + } + + @Override + public Observable listSnapshotsFromDRSecondaryAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listSnapshotsFromDRSecondaryAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Snapshot call(SnapshotInner inner) { + return new SnapshotImpl(inner, manager()); + } + }); + } + + @Override + public Completable startAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.startAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable startNetworkTraceAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.startNetworkTraceAsync(resourceGroupName, name) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public NetworkTrace call(NetworkTraceInner inner) { + return new NetworkTraceImpl(inner, manager()); + } + }); + } + + @Override + public Completable stopAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.stopAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Completable stopNetworkTraceAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.stopNetworkTraceAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Completable syncRepositoryAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.syncRepositoryAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Completable syncFunctionTriggersAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.syncFunctionTriggersAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable getBackupStatusAsync(String resourceGroupName, String name, String backupId) { + WebAppsInner client = this.inner(); + return client.getBackupStatusAsync(resourceGroupName, name, backupId) + .flatMap(new Func1>() { + @Override + public Observable call(BackupItemInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((BackupItem)wrapBackupItemModel(inner)); + } + } + }); + } + + @Override + public Observable listBackupsAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listBackupsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public BackupItem call(BackupItemInner inner) { + return wrapBackupItemModel(inner); + } + }); + } + + @Override + public Completable deleteBackupAsync(String resourceGroupName, String name, String backupId) { + WebAppsInner client = this.inner(); + return client.deleteBackupAsync(resourceGroupName, name, backupId).toCompletable(); + } + + @Override + public Observable listBackupStatusSecretsAsync(String resourceGroupName, String name, String backupId, BackupRequestInner request) { + WebAppsInner client = this.inner(); + return client.listBackupStatusSecretsAsync(resourceGroupName, name, backupId, request) + .map(new Func1() { + @Override + public BackupItem call(BackupItemInner inner) { + return new BackupItemImpl(inner, manager()); + } + }); + } + + @Override + public Completable restoreAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + WebAppsInner client = this.inner(); + return client.restoreAsync(resourceGroupName, name, backupId, request).toCompletable(); + } + + @Override + public Observable listBackupsSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listBackupsSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public BackupItem call(BackupItemInner inner) { + return new BackupItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable getBackupStatusSlotAsync(String resourceGroupName, String name, String backupId, String slot) { + WebAppsInner client = this.inner(); + return client.getBackupStatusSlotAsync(resourceGroupName, name, backupId, slot) + .map(new Func1() { + @Override + public BackupItem call(BackupItemInner inner) { + return new BackupItemImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteBackupSlotAsync(String resourceGroupName, String name, String backupId, String slot) { + WebAppsInner client = this.inner(); + return client.deleteBackupSlotAsync(resourceGroupName, name, backupId, slot).toCompletable(); + } + + @Override + public Observable listBackupStatusSecretsSlotAsync(String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request) { + WebAppsInner client = this.inner(); + return client.listBackupStatusSecretsSlotAsync(resourceGroupName, name, backupId, slot, request) + .map(new Func1() { + @Override + public BackupItem call(BackupItemInner inner) { + return new BackupItemImpl(inner, manager()); + } + }); + } + + @Override + public Completable restoreSlotAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + WebAppsInner client = this.inner(); + return client.restoreSlotAsync(resourceGroupName, name, backupId, slot, request).toCompletable(); + } + + @Override + public Observable getBasicPublishingCredentialsPoliciesAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getBasicPublishingCredentialsPoliciesAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public CsmPublishingCredentialsPoliciesCollection call(CsmPublishingCredentialsPoliciesCollectionInner inner) { + return new CsmPublishingCredentialsPoliciesCollectionImpl(inner, manager()); + } + }); + } + + @Override + public Observable getFtpAllowedAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getFtpAllowedAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public CsmPublishingCredentialsPoliciesEntity call(CsmPublishingCredentialsPoliciesEntityInner inner) { + return new CsmPublishingCredentialsPoliciesEntityImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateFtpAllowedAsync(String resourceGroupName, String name, CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + WebAppsInner client = this.inner(); + return client.updateFtpAllowedAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity) + .map(new Func1() { + @Override + public CsmPublishingCredentialsPoliciesEntity call(CsmPublishingCredentialsPoliciesEntityInner inner) { + return new CsmPublishingCredentialsPoliciesEntityImpl(inner, manager()); + } + }); + } + + @Override + public Observable getScmAllowedAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getScmAllowedAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public CsmPublishingCredentialsPoliciesEntity call(CsmPublishingCredentialsPoliciesEntityInner inner) { + return new CsmPublishingCredentialsPoliciesEntityImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateScmAllowedAsync(String resourceGroupName, String name, CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + WebAppsInner client = this.inner(); + return client.updateScmAllowedAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity) + .map(new Func1() { + @Override + public CsmPublishingCredentialsPoliciesEntity call(CsmPublishingCredentialsPoliciesEntityInner inner) { + return new CsmPublishingCredentialsPoliciesEntityImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateApplicationSettingsAsync(String resourceGroupName, String name, StringDictionaryInner appSettings) { + WebAppsInner client = this.inner(); + return client.updateApplicationSettingsAsync(resourceGroupName, name, appSettings) + .map(new Func1() { + @Override + public StringDictionary call(StringDictionaryInner inner) { + return new StringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable listApplicationSettingsAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.listApplicationSettingsAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public StringDictionary call(StringDictionaryInner inner) { + return new StringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAppSettingsKeyVaultReferencesAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getAppSettingsKeyVaultReferencesAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public KeyVaultReferenceCollection call(KeyVaultReferenceCollectionInner inner) { + return new KeyVaultReferenceCollectionImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAppSettingKeyVaultReferenceAsync(String resourceGroupName, String name, String appSettingKey) { + WebAppsInner client = this.inner(); + return client.getAppSettingKeyVaultReferenceAsync(resourceGroupName, name, appSettingKey) + .map(new Func1() { + @Override + public KeyVaultReferenceResource call(KeyVaultReferenceResourceInner inner) { + return new KeyVaultReferenceResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateApplicationSettingsSlotAsync(String resourceGroupName, String name, String slot, StringDictionaryInner appSettings) { + WebAppsInner client = this.inner(); + return client.updateApplicationSettingsSlotAsync(resourceGroupName, name, slot, appSettings) + .map(new Func1() { + @Override + public StringDictionary call(StringDictionaryInner inner) { + return new StringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable listApplicationSettingsSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.listApplicationSettingsSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public StringDictionary call(StringDictionaryInner inner) { + return new StringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateAuthSettingsAsync(String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings) { + WebAppsInner client = this.inner(); + return client.updateAuthSettingsAsync(resourceGroupName, name, siteAuthSettings) + .map(new Func1() { + @Override + public SiteAuthSettings call(SiteAuthSettingsInner inner) { + return new SiteAuthSettingsImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAuthSettingsAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getAuthSettingsAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public SiteAuthSettings call(SiteAuthSettingsInner inner) { + return new SiteAuthSettingsImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateAuthSettingsSlotAsync(String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings) { + WebAppsInner client = this.inner(); + return client.updateAuthSettingsSlotAsync(resourceGroupName, name, slot, siteAuthSettings) + .map(new Func1() { + @Override + public SiteAuthSettings call(SiteAuthSettingsInner inner) { + return new SiteAuthSettingsImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAuthSettingsSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.getAuthSettingsSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public SiteAuthSettings call(SiteAuthSettingsInner inner) { + return new SiteAuthSettingsImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateAzureStorageAccountsAsync(String resourceGroupName, String name, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts) { + WebAppsInner client = this.inner(); + return client.updateAzureStorageAccountsAsync(resourceGroupName, name, azureStorageAccounts) + .map(new Func1() { + @Override + public AzureStoragePropertyDictionaryResource call(AzureStoragePropertyDictionaryResourceInner inner) { + return new AzureStoragePropertyDictionaryResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAzureStorageAccountsAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.listAzureStorageAccountsAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public AzureStoragePropertyDictionaryResource call(AzureStoragePropertyDictionaryResourceInner inner) { + return new AzureStoragePropertyDictionaryResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateAzureStorageAccountsSlotAsync(String resourceGroupName, String name, String slot, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts) { + WebAppsInner client = this.inner(); + return client.updateAzureStorageAccountsSlotAsync(resourceGroupName, name, slot, azureStorageAccounts) + .map(new Func1() { + @Override + public AzureStoragePropertyDictionaryResource call(AzureStoragePropertyDictionaryResourceInner inner) { + return new AzureStoragePropertyDictionaryResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAzureStorageAccountsSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.listAzureStorageAccountsSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public AzureStoragePropertyDictionaryResource call(AzureStoragePropertyDictionaryResourceInner inner) { + return new AzureStoragePropertyDictionaryResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateConnectionStringsAsync(String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings) { + WebAppsInner client = this.inner(); + return client.updateConnectionStringsAsync(resourceGroupName, name, connectionStrings) + .map(new Func1() { + @Override + public ConnectionStringDictionary call(ConnectionStringDictionaryInner inner) { + return new ConnectionStringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable listConnectionStringsAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.listConnectionStringsAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public ConnectionStringDictionary call(ConnectionStringDictionaryInner inner) { + return new ConnectionStringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateConnectionStringsSlotAsync(String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings) { + WebAppsInner client = this.inner(); + return client.updateConnectionStringsSlotAsync(resourceGroupName, name, slot, connectionStrings) + .map(new Func1() { + @Override + public ConnectionStringDictionary call(ConnectionStringDictionaryInner inner) { + return new ConnectionStringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable listConnectionStringsSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.listConnectionStringsSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public ConnectionStringDictionary call(ConnectionStringDictionaryInner inner) { + return new ConnectionStringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable getDiagnosticLogsConfigurationAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getDiagnosticLogsConfigurationAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public SiteLogsConfig call(SiteLogsConfigInner inner) { + return new SiteLogsConfigImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateDiagnosticLogsConfigAsync(String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig) { + WebAppsInner client = this.inner(); + return client.updateDiagnosticLogsConfigAsync(resourceGroupName, name, siteLogsConfig) + .map(new Func1() { + @Override + public SiteLogsConfig call(SiteLogsConfigInner inner) { + return new SiteLogsConfigImpl(inner, manager()); + } + }); + } + + @Override + public Observable getDiagnosticLogsConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.getDiagnosticLogsConfigurationSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public SiteLogsConfig call(SiteLogsConfigInner inner) { + return new SiteLogsConfigImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateDiagnosticLogsConfigSlotAsync(String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig) { + WebAppsInner client = this.inner(); + return client.updateDiagnosticLogsConfigSlotAsync(resourceGroupName, name, slot, siteLogsConfig) + .map(new Func1() { + @Override + public SiteLogsConfig call(SiteLogsConfigInner inner) { + return new SiteLogsConfigImpl(inner, manager()); + } + }); + } + + @Override + public Observable listPublishingCredentialsAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.listPublishingCredentialsAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public User call(UserInner inner) { + return new UserImpl(inner, manager()); + } + }); + } + + @Override + public Observable listPublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.listPublishingCredentialsSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public User call(UserInner inner) { + return new UserImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateSitePushSettingsAsync(String resourceGroupName, String name, PushSettingsInner pushSettings) { + WebAppsInner client = this.inner(); + return client.updateSitePushSettingsAsync(resourceGroupName, name, pushSettings) + .map(new Func1() { + @Override + public PushSettings call(PushSettingsInner inner) { + return new PushSettingsImpl(inner, manager()); + } + }); + } + + @Override + public Observable listSitePushSettingsAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.listSitePushSettingsAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public PushSettings call(PushSettingsInner inner) { + return new PushSettingsImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateSitePushSettingsSlotAsync(String resourceGroupName, String name, String slot, PushSettingsInner pushSettings) { + WebAppsInner client = this.inner(); + return client.updateSitePushSettingsSlotAsync(resourceGroupName, name, slot, pushSettings) + .map(new Func1() { + @Override + public PushSettings call(PushSettingsInner inner) { + return new PushSettingsImpl(inner, manager()); + } + }); + } + + @Override + public Observable listSitePushSettingsSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.listSitePushSettingsSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public PushSettings call(PushSettingsInner inner) { + return new PushSettingsImpl(inner, manager()); + } + }); + } + + @Override + public Observable listSlotConfigurationNamesAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.listSlotConfigurationNamesAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public SlotConfigNamesResource call(SlotConfigNamesResourceInner inner) { + return new SlotConfigNamesResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateSlotConfigurationNamesAsync(String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames) { + WebAppsInner client = this.inner(); + return client.updateSlotConfigurationNamesAsync(resourceGroupName, name, slotConfigNames) + .map(new Func1() { + @Override + public SlotConfigNamesResource call(SlotConfigNamesResourceInner inner) { + return new SlotConfigNamesResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable listSnapshotsAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listSnapshotsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Snapshot call(SnapshotInner inner) { + return wrapSnapshotModel(inner); + } + }); + } + + @Override + public Observable listConfigurationSnapshotInfoAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listConfigurationSnapshotInfoAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SiteConfigurationSnapshotInfo call(SiteConfigurationSnapshotInfoInner inner) { + return new SiteConfigurationSnapshotInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable getConfigurationSnapshotAsync(String resourceGroupName, String name, String snapshotId) { + WebAppsInner client = this.inner(); + return client.getConfigurationSnapshotAsync(resourceGroupName, name, snapshotId) + .map(new Func1() { + @Override + public SiteConfigResource call(SiteConfigResourceInner inner) { + return new SiteConfigResourceImpl(inner, manager()); + } + }); + } + + @Override + public Completable recoverSiteConfigurationSnapshotAsync(String resourceGroupName, String name, String snapshotId) { + WebAppsInner client = this.inner(); + return client.recoverSiteConfigurationSnapshotAsync(resourceGroupName, name, snapshotId).toCompletable(); + } + + @Override + public Observable listConfigurationSnapshotInfoSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listConfigurationSnapshotInfoSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SiteConfigurationSnapshotInfo call(SiteConfigurationSnapshotInfoInner inner) { + return new SiteConfigurationSnapshotInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable getConfigurationSnapshotSlotAsync(String resourceGroupName, String name, String snapshotId, String slot) { + WebAppsInner client = this.inner(); + return client.getConfigurationSnapshotSlotAsync(resourceGroupName, name, snapshotId, slot) + .map(new Func1() { + @Override + public SiteConfigResource call(SiteConfigResourceInner inner) { + return new SiteConfigResourceImpl(inner, manager()); + } + }); + } + + @Override + public Completable recoverSiteConfigurationSnapshotSlotAsync(String resourceGroupName, String name, String snapshotId, String slot) { + WebAppsInner client = this.inner(); + return client.recoverSiteConfigurationSnapshotSlotAsync(resourceGroupName, name, snapshotId, slot).toCompletable(); + } + + @Override + public Observable listSnapshotsSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listSnapshotsSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Snapshot call(SnapshotInner inner) { + return new SnapshotImpl(inner, manager()); + } + }); + } + + @Override + public Observable getContainerLogsZipAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getContainerLogsZipAsync(resourceGroupName, name) + ;} + + @Override + public Observable getContainerLogsZipSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.getContainerLogsZipSlotAsync(resourceGroupName, name, slot) + ;} + + @Override + public Observable getContinuousWebJobAsync(String resourceGroupName, String name, String webJobName) { + WebAppsInner client = this.inner(); + return client.getContinuousWebJobAsync(resourceGroupName, name, webJobName) + .flatMap(new Func1>() { + @Override + public Observable call(ContinuousWebJobInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ContinuousWebJob)wrapContinuousWebJobModel(inner)); + } + } + }); + } + + @Override + public Observable listContinuousWebJobsAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listContinuousWebJobsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ContinuousWebJob call(ContinuousWebJobInner inner) { + return wrapContinuousWebJobModel(inner); + } + }); + } + + @Override + public Completable deleteContinuousWebJobAsync(String resourceGroupName, String name, String webJobName) { + WebAppsInner client = this.inner(); + return client.deleteContinuousWebJobAsync(resourceGroupName, name, webJobName).toCompletable(); + } + + @Override + public Completable startContinuousWebJobAsync(String resourceGroupName, String name, String webJobName) { + WebAppsInner client = this.inner(); + return client.startContinuousWebJobAsync(resourceGroupName, name, webJobName).toCompletable(); + } + + @Override + public Completable stopContinuousWebJobAsync(String resourceGroupName, String name, String webJobName) { + WebAppsInner client = this.inner(); + return client.stopContinuousWebJobAsync(resourceGroupName, name, webJobName).toCompletable(); + } + + @Override + public Observable listContinuousWebJobsSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listContinuousWebJobsSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ContinuousWebJob call(ContinuousWebJobInner inner) { + return new ContinuousWebJobImpl(inner, manager()); + } + }); + } + + @Override + public Observable getContinuousWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot) { + WebAppsInner client = this.inner(); + return client.getContinuousWebJobSlotAsync(resourceGroupName, name, webJobName, slot) + .map(new Func1() { + @Override + public ContinuousWebJob call(ContinuousWebJobInner inner) { + return new ContinuousWebJobImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteContinuousWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot) { + WebAppsInner client = this.inner(); + return client.deleteContinuousWebJobSlotAsync(resourceGroupName, name, webJobName, slot).toCompletable(); + } + + @Override + public Completable startContinuousWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot) { + WebAppsInner client = this.inner(); + return client.startContinuousWebJobSlotAsync(resourceGroupName, name, webJobName, slot).toCompletable(); + } + + @Override + public Completable stopContinuousWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot) { + WebAppsInner client = this.inner(); + return client.stopContinuousWebJobSlotAsync(resourceGroupName, name, webJobName, slot).toCompletable(); + } + + @Override + public Observable getDeploymentAsync(String resourceGroupName, String name, String id) { + WebAppsInner client = this.inner(); + return client.getDeploymentAsync(resourceGroupName, name, id) + .flatMap(new Func1>() { + @Override + public Observable call(DeploymentInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Deployment)wrapDeploymentModel(inner)); + } + } + }); + } + + @Override + public Observable listDeploymentsAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listDeploymentsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Deployment call(DeploymentInner inner) { + return wrapDeploymentModel(inner); + } + }); + } + + @Override + public Completable deleteDeploymentAsync(String resourceGroupName, String name, String id) { + WebAppsInner client = this.inner(); + return client.deleteDeploymentAsync(resourceGroupName, name, id).toCompletable(); + } + + @Override + public Observable listDeploymentLogAsync(String resourceGroupName, String name, String id) { + WebAppsInner client = this.inner(); + return client.listDeploymentLogAsync(resourceGroupName, name, id) + .map(new Func1() { + @Override + public Deployment call(DeploymentInner inner) { + return new DeploymentImpl(inner, manager()); + } + }); + } + + @Override + public Observable listDeploymentsSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listDeploymentsSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Deployment call(DeploymentInner inner) { + return new DeploymentImpl(inner, manager()); + } + }); + } + + @Override + public Observable getDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot) { + WebAppsInner client = this.inner(); + return client.getDeploymentSlotAsync(resourceGroupName, name, id, slot) + .map(new Func1() { + @Override + public Deployment call(DeploymentInner inner) { + return new DeploymentImpl(inner, manager()); + } + }); + } + + @Override + public Observable createDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, DeploymentInner deployment) { + WebAppsInner client = this.inner(); + return client.createDeploymentSlotAsync(resourceGroupName, name, id, slot, deployment) + .map(new Func1() { + @Override + public Deployment call(DeploymentInner inner) { + return new DeploymentImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot) { + WebAppsInner client = this.inner(); + return client.deleteDeploymentSlotAsync(resourceGroupName, name, id, slot).toCompletable(); + } + + @Override + public Observable listDeploymentLogSlotAsync(String resourceGroupName, String name, String id, String slot) { + WebAppsInner client = this.inner(); + return client.listDeploymentLogSlotAsync(resourceGroupName, name, id, slot) + .map(new Func1() { + @Override + public Deployment call(DeploymentInner inner) { + return new DeploymentImpl(inner, manager()); + } + }); + } + + @Override + public Observable getDomainOwnershipIdentifierAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName) { + WebAppsInner client = this.inner(); + return client.getDomainOwnershipIdentifierAsync(resourceGroupName, name, domainOwnershipIdentifierName) + .flatMap(new Func1>() { + @Override + public Observable call(IdentifierInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Identifier)wrapIdentifierModel(inner)); + } + } + }); + } + + @Override + public Observable listDomainOwnershipIdentifiersAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listDomainOwnershipIdentifiersAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Identifier call(IdentifierInner inner) { + return wrapIdentifierModel(inner); + } + }); + } + + @Override + public Completable deleteDomainOwnershipIdentifierAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName) { + WebAppsInner client = this.inner(); + return client.deleteDomainOwnershipIdentifierAsync(resourceGroupName, name, domainOwnershipIdentifierName).toCompletable(); + } + + @Override + public Observable listDomainOwnershipIdentifiersSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listDomainOwnershipIdentifiersSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Identifier call(IdentifierInner inner) { + return new IdentifierImpl(inner, manager()); + } + }); + } + + @Override + public Observable getDomainOwnershipIdentifierSlotAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot) { + WebAppsInner client = this.inner(); + return client.getDomainOwnershipIdentifierSlotAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot) + .map(new Func1() { + @Override + public Identifier call(IdentifierInner inner) { + return new IdentifierImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateDomainOwnershipIdentifierSlotAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, IdentifierInner domainOwnershipIdentifier) { + WebAppsInner client = this.inner(); + return client.createOrUpdateDomainOwnershipIdentifierSlotAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier) + .map(new Func1() { + @Override + public Identifier call(IdentifierInner inner) { + return new IdentifierImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteDomainOwnershipIdentifierSlotAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot) { + WebAppsInner client = this.inner(); + return client.deleteDomainOwnershipIdentifierSlotAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot).toCompletable(); + } + + @Override + public Observable updateDomainOwnershipIdentifierSlotAsync(String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, IdentifierInner domainOwnershipIdentifier) { + WebAppsInner client = this.inner(); + return client.updateDomainOwnershipIdentifierSlotAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier) + .map(new Func1() { + @Override + public Identifier call(IdentifierInner inner) { + return new IdentifierImpl(inner, manager()); + } + }); + } + + @Override + public Observable getMSDeployStatusAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getMSDeployStatusAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public MSDeployStatus call(MSDeployStatusInner inner) { + return new MSDeployStatusImpl(inner, manager()); + } + }); + } + + @Override + public Observable createMSDeployOperationAsync(String resourceGroupName, String name, MSDeploy mSDeploy) { + WebAppsInner client = this.inner(); + return client.createMSDeployOperationAsync(resourceGroupName, name, mSDeploy) + .map(new Func1() { + @Override + public MSDeployStatus call(MSDeployStatusInner inner) { + return new MSDeployStatusImpl(inner, manager()); + } + }); + } + + @Override + public Observable getMSDeployLogAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getMSDeployLogAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public MSDeployLog call(MSDeployLogInner inner) { + return new MSDeployLogImpl(inner, manager()); + } + }); + } + + @Override + public Observable getInstanceMsDeployStatusAsync(String resourceGroupName, String name, String instanceId) { + WebAppsInner client = this.inner(); + return client.getInstanceMsDeployStatusAsync(resourceGroupName, name, instanceId) + .map(new Func1() { + @Override + public MSDeployStatus call(MSDeployStatusInner inner) { + return new MSDeployStatusImpl(inner, manager()); + } + }); + } + + @Override + public Observable createInstanceMSDeployOperationAsync(String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy) { + WebAppsInner client = this.inner(); + return client.createInstanceMSDeployOperationAsync(resourceGroupName, name, instanceId, mSDeploy) + .map(new Func1() { + @Override + public MSDeployStatus call(MSDeployStatusInner inner) { + return new MSDeployStatusImpl(inner, manager()); + } + }); + } + + @Override + public Observable getInstanceMSDeployLogAsync(String resourceGroupName, String name, String instanceId) { + WebAppsInner client = this.inner(); + return client.getInstanceMSDeployLogAsync(resourceGroupName, name, instanceId) + .map(new Func1() { + @Override + public MSDeployLog call(MSDeployLogInner inner) { + return new MSDeployLogImpl(inner, manager()); + } + }); + } + + @Override + public Observable getMSDeployStatusSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.getMSDeployStatusSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public MSDeployStatus call(MSDeployStatusInner inner) { + return new MSDeployStatusImpl(inner, manager()); + } + }); + } + + @Override + public Observable createMSDeployOperationSlotAsync(String resourceGroupName, String name, String slot, MSDeploy mSDeploy) { + WebAppsInner client = this.inner(); + return client.createMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy) + .map(new Func1() { + @Override + public MSDeployStatus call(MSDeployStatusInner inner) { + return new MSDeployStatusImpl(inner, manager()); + } + }); + } + + @Override + public Observable getMSDeployLogSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.getMSDeployLogSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public MSDeployLog call(MSDeployLogInner inner) { + return new MSDeployLogImpl(inner, manager()); + } + }); + } + + @Override + public Observable getInstanceMsDeployStatusSlotAsync(String resourceGroupName, String name, String slot, String instanceId) { + WebAppsInner client = this.inner(); + return client.getInstanceMsDeployStatusSlotAsync(resourceGroupName, name, slot, instanceId) + .map(new Func1() { + @Override + public MSDeployStatus call(MSDeployStatusInner inner) { + return new MSDeployStatusImpl(inner, manager()); + } + }); + } + + @Override + public Observable createInstanceMSDeployOperationSlotAsync(String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy) { + WebAppsInner client = this.inner(); + return client.createInstanceMSDeployOperationSlotAsync(resourceGroupName, name, slot, instanceId, mSDeploy) + .map(new Func1() { + @Override + public MSDeployStatus call(MSDeployStatusInner inner) { + return new MSDeployStatusImpl(inner, manager()); + } + }); + } + + @Override + public Observable getInstanceMSDeployLogSlotAsync(String resourceGroupName, String name, String slot, String instanceId) { + WebAppsInner client = this.inner(); + return client.getInstanceMSDeployLogSlotAsync(resourceGroupName, name, slot, instanceId) + .map(new Func1() { + @Override + public MSDeployLog call(MSDeployLogInner inner) { + return new MSDeployLogImpl(inner, manager()); + } + }); + } + + @Override + public Observable getFunctionAsync(String resourceGroupName, String name, String functionName) { + WebAppsInner client = this.inner(); + return client.getFunctionAsync(resourceGroupName, name, functionName) + .flatMap(new Func1>() { + @Override + public Observable call(FunctionEnvelopeInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((FunctionEnvelope)wrapFunctionEnvelopeModel(inner)); + } + } + }); + } + + @Override + public Observable listFunctionsAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listFunctionsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public FunctionEnvelope call(FunctionEnvelopeInner inner) { + return wrapFunctionEnvelopeModel(inner); + } + }); + } + + @Override + public Completable deleteFunctionAsync(String resourceGroupName, String name, String functionName) { + WebAppsInner client = this.inner(); + return client.deleteFunctionAsync(resourceGroupName, name, functionName).toCompletable(); + } + + @Override + public Observable listFunctionKeysAsync(String resourceGroupName, String name, String functionName) { + WebAppsInner client = this.inner(); + return client.listFunctionKeysAsync(resourceGroupName, name, functionName) + .map(new Func1() { + @Override + public StringDictionary call(StringDictionaryInner inner) { + return new StringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable listFunctionSecretsAsync(String resourceGroupName, String name, String functionName) { + WebAppsInner client = this.inner(); + return client.listFunctionSecretsAsync(resourceGroupName, name, functionName) + .map(new Func1() { + @Override + public FunctionSecrets call(FunctionSecretsInner inner) { + return new FunctionSecretsImpl(inner, manager()); + } + }); + } + + @Override + public Observable listInstanceFunctionsSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listInstanceFunctionsSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public FunctionEnvelope call(FunctionEnvelopeInner inner) { + return new FunctionEnvelopeImpl(inner, manager()); + } + }); + } + + @Override + public Observable getInstanceFunctionSlotAsync(String resourceGroupName, String name, String functionName, String slot) { + WebAppsInner client = this.inner(); + return client.getInstanceFunctionSlotAsync(resourceGroupName, name, functionName, slot) + .map(new Func1() { + @Override + public FunctionEnvelope call(FunctionEnvelopeInner inner) { + return new FunctionEnvelopeImpl(inner, manager()); + } + }); + } + + @Override + public Observable createInstanceFunctionSlotAsync(String resourceGroupName, String name, String functionName, String slot, FunctionEnvelopeInner functionEnvelope) { + WebAppsInner client = this.inner(); + return client.createInstanceFunctionSlotAsync(resourceGroupName, name, functionName, slot, functionEnvelope) + .map(new Func1() { + @Override + public FunctionEnvelope call(FunctionEnvelopeInner inner) { + return new FunctionEnvelopeImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteInstanceFunctionSlotAsync(String resourceGroupName, String name, String functionName, String slot) { + WebAppsInner client = this.inner(); + return client.deleteInstanceFunctionSlotAsync(resourceGroupName, name, functionName, slot).toCompletable(); + } + + @Override + public Observable listFunctionKeysSlotAsync(String resourceGroupName, String name, String functionName, String slot) { + WebAppsInner client = this.inner(); + return client.listFunctionKeysSlotAsync(resourceGroupName, name, functionName, slot) + .map(new Func1() { + @Override + public StringDictionary call(StringDictionaryInner inner) { + return new StringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable listFunctionSecretsSlotAsync(String resourceGroupName, String name, String functionName, String slot) { + WebAppsInner client = this.inner(); + return client.listFunctionSecretsSlotAsync(resourceGroupName, name, functionName, slot) + .map(new Func1() { + @Override + public FunctionSecrets call(FunctionSecretsInner inner) { + return new FunctionSecretsImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteFunctionSecretAsync(String resourceGroupName, String name, String functionName, String keyName) { + WebAppsInner client = this.inner(); + return client.deleteFunctionSecretAsync(resourceGroupName, name, functionName, keyName).toCompletable(); + } + + @Override + public Observable createOrUpdateFunctionSecretSlotAsync(String resourceGroupName, String name, String functionName, String keyName, String slot, KeyInfoInner key) { + WebAppsInner client = this.inner(); + return client.createOrUpdateFunctionSecretSlotAsync(resourceGroupName, name, functionName, keyName, slot, key) + .map(new Func1() { + @Override + public KeyInfo call(KeyInfoInner inner) { + return new KeyInfoImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteFunctionSecretSlotAsync(String resourceGroupName, String name, String functionName, String keyName, String slot) { + WebAppsInner client = this.inner(); + return client.deleteFunctionSecretSlotAsync(resourceGroupName, name, functionName, keyName, slot).toCompletable(); + } + + @Override + public Observable getHostNameBindingAsync(String resourceGroupName, String name, String hostName) { + WebAppsInner client = this.inner(); + return client.getHostNameBindingAsync(resourceGroupName, name, hostName) + .flatMap(new Func1>() { + @Override + public Observable call(HostNameBindingInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((HostNameBinding)wrapHostNameBindingModel(inner)); + } + } + }); + } + + @Override + public Observable listHostNameBindingsAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listHostNameBindingsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public HostNameBinding call(HostNameBindingInner inner) { + return wrapHostNameBindingModel(inner); + } + }); + } + + @Override + public Completable deleteHostNameBindingAsync(String resourceGroupName, String name, String hostName) { + WebAppsInner client = this.inner(); + return client.deleteHostNameBindingAsync(resourceGroupName, name, hostName).toCompletable(); + } + + @Override + public Observable listHostNameBindingsSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listHostNameBindingsSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public HostNameBinding call(HostNameBindingInner inner) { + return new HostNameBindingImpl(inner, manager()); + } + }); + } + + @Override + public Observable getHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName) { + WebAppsInner client = this.inner(); + return client.getHostNameBindingSlotAsync(resourceGroupName, name, slot, hostName) + .map(new Func1() { + @Override + public HostNameBinding call(HostNameBindingInner inner) { + return new HostNameBindingImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateHostNameBindingSlotAsync(String resourceGroupName, String name, String hostName, String slot, HostNameBindingInner hostNameBinding) { + WebAppsInner client = this.inner(); + return client.createOrUpdateHostNameBindingSlotAsync(resourceGroupName, name, hostName, slot, hostNameBinding) + .map(new Func1() { + @Override + public HostNameBinding call(HostNameBindingInner inner) { + return new HostNameBindingImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName) { + WebAppsInner client = this.inner(); + return client.deleteHostNameBindingSlotAsync(resourceGroupName, name, slot, hostName).toCompletable(); + } + + @Override + public Observable getHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + WebAppsInner client = this.inner(); + return client.getHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName) + .flatMap(new Func1>() { + @Override + public Observable call(HybridConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((SiteHybridConnection)wrapSiteHybridConnectionModel(inner)); + } + } + }); + } + + @Override + public Completable deleteHybridConnectionAsync(String resourceGroupName, String name, String namespaceName, String relayName) { + WebAppsInner client = this.inner(); + return client.deleteHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName).toCompletable(); + } + + @Override + public Observable getHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + WebAppsInner client = this.inner(); + return client.getHybridConnectionSlotAsync(resourceGroupName, name, namespaceName, relayName, slot) + .map(new Func1() { + @Override + public SiteHybridConnection call(HybridConnectionInner inner) { + return new SiteHybridConnectionImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, HybridConnectionInner connectionEnvelope) { + WebAppsInner client = this.inner(); + return client.createOrUpdateHybridConnectionSlotAsync(resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope) + .map(new Func1() { + @Override + public SiteHybridConnection call(HybridConnectionInner inner) { + return new SiteHybridConnectionImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + WebAppsInner client = this.inner(); + return client.deleteHybridConnectionSlotAsync(resourceGroupName, name, namespaceName, relayName, slot).toCompletable(); + } + + @Override + public Observable updateHybridConnectionSlotAsync(String resourceGroupName, String name, String namespaceName, String relayName, String slot, HybridConnectionInner connectionEnvelope) { + WebAppsInner client = this.inner(); + return client.updateHybridConnectionSlotAsync(resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope) + .map(new Func1() { + @Override + public SiteHybridConnection call(HybridConnectionInner inner) { + return new SiteHybridConnectionImpl(inner, manager()); + } + }); + } + + @Override + public Observable listHybridConnectionsAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.listHybridConnectionsAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public SiteHybridConnection call(HybridConnectionInner inner) { + return new SiteHybridConnectionImpl(inner, manager()); + } + }); + } + + @Override + public Observable listHybridConnectionsSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.listHybridConnectionsSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public SiteHybridConnection call(HybridConnectionInner inner) { + return new SiteHybridConnectionImpl(inner, manager()); + } + }); + } + + @Override + public Observable getInstanceInfoAsync(String resourceGroupName, String name, String instanceId) { + WebAppsInner client = this.inner(); + return client.getInstanceInfoAsync(resourceGroupName, name, instanceId) + .flatMap(new Func1>() { + @Override + public Observable call(WebSiteInstanceStatusInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((WebSiteInstanceStatus)wrapWebSiteInstanceStatusModel(inner)); + } + } + }); + } + + @Override + public Observable listInstanceIdentifiersAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listInstanceIdentifiersAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .flatMap(new Func1>() { + @Override + public Observable call(SiteInstanceInner inner) { + return getWebSiteInstanceStatusInnerUsingWebAppsInnerAsync(inner.id()); + } + }) + .map(new Func1() { + @Override + public WebSiteInstanceStatus call(WebSiteInstanceStatusInner inner) { + return wrapWebSiteInstanceStatusModel(inner); + } + }); + } + + @Override + public Observable getInstanceProcessDumpAsync(String resourceGroupName, String name, String processId, String instanceId) { + WebAppsInner client = this.inner(); + return client.getInstanceProcessDumpAsync(resourceGroupName, name, processId, instanceId) + ;} + + @Override + public Observable listInstanceIdentifiersSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listInstanceIdentifiersSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SiteInstance call(SiteInstanceInner inner) { + return new SiteInstanceImpl(inner, manager()); + } + }); + } + + @Override + public Observable getInstanceInfoSlotAsync(String resourceGroupName, String name, String instanceId, String slot) { + WebAppsInner client = this.inner(); + return client.getInstanceInfoSlotAsync(resourceGroupName, name, instanceId, slot) + .map(new Func1() { + @Override + public WebSiteInstanceStatus call(WebSiteInstanceStatusInner inner) { + return new WebSiteInstanceStatusImpl(inner, manager()); + } + }); + } + + @Override + public Observable getInstanceProcessDumpSlotAsync(String resourceGroupName, String name, String processId, String slot, String instanceId) { + WebAppsInner client = this.inner(); + return client.getInstanceProcessDumpSlotAsync(resourceGroupName, name, processId, slot, instanceId) + ;} + + @Override + public Observable getInstanceProcessAsync(String resourceGroupName, String name, String processId, String instanceId) { + WebAppsInner client = this.inner(); + return client.getInstanceProcessAsync(resourceGroupName, name, processId, instanceId) + .flatMap(new Func1>() { + @Override + public Observable call(ProcessInfoInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ProcessInfo)wrapProcessInfoModel(inner)); + } + } + }); + } + + @Override + public Observable listInstanceProcessesAsync(final String resourceGroupName, final String name, final String instanceId) { + WebAppsInner client = this.inner(); + return client.listInstanceProcessesAsync(resourceGroupName, name, instanceId) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProcessInfo call(ProcessInfoInner inner) { + return wrapProcessInfoModel(inner); + } + }); + } + + @Override + public Completable deleteInstanceProcessAsync(String resourceGroupName, String name, String processId, String instanceId) { + WebAppsInner client = this.inner(); + return client.deleteInstanceProcessAsync(resourceGroupName, name, processId, instanceId).toCompletable(); + } + + @Override + public Observable listProcessesAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listProcessesAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProcessInfo call(ProcessInfoInner inner) { + return new ProcessInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable getProcessAsync(String resourceGroupName, String name, String processId) { + WebAppsInner client = this.inner(); + return client.getProcessAsync(resourceGroupName, name, processId) + .map(new Func1() { + @Override + public ProcessInfo call(ProcessInfoInner inner) { + return new ProcessInfoImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteProcessAsync(String resourceGroupName, String name, String processId) { + WebAppsInner client = this.inner(); + return client.deleteProcessAsync(resourceGroupName, name, processId).toCompletable(); + } + + @Override + public Observable listInstanceProcessesSlotAsync(final String resourceGroupName, final String name, final String slot, final String instanceId) { + WebAppsInner client = this.inner(); + return client.listInstanceProcessesSlotAsync(resourceGroupName, name, slot, instanceId) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProcessInfo call(ProcessInfoInner inner) { + return new ProcessInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable getInstanceProcessSlotAsync(String resourceGroupName, String name, String processId, String slot, String instanceId) { + WebAppsInner client = this.inner(); + return client.getInstanceProcessSlotAsync(resourceGroupName, name, processId, slot, instanceId) + .map(new Func1() { + @Override + public ProcessInfo call(ProcessInfoInner inner) { + return new ProcessInfoImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteInstanceProcessSlotAsync(String resourceGroupName, String name, String processId, String slot, String instanceId) { + WebAppsInner client = this.inner(); + return client.deleteInstanceProcessSlotAsync(resourceGroupName, name, processId, slot, instanceId).toCompletable(); + } + + @Override + public Observable listProcessesSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listProcessesSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProcessInfo call(ProcessInfoInner inner) { + return new ProcessInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable getProcessSlotAsync(String resourceGroupName, String name, String processId, String slot) { + WebAppsInner client = this.inner(); + return client.getProcessSlotAsync(resourceGroupName, name, processId, slot) + .map(new Func1() { + @Override + public ProcessInfo call(ProcessInfoInner inner) { + return new ProcessInfoImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteProcessSlotAsync(String resourceGroupName, String name, String processId, String slot) { + WebAppsInner client = this.inner(); + return client.deleteProcessSlotAsync(resourceGroupName, name, processId, slot).toCompletable(); + } + + @Override + public Observable getInstanceProcessModuleAsync(String resourceGroupName, String name, String processId, String baseAddress, String instanceId) { + WebAppsInner client = this.inner(); + return client.getInstanceProcessModuleAsync(resourceGroupName, name, processId, baseAddress, instanceId) + .flatMap(new Func1>() { + @Override + public Observable call(ProcessModuleInfoInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ProcessModuleInfo)wrapProcessModuleInfoModel(inner)); + } + } + }); + } + + @Override + public Observable listInstanceProcessModulesAsync(final String resourceGroupName, final String name, final String processId, final String instanceId) { + WebAppsInner client = this.inner(); + return client.listInstanceProcessModulesAsync(resourceGroupName, name, processId, instanceId) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProcessModuleInfo call(ProcessModuleInfoInner inner) { + return wrapProcessModuleInfoModel(inner); + } + }); + } + + @Override + public Observable listProcessModulesAsync(final String resourceGroupName, final String name, final String processId) { + WebAppsInner client = this.inner(); + return client.listProcessModulesAsync(resourceGroupName, name, processId) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProcessModuleInfo call(ProcessModuleInfoInner inner) { + return new ProcessModuleInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable getProcessModuleAsync(String resourceGroupName, String name, String processId, String baseAddress) { + WebAppsInner client = this.inner(); + return client.getProcessModuleAsync(resourceGroupName, name, processId, baseAddress) + .map(new Func1() { + @Override + public ProcessModuleInfo call(ProcessModuleInfoInner inner) { + return new ProcessModuleInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable listInstanceProcessModulesSlotAsync(final String resourceGroupName, final String name, final String processId, final String slot, final String instanceId) { + WebAppsInner client = this.inner(); + return client.listInstanceProcessModulesSlotAsync(resourceGroupName, name, processId, slot, instanceId) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProcessModuleInfo call(ProcessModuleInfoInner inner) { + return new ProcessModuleInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable getInstanceProcessModuleSlotAsync(String resourceGroupName, String name, String processId, String baseAddress, String slot, String instanceId) { + WebAppsInner client = this.inner(); + return client.getInstanceProcessModuleSlotAsync(resourceGroupName, name, processId, baseAddress, slot, instanceId) + .map(new Func1() { + @Override + public ProcessModuleInfo call(ProcessModuleInfoInner inner) { + return new ProcessModuleInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable listProcessModulesSlotAsync(final String resourceGroupName, final String name, final String processId, final String slot) { + WebAppsInner client = this.inner(); + return client.listProcessModulesSlotAsync(resourceGroupName, name, processId, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProcessModuleInfo call(ProcessModuleInfoInner inner) { + return new ProcessModuleInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable getProcessModuleSlotAsync(String resourceGroupName, String name, String processId, String baseAddress, String slot) { + WebAppsInner client = this.inner(); + return client.getProcessModuleSlotAsync(resourceGroupName, name, processId, baseAddress, slot) + .map(new Func1() { + @Override + public ProcessModuleInfo call(ProcessModuleInfoInner inner) { + return new ProcessModuleInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable listInstanceProcessThreadsAsync(final String resourceGroupName, final String name, final String processId, final String instanceId) { + WebAppsInner client = this.inner(); + return client.listInstanceProcessThreadsAsync(resourceGroupName, name, processId, instanceId) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProcessThreadInfo call(ProcessThreadInfoInner inner) { + return wrapProcessThreadInfoModel(inner); + } + }); + } + + @Override + public Observable listProcessThreadsAsync(final String resourceGroupName, final String name, final String processId) { + WebAppsInner client = this.inner(); + return client.listProcessThreadsAsync(resourceGroupName, name, processId) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProcessThreadInfo call(ProcessThreadInfoInner inner) { + return new ProcessThreadInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable listInstanceProcessThreadsSlotAsync(final String resourceGroupName, final String name, final String processId, final String slot, final String instanceId) { + WebAppsInner client = this.inner(); + return client.listInstanceProcessThreadsSlotAsync(resourceGroupName, name, processId, slot, instanceId) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProcessThreadInfo call(ProcessThreadInfoInner inner) { + return new ProcessThreadInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable listProcessThreadsSlotAsync(final String resourceGroupName, final String name, final String processId, final String slot) { + WebAppsInner client = this.inner(); + return client.listProcessThreadsSlotAsync(resourceGroupName, name, processId, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ProcessThreadInfo call(ProcessThreadInfoInner inner) { + return new ProcessThreadInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable getMigrateMySqlStatusAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getMigrateMySqlStatusAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public MigrateMySqlStatus call(MigrateMySqlStatusInner inner) { + return new MigrateMySqlStatusImpl(inner, manager()); + } + }); + } + + @Override + public Observable getMigrateMySqlStatusSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.getMigrateMySqlStatusSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public MigrateMySqlStatus call(MigrateMySqlStatusInner inner) { + return new MigrateMySqlStatusImpl(inner, manager()); + } + }); + } + + @Override + public Observable listNetworkFeaturesAsync(String resourceGroupName, String name, String view) { + WebAppsInner client = this.inner(); + return client.listNetworkFeaturesAsync(resourceGroupName, name, view) + .flatMap(new Func1>() { + @Override + public Observable call(NetworkFeaturesInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((NetworkFeatures)wrapNetworkFeaturesModel(inner)); + } + } + }); + } + + @Override + public Observable listNetworkFeaturesSlotAsync(String resourceGroupName, String name, String view, String slot) { + WebAppsInner client = this.inner(); + return client.listNetworkFeaturesSlotAsync(resourceGroupName, name, view, slot) + .map(new Func1() { + @Override + public NetworkFeatures call(NetworkFeaturesInner inner) { + return new NetworkFeaturesImpl(inner, manager()); + } + }); + } + + @Override + public Observable getNetworkTraceOperationAsync(String resourceGroupName, String name, String operationId) { + WebAppsInner client = this.inner(); + return client.getNetworkTraceOperationAsync(resourceGroupName, name, operationId) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public NetworkTrace call(NetworkTraceInner inner) { + return new NetworkTraceImpl(inner, manager()); + } + }); + } + + @Override + public Observable getNetworkTraceOperationV2Async(String resourceGroupName, String name, String operationId) { + WebAppsInner client = this.inner(); + return client.getNetworkTraceOperationV2Async(resourceGroupName, name, operationId) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public NetworkTrace call(NetworkTraceInner inner) { + return new NetworkTraceImpl(inner, manager()); + } + }); + } + + @Override + public Observable getNetworkTraceOperationSlotAsync(String resourceGroupName, String name, String operationId, String slot) { + WebAppsInner client = this.inner(); + return client.getNetworkTraceOperationSlotAsync(resourceGroupName, name, operationId, slot) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public NetworkTrace call(NetworkTraceInner inner) { + return new NetworkTraceImpl(inner, manager()); + } + }); + } + + @Override + public Observable getNetworkTraceOperationSlotV2Async(String resourceGroupName, String name, String operationId, String slot) { + WebAppsInner client = this.inner(); + return client.getNetworkTraceOperationSlotV2Async(resourceGroupName, name, operationId, slot) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public NetworkTrace call(NetworkTraceInner inner) { + return new NetworkTraceImpl(inner, manager()); + } + }); + } + + @Override + public Observable getNetworkTracesV2Async(String resourceGroupName, String name, String operationId) { + WebAppsInner client = this.inner(); + return client.getNetworkTracesV2Async(resourceGroupName, name, operationId) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public NetworkTrace call(NetworkTraceInner inner) { + return new NetworkTraceImpl(inner, manager()); + } + }); + } + + @Override + public Observable getNetworkTracesSlotV2Async(String resourceGroupName, String name, String operationId, String slot) { + WebAppsInner client = this.inner(); + return client.getNetworkTracesSlotV2Async(resourceGroupName, name, operationId, slot) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public NetworkTrace call(NetworkTraceInner inner) { + return new NetworkTraceImpl(inner, manager()); + } + }); + } + + @Override + public Observable listPerfMonCountersAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listPerfMonCountersAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PerfMonResponse call(PerfMonResponseInner inner) { + return wrapPerfMonResponseModel(inner); + } + }); + } + + @Override + public Observable listPerfMonCountersSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listPerfMonCountersSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PerfMonResponse call(PerfMonResponseInner inner) { + return new PerfMonResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable getPremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName) { + WebAppsInner client = this.inner(); + return client.getPremierAddOnAsync(resourceGroupName, name, premierAddOnName) + .flatMap(new Func1>() { + @Override + public Observable call(PremierAddOnInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((PremierAddOn)wrapPremierAddOnModel(inner)); + } + } + }); + } + + @Override + public Completable deletePremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName) { + WebAppsInner client = this.inner(); + return client.deletePremierAddOnAsync(resourceGroupName, name, premierAddOnName).toCompletable(); + } + + @Override + public Observable listPremierAddOnsAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.listPremierAddOnsAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public PremierAddOn call(PremierAddOnInner inner) { + return new PremierAddOnImpl(inner, manager()); + } + }); + } + + @Override + public Observable listPremierAddOnsSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.listPremierAddOnsSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public PremierAddOn call(PremierAddOnInner inner) { + return new PremierAddOnImpl(inner, manager()); + } + }); + } + + @Override + public Observable getPremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot) { + WebAppsInner client = this.inner(); + return client.getPremierAddOnSlotAsync(resourceGroupName, name, premierAddOnName, slot) + .map(new Func1() { + @Override + public PremierAddOn call(PremierAddOnInner inner) { + return new PremierAddOnImpl(inner, manager()); + } + }); + } + + @Override + public Observable addPremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnInner premierAddOn) { + WebAppsInner client = this.inner(); + return client.addPremierAddOnSlotAsync(resourceGroupName, name, premierAddOnName, slot, premierAddOn) + .map(new Func1() { + @Override + public PremierAddOn call(PremierAddOnInner inner) { + return new PremierAddOnImpl(inner, manager()); + } + }); + } + + @Override + public Completable deletePremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot) { + WebAppsInner client = this.inner(); + return client.deletePremierAddOnSlotAsync(resourceGroupName, name, premierAddOnName, slot).toCompletable(); + } + + @Override + public Observable updatePremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnPatchResource premierAddOn) { + WebAppsInner client = this.inner(); + return client.updatePremierAddOnSlotAsync(resourceGroupName, name, premierAddOnName, slot, premierAddOn) + .map(new Func1() { + @Override + public PremierAddOn call(PremierAddOnInner inner) { + return new PremierAddOnImpl(inner, manager()); + } + }); + } + + @Override + public Observable getPrivateAccessAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getPrivateAccessAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public PrivateAccess call(PrivateAccessInner inner) { + return new PrivateAccessImpl(inner, manager()); + } + }); + } + + @Override + public Observable putPrivateAccessVnetAsync(String resourceGroupName, String name, PrivateAccessInner access) { + WebAppsInner client = this.inner(); + return client.putPrivateAccessVnetAsync(resourceGroupName, name, access) + .map(new Func1() { + @Override + public PrivateAccess call(PrivateAccessInner inner) { + return new PrivateAccessImpl(inner, manager()); + } + }); + } + + @Override + public Observable getPrivateAccessSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.getPrivateAccessSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public PrivateAccess call(PrivateAccessInner inner) { + return new PrivateAccessImpl(inner, manager()); + } + }); + } + + @Override + public Observable putPrivateAccessVnetSlotAsync(String resourceGroupName, String name, String slot, PrivateAccessInner access) { + WebAppsInner client = this.inner(); + return client.putPrivateAccessVnetSlotAsync(resourceGroupName, name, slot, access) + .map(new Func1() { + @Override + public PrivateAccess call(PrivateAccessInner inner) { + return new PrivateAccessImpl(inner, manager()); + } + }); + } + + @Override + public Observable getPublicCertificateAsync(String resourceGroupName, String name, String publicCertificateName) { + WebAppsInner client = this.inner(); + return client.getPublicCertificateAsync(resourceGroupName, name, publicCertificateName) + .flatMap(new Func1>() { + @Override + public Observable call(PublicCertificateInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((PublicCertificate)wrapPublicCertificateModel(inner)); + } + } + }); + } + + @Override + public Observable listPublicCertificatesAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listPublicCertificatesAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PublicCertificate call(PublicCertificateInner inner) { + return wrapPublicCertificateModel(inner); + } + }); + } + + @Override + public Completable deletePublicCertificateAsync(String resourceGroupName, String name, String publicCertificateName) { + WebAppsInner client = this.inner(); + return client.deletePublicCertificateAsync(resourceGroupName, name, publicCertificateName).toCompletable(); + } + + @Override + public Observable listPublicCertificatesSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listPublicCertificatesSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PublicCertificate call(PublicCertificateInner inner) { + return new PublicCertificateImpl(inner, manager()); + } + }); + } + + @Override + public Observable getPublicCertificateSlotAsync(String resourceGroupName, String name, String slot, String publicCertificateName) { + WebAppsInner client = this.inner(); + return client.getPublicCertificateSlotAsync(resourceGroupName, name, slot, publicCertificateName) + .map(new Func1() { + @Override + public PublicCertificate call(PublicCertificateInner inner) { + return new PublicCertificateImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdatePublicCertificateSlotAsync(String resourceGroupName, String name, String publicCertificateName, String slot, PublicCertificateInner publicCertificate) { + WebAppsInner client = this.inner(); + return client.createOrUpdatePublicCertificateSlotAsync(resourceGroupName, name, publicCertificateName, slot, publicCertificate) + .map(new Func1() { + @Override + public PublicCertificate call(PublicCertificateInner inner) { + return new PublicCertificateImpl(inner, manager()); + } + }); + } + + @Override + public Completable deletePublicCertificateSlotAsync(String resourceGroupName, String name, String slot, String publicCertificateName) { + WebAppsInner client = this.inner(); + return client.deletePublicCertificateSlotAsync(resourceGroupName, name, slot, publicCertificateName).toCompletable(); + } + + @Override + public Observable getSiteExtensionAsync(String resourceGroupName, String name, String siteExtensionId) { + WebAppsInner client = this.inner(); + return client.getSiteExtensionAsync(resourceGroupName, name, siteExtensionId) + .flatMap(new Func1>() { + @Override + public Observable call(SiteExtensionInfoInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((SiteExtensionInfo)wrapSiteExtensionInfoModel(inner)); + } + } + }); + } + + @Override + public Observable listSiteExtensionsAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listSiteExtensionsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SiteExtensionInfo call(SiteExtensionInfoInner inner) { + return wrapSiteExtensionInfoModel(inner); + } + }); + } + + @Override + public Completable deleteSiteExtensionAsync(String resourceGroupName, String name, String siteExtensionId) { + WebAppsInner client = this.inner(); + return client.deleteSiteExtensionAsync(resourceGroupName, name, siteExtensionId).toCompletable(); + } + + @Override + public Observable listSiteExtensionsSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listSiteExtensionsSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SiteExtensionInfo call(SiteExtensionInfoInner inner) { + return new SiteExtensionInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable getSiteExtensionSlotAsync(String resourceGroupName, String name, String siteExtensionId, String slot) { + WebAppsInner client = this.inner(); + return client.getSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot) + .map(new Func1() { + @Override + public SiteExtensionInfo call(SiteExtensionInfoInner inner) { + return new SiteExtensionInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable installSiteExtensionSlotAsync(String resourceGroupName, String name, String siteExtensionId, String slot) { + WebAppsInner client = this.inner(); + return client.installSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot) + .map(new Func1() { + @Override + public SiteExtensionInfo call(SiteExtensionInfoInner inner) { + return new SiteExtensionInfoImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteSiteExtensionSlotAsync(String resourceGroupName, String name, String siteExtensionId, String slot) { + WebAppsInner client = this.inner(); + return client.deleteSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot).toCompletable(); + } + + @Override + public Observable getSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.getSlotAsync(resourceGroupName, name, slot) + .flatMap(new Func1>() { + @Override + public Observable call(SiteInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Slots)wrapSlotsModel(inner)); + } + } + }); + } + + @Override + public Observable listSlotsAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listSlotsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Slots call(SiteInner inner) { + return wrapSlotsModel(inner); + } + }); + } + + @Override + public Completable deleteSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.deleteSlotAsync(resourceGroupName, name, slot).toCompletable(); + } + + @Override + public Observable analyzeCustomHostnameSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.analyzeCustomHostnameSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public CustomHostnameAnalysisResult call(CustomHostnameAnalysisResultInner inner) { + return new CustomHostnameAnalysisResultImpl(inner, manager()); + } + }); + } + + @Override + public Completable applySlotConfigurationSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + WebAppsInner client = this.inner(); + return client.applySlotConfigurationSlotAsync(resourceGroupName, name, slot, slotSwapEntity).toCompletable(); + } + + @Override + public Observable backupSlotAsync(String resourceGroupName, String name, String slot, BackupRequestInner request) { + WebAppsInner client = this.inner(); + return client.backupSlotAsync(resourceGroupName, name, slot, request) + .map(new Func1() { + @Override + public BackupItem call(BackupItemInner inner) { + return new BackupItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable listConfigurationsSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listConfigurationsSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SiteConfigResource call(SiteConfigResourceInner inner) { + return new SiteConfigResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot, BackupRequestInner request) { + WebAppsInner client = this.inner(); + return client.updateBackupConfigurationSlotAsync(resourceGroupName, name, slot, request) + .map(new Func1() { + @Override + public BackupRequest call(BackupRequestInner inner) { + return new BackupRequestImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.deleteBackupConfigurationSlotAsync(resourceGroupName, name, slot).toCompletable(); + } + + @Override + public Observable getBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.getBackupConfigurationSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public BackupRequest call(BackupRequestInner inner) { + return new BackupRequestImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateMetadataSlotAsync(String resourceGroupName, String name, String slot, StringDictionaryInner metadata) { + WebAppsInner client = this.inner(); + return client.updateMetadataSlotAsync(resourceGroupName, name, slot, metadata) + .map(new Func1() { + @Override + public StringDictionary call(StringDictionaryInner inner) { + return new StringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable listMetadataSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.listMetadataSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public StringDictionary call(StringDictionaryInner inner) { + return new StringDictionaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable getConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.getConfigurationSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public SiteConfigResource call(SiteConfigResourceInner inner) { + return new SiteConfigResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateConfigurationSlotAsync(String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + WebAppsInner client = this.inner(); + return client.createOrUpdateConfigurationSlotAsync(resourceGroupName, name, slot, siteConfig) + .map(new Func1() { + @Override + public SiteConfigResource call(SiteConfigResourceInner inner) { + return new SiteConfigResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateConfigurationSlotAsync(String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + WebAppsInner client = this.inner(); + return client.updateConfigurationSlotAsync(resourceGroupName, name, slot, siteConfig) + .map(new Func1() { + @Override + public SiteConfigResource call(SiteConfigResourceInner inner) { + return new SiteConfigResourceImpl(inner, manager()); + } + }); + } + + @Override + public Observable getWebSiteContainerLogsSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.getWebSiteContainerLogsSlotAsync(resourceGroupName, name, slot) + ;} + + @Override + public Observable discoverBackupSlotAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request) { + WebAppsInner client = this.inner(); + return client.discoverBackupSlotAsync(resourceGroupName, name, slot, request) + .map(new Func1() { + @Override + public RestoreRequest call(RestoreRequestInner inner) { + return new RestoreRequestImpl(inner, manager()); + } + }); + } + + @Override + public Observable getFunctionsAdminTokenSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.getFunctionsAdminTokenSlotAsync(resourceGroupName, name, slot) + ;} + + @Override + public Observable listHostKeysSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.listHostKeysSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public HostKeys call(HostKeysInner inner) { + return new HostKeysImpl(inner, manager()); + } + }); + } + + @Override + public Completable listSyncStatusSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.listSyncStatusSlotAsync(resourceGroupName, name, slot).toCompletable(); + } + + @Override + public Completable syncFunctionsSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.syncFunctionsSlotAsync(resourceGroupName, name, slot).toCompletable(); + } + + @Override + public Observable createOrUpdateHostSecretSlotAsync(String resourceGroupName, String name, String keyType, String keyName, String slot, KeyInfoInner key) { + WebAppsInner client = this.inner(); + return client.createOrUpdateHostSecretSlotAsync(resourceGroupName, name, keyType, keyName, slot, key) + .map(new Func1() { + @Override + public KeyInfo call(KeyInfoInner inner) { + return new KeyInfoImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteHostSecretSlotAsync(String resourceGroupName, String name, String keyType, String keyName, String slot) { + WebAppsInner client = this.inner(); + return client.deleteHostSecretSlotAsync(resourceGroupName, name, keyType, keyName, slot).toCompletable(); + } + + @Override + public Observable listRelayServiceConnectionsSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.listRelayServiceConnectionsSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public RelayServiceConnectionEntity call(RelayServiceConnectionEntityInner inner) { + return new RelayServiceConnectionEntityImpl(inner, manager()); + } + }); + } + + @Override + public Observable getRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot) { + WebAppsInner client = this.inner(); + return client.getRelayServiceConnectionSlotAsync(resourceGroupName, name, entityName, slot) + .map(new Func1() { + @Override + public RelayServiceConnectionEntity call(RelayServiceConnectionEntityInner inner) { + return new RelayServiceConnectionEntityImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { + WebAppsInner client = this.inner(); + return client.createOrUpdateRelayServiceConnectionSlotAsync(resourceGroupName, name, entityName, slot, connectionEnvelope) + .map(new Func1() { + @Override + public RelayServiceConnectionEntity call(RelayServiceConnectionEntityInner inner) { + return new RelayServiceConnectionEntityImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot) { + WebAppsInner client = this.inner(); + return client.deleteRelayServiceConnectionSlotAsync(resourceGroupName, name, entityName, slot).toCompletable(); + } + + @Override + public Observable updateRelayServiceConnectionSlotAsync(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { + WebAppsInner client = this.inner(); + return client.updateRelayServiceConnectionSlotAsync(resourceGroupName, name, entityName, slot, connectionEnvelope) + .map(new Func1() { + @Override + public RelayServiceConnectionEntity call(RelayServiceConnectionEntityInner inner) { + return new RelayServiceConnectionEntityImpl(inner, manager()); + } + }); + } + + @Override + public Observable isCloneableSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.isCloneableSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public SiteCloneability call(SiteCloneabilityInner inner) { + return new SiteCloneabilityImpl(inner, manager()); + } + }); + } + + @Override + public Observable listSiteBackupsSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listSiteBackupsSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public BackupItem call(BackupItemInner inner) { + return new BackupItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable listSyncFunctionTriggersSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.listSyncFunctionTriggersSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public FunctionSecrets call(FunctionSecretsInner inner) { + return new FunctionSecretsImpl(inner, manager()); + } + }); + } + + @Override + public Observable getSwiftVirtualNetworkConnectionSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.getSwiftVirtualNetworkConnectionSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public SwiftVirtualNetwork call(SwiftVirtualNetworkInner inner) { + return new SwiftVirtualNetworkImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateSwiftVirtualNetworkConnectionSlotAsync(String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope) { + WebAppsInner client = this.inner(); + return client.createOrUpdateSwiftVirtualNetworkConnectionSlotAsync(resourceGroupName, name, slot, connectionEnvelope) + .map(new Func1() { + @Override + public SwiftVirtualNetwork call(SwiftVirtualNetworkInner inner) { + return new SwiftVirtualNetworkImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteSwiftVirtualNetworkSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.deleteSwiftVirtualNetworkSlotAsync(resourceGroupName, name, slot).toCompletable(); + } + + @Override + public Observable updateSwiftVirtualNetworkConnectionSlotAsync(String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope) { + WebAppsInner client = this.inner(); + return client.updateSwiftVirtualNetworkConnectionSlotAsync(resourceGroupName, name, slot, connectionEnvelope) + .map(new Func1() { + @Override + public SwiftVirtualNetwork call(SwiftVirtualNetworkInner inner) { + return new SwiftVirtualNetworkImpl(inner, manager()); + } + }); + } + + @Override + public Observable startWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.startWebSiteNetworkTraceSlotAsync(resourceGroupName, name, slot) + ;} + + @Override + public Observable startWebSiteNetworkTraceOperationSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.startWebSiteNetworkTraceOperationSlotAsync(resourceGroupName, name, slot) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public NetworkTrace call(NetworkTraceInner inner) { + return new NetworkTraceImpl(inner, manager()); + } + }); + } + + @Override + public Completable stopWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.stopWebSiteNetworkTraceSlotAsync(resourceGroupName, name, slot).toCompletable(); + } + + @Override + public Observable getNetworkTracesSlotAsync(String resourceGroupName, String name, String operationId, String slot) { + WebAppsInner client = this.inner(); + return client.getNetworkTracesSlotAsync(resourceGroupName, name, operationId, slot) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public NetworkTrace call(NetworkTraceInner inner) { + return new NetworkTraceImpl(inner, manager()); + } + }); + } + + @Override + public Completable generateNewSitePublishingPasswordSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.generateNewSitePublishingPasswordSlotAsync(resourceGroupName, name, slot).toCompletable(); + } + + @Override + public Observable getSitePhpErrorLogFlagSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.getSitePhpErrorLogFlagSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public SitePhpErrorLogFlag call(SitePhpErrorLogFlagInner inner) { + return new SitePhpErrorLogFlagImpl(inner, manager()); + } + }); + } + + @Override + public Observable getProcessDumpSlotAsync(String resourceGroupName, String name, String processId, String slot) { + WebAppsInner client = this.inner(); + return client.getProcessDumpSlotAsync(resourceGroupName, name, processId, slot) + ;} + + @Override + public Observable listPublishingProfileXmlWithSecretsSlotAsync(String resourceGroupName, String name, String slot, CsmPublishingProfileOptions publishingProfileOptions) { + WebAppsInner client = this.inner(); + return client.listPublishingProfileXmlWithSecretsSlotAsync(resourceGroupName, name, slot, publishingProfileOptions) + ;} + + @Override + public Completable resetSlotConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.resetSlotConfigurationSlotAsync(resourceGroupName, name, slot).toCompletable(); + } + + @Override + public Completable restartSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.restartSlotAsync(resourceGroupName, name, slot).toCompletable(); + } + + @Override + public Completable restoreFromBackupBlobSlotAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request) { + WebAppsInner client = this.inner(); + return client.restoreFromBackupBlobSlotAsync(resourceGroupName, name, slot, request).toCompletable(); + } + + @Override + public Completable restoreFromDeletedAppSlotAsync(String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { + WebAppsInner client = this.inner(); + return client.restoreFromDeletedAppSlotAsync(resourceGroupName, name, slot, restoreRequest).toCompletable(); + } + + @Override + public Completable restoreSnapshotSlotAsync(String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { + WebAppsInner client = this.inner(); + return client.restoreSnapshotSlotAsync(resourceGroupName, name, slot, restoreRequest).toCompletable(); + } + + @Override + public Completable copySlotSlotAsync(String resourceGroupName, String name, String slot, CsmCopySlotEntity copySlotEntity) { + WebAppsInner client = this.inner(); + return client.copySlotSlotAsync(resourceGroupName, name, slot, copySlotEntity).toCompletable(); + } + + @Override + public Observable listSlotDifferencesSlotAsync(final String resourceGroupName, final String name, final String slot, final CsmSlotEntity slotSwapEntity) { + WebAppsInner client = this.inner(); + return client.listSlotDifferencesSlotAsync(resourceGroupName, name, slot, slotSwapEntity) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SlotDifference call(SlotDifferenceInner inner) { + return new SlotDifferenceImpl(inner, manager()); + } + }); + } + + @Override + public Completable swapSlotSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + WebAppsInner client = this.inner(); + return client.swapSlotSlotAsync(resourceGroupName, name, slot, slotSwapEntity).toCompletable(); + } + + @Override + public Observable listSnapshotsFromDRSecondarySlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listSnapshotsFromDRSecondarySlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Snapshot call(SnapshotInner inner) { + return new SnapshotImpl(inner, manager()); + } + }); + } + + @Override + public Completable startSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.startSlotAsync(resourceGroupName, name, slot).toCompletable(); + } + + @Override + public Observable startNetworkTraceSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.startNetworkTraceSlotAsync(resourceGroupName, name, slot) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public NetworkTrace call(NetworkTraceInner inner) { + return new NetworkTraceImpl(inner, manager()); + } + }); + } + + @Override + public Completable stopSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.stopSlotAsync(resourceGroupName, name, slot).toCompletable(); + } + + @Override + public Completable stopNetworkTraceSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.stopNetworkTraceSlotAsync(resourceGroupName, name, slot).toCompletable(); + } + + @Override + public Completable syncRepositorySlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.syncRepositorySlotAsync(resourceGroupName, name, slot).toCompletable(); + } + + @Override + public Completable syncFunctionTriggersSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.syncFunctionTriggersSlotAsync(resourceGroupName, name, slot).toCompletable(); + } + + @Override + public Observable getPrivateEndpointConnectionAsync(String resourceGroupName, String name, String privateEndpointConnectionName) { + WebAppsInner client = this.inner(); + return client.getPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName) + .flatMap(new Func1>() { + @Override + public Observable call(PrivateEndpointConnectionResourceInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((PrivateEndpointConnectionResource)wrapPrivateEndpointConnectionResourceModel(inner)); + } + } + }); + } + + @Override + public Completable deletePrivateEndpointConnectionAsync(String resourceGroupName, String name, String privateEndpointConnectionName) { + WebAppsInner client = this.inner(); + return client.deletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).toCompletable(); + } + + @Override + public Observable getPrivateLinkResourcesAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getPrivateLinkResourcesAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public PrivateLinkResourcesWrapper call(PrivateLinkResourcesWrapperInner inner) { + return new PrivateLinkResourcesWrapperImpl(inner, manager()); + } + }); + } + + @Override + public Observable getSourceControlSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.getSourceControlSlotAsync(resourceGroupName, name, slot) + .map(new Func1() { + @Override + public SiteSourceControl call(SiteSourceControlInner inner) { + return new SiteSourceControlImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + WebAppsInner client = this.inner(); + return client.createOrUpdateSourceControlSlotAsync(resourceGroupName, name, slot, siteSourceControl) + .map(new Func1() { + @Override + public SiteSourceControl call(SiteSourceControlInner inner) { + return new SiteSourceControlImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteSourceControlSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.deleteSourceControlSlotAsync(resourceGroupName, name, slot).toCompletable(); + } + + @Override + public Observable updateSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + WebAppsInner client = this.inner(); + return client.updateSourceControlSlotAsync(resourceGroupName, name, slot, siteSourceControl) + .map(new Func1() { + @Override + public SiteSourceControl call(SiteSourceControlInner inner) { + return new SiteSourceControlImpl(inner, manager()); + } + }); + } + + @Override + public Observable getSourceControlAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.getSourceControlAsync(resourceGroupName, name) + .map(new Func1() { + @Override + public SiteSourceControl call(SiteSourceControlInner inner) { + return new SiteSourceControlImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateSourceControlAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + WebAppsInner client = this.inner(); + return client.createOrUpdateSourceControlAsync(resourceGroupName, name, siteSourceControl) + .map(new Func1() { + @Override + public SiteSourceControl call(SiteSourceControlInner inner) { + return new SiteSourceControlImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteSourceControlAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.deleteSourceControlAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable updateSourceControlAsync(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + WebAppsInner client = this.inner(); + return client.updateSourceControlAsync(resourceGroupName, name, siteSourceControl) + .map(new Func1() { + @Override + public SiteSourceControl call(SiteSourceControlInner inner) { + return new SiteSourceControlImpl(inner, manager()); + } + }); + } + + @Override + public Observable getTriggeredWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot) { + WebAppsInner client = this.inner(); + return client.getTriggeredWebJobSlotAsync(resourceGroupName, name, webJobName, slot) + .flatMap(new Func1>() { + @Override + public Observable call(TriggeredWebJobInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((TriggeredWebJob)wrapTriggeredWebJobModel(inner)); + } + } + }); + } + + @Override + public Observable listTriggeredWebJobsSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listTriggeredWebJobsSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public TriggeredWebJob call(TriggeredWebJobInner inner) { + return wrapTriggeredWebJobModel(inner); + } + }); + } + + @Override + public Completable deleteTriggeredWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot) { + WebAppsInner client = this.inner(); + return client.deleteTriggeredWebJobSlotAsync(resourceGroupName, name, webJobName, slot).toCompletable(); + } + + @Override + public Observable listTriggeredWebJobHistorySlotAsync(final String resourceGroupName, final String name, final String webJobName, final String slot) { + WebAppsInner client = this.inner(); + return client.listTriggeredWebJobHistorySlotAsync(resourceGroupName, name, webJobName, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public TriggeredJobHistory call(TriggeredJobHistoryInner inner) { + return new TriggeredJobHistoryImpl(inner, manager()); + } + }); + } + + @Override + public Observable getTriggeredWebJobHistorySlotAsync(String resourceGroupName, String name, String webJobName, String id, String slot) { + WebAppsInner client = this.inner(); + return client.getTriggeredWebJobHistorySlotAsync(resourceGroupName, name, webJobName, id, slot) + .map(new Func1() { + @Override + public TriggeredJobHistory call(TriggeredJobHistoryInner inner) { + return new TriggeredJobHistoryImpl(inner, manager()); + } + }); + } + + @Override + public Completable runTriggeredWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot) { + WebAppsInner client = this.inner(); + return client.runTriggeredWebJobSlotAsync(resourceGroupName, name, webJobName, slot).toCompletable(); + } + + @Override + public Observable listTriggeredWebJobsAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listTriggeredWebJobsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public TriggeredWebJob call(TriggeredWebJobInner inner) { + return new TriggeredWebJobImpl(inner, manager()); + } + }); + } + + @Override + public Observable getTriggeredWebJobAsync(String resourceGroupName, String name, String webJobName) { + WebAppsInner client = this.inner(); + return client.getTriggeredWebJobAsync(resourceGroupName, name, webJobName) + .map(new Func1() { + @Override + public TriggeredWebJob call(TriggeredWebJobInner inner) { + return new TriggeredWebJobImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteTriggeredWebJobAsync(String resourceGroupName, String name, String webJobName) { + WebAppsInner client = this.inner(); + return client.deleteTriggeredWebJobAsync(resourceGroupName, name, webJobName).toCompletable(); + } + + @Override + public Observable listTriggeredWebJobHistoryAsync(final String resourceGroupName, final String name, final String webJobName) { + WebAppsInner client = this.inner(); + return client.listTriggeredWebJobHistoryAsync(resourceGroupName, name, webJobName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public TriggeredJobHistory call(TriggeredJobHistoryInner inner) { + return new TriggeredJobHistoryImpl(inner, manager()); + } + }); + } + + @Override + public Observable getTriggeredWebJobHistoryAsync(String resourceGroupName, String name, String webJobName, String id) { + WebAppsInner client = this.inner(); + return client.getTriggeredWebJobHistoryAsync(resourceGroupName, name, webJobName, id) + .map(new Func1() { + @Override + public TriggeredJobHistory call(TriggeredJobHistoryInner inner) { + return new TriggeredJobHistoryImpl(inner, manager()); + } + }); + } + + @Override + public Completable runTriggeredWebJobAsync(String resourceGroupName, String name, String webJobName) { + WebAppsInner client = this.inner(); + return client.runTriggeredWebJobAsync(resourceGroupName, name, webJobName).toCompletable(); + } + + @Override + public Observable listUsagesSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listUsagesSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SiteCsmUsageQuota call(CsmUsageQuotaInner inner) { + return wrapSiteCsmUsageQuotaModel(inner); + } + }); + } + + @Override + public Observable listUsagesAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listUsagesAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SiteCsmUsageQuota call(CsmUsageQuotaInner inner) { + return new SiteCsmUsageQuotaImpl(inner, manager()); + } + }); + } + + @Override + public Observable getVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot) { + WebAppsInner client = this.inner(); + return client.getVnetConnectionSlotAsync(resourceGroupName, name, vnetName, slot) + .flatMap(new Func1>() { + @Override + public Observable call(VnetInfoInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((SiteVnetInfo)wrapSiteVnetInfoModel(inner)); + } + } + }); + } + + @Override + public Observable listVnetConnectionsSlotAsync(String resourceGroupName, String name, String slot) { + WebAppsInner client = this.inner(); + return client.listVnetConnectionsSlotAsync(resourceGroupName, name, slot) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public SiteVnetInfo call(VnetInfoInner inner) { + return wrapSiteVnetInfoModel(inner); + } + }); + } + + @Override + public Completable deleteVnetConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot) { + WebAppsInner client = this.inner(); + return client.deleteVnetConnectionSlotAsync(resourceGroupName, name, vnetName, slot).toCompletable(); + } + + @Override + public Observable listVnetConnectionsAsync(String resourceGroupName, String name) { + WebAppsInner client = this.inner(); + return client.listVnetConnectionsAsync(resourceGroupName, name) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public SiteVnetInfo call(VnetInfoInner inner) { + return new SiteVnetInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable getVnetConnectionAsync(String resourceGroupName, String name, String vnetName) { + WebAppsInner client = this.inner(); + return client.getVnetConnectionAsync(resourceGroupName, name, vnetName) + .map(new Func1() { + @Override + public SiteVnetInfo call(VnetInfoInner inner) { + return new SiteVnetInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateVnetConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope) { + WebAppsInner client = this.inner(); + return client.createOrUpdateVnetConnectionAsync(resourceGroupName, name, vnetName, connectionEnvelope) + .map(new Func1() { + @Override + public SiteVnetInfo call(VnetInfoInner inner) { + return new SiteVnetInfoImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteVnetConnectionAsync(String resourceGroupName, String name, String vnetName) { + WebAppsInner client = this.inner(); + return client.deleteVnetConnectionAsync(resourceGroupName, name, vnetName).toCompletable(); + } + + @Override + public Observable updateVnetConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfoInner connectionEnvelope) { + WebAppsInner client = this.inner(); + return client.updateVnetConnectionAsync(resourceGroupName, name, vnetName, connectionEnvelope) + .map(new Func1() { + @Override + public SiteVnetInfo call(VnetInfoInner inner) { + return new SiteVnetInfoImpl(inner, manager()); + } + }); + } + + @Override + public Observable getVnetConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot) { + WebAppsInner client = this.inner(); + return client.getVnetConnectionGatewaySlotAsync(resourceGroupName, name, vnetName, gatewayName, slot) + .flatMap(new Func1>() { + @Override + public Observable call(VnetGatewayInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((SiteVnetGateway)wrapSiteVnetGatewayModel(inner)); + } + } + }); + } + + @Override + public Observable getVnetConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName) { + WebAppsInner client = this.inner(); + return client.getVnetConnectionGatewayAsync(resourceGroupName, name, vnetName, gatewayName) + .map(new Func1() { + @Override + public SiteVnetGateway call(VnetGatewayInner inner) { + return new SiteVnetGatewayImpl(inner, manager()); + } + }); + } + + @Override + public Observable createOrUpdateVnetConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { + WebAppsInner client = this.inner(); + return client.createOrUpdateVnetConnectionGatewayAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope) + .map(new Func1() { + @Override + public SiteVnetGateway call(VnetGatewayInner inner) { + return new SiteVnetGatewayImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateVnetConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { + WebAppsInner client = this.inner(); + return client.updateVnetConnectionGatewayAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope) + .map(new Func1() { + @Override + public SiteVnetGateway call(VnetGatewayInner inner) { + return new SiteVnetGatewayImpl(inner, manager()); + } + }); + } + + @Override + public Observable getWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot) { + WebAppsInner client = this.inner(); + return client.getWebJobSlotAsync(resourceGroupName, name, webJobName, slot) + .flatMap(new Func1>() { + @Override + public Observable call(WebJobInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((WebJob)wrapWebJobModel(inner)); + } + } + }); + } + + @Override + public Observable listWebJobsSlotAsync(final String resourceGroupName, final String name, final String slot) { + WebAppsInner client = this.inner(); + return client.listWebJobsSlotAsync(resourceGroupName, name, slot) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public WebJob call(WebJobInner inner) { + return wrapWebJobModel(inner); + } + }); + } + + @Override + public Observable listWebJobsAsync(final String resourceGroupName, final String name) { + WebAppsInner client = this.inner(); + return client.listWebJobsAsync(resourceGroupName, name) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public WebJob call(WebJobInner inner) { + return new WebJobImpl(inner, manager()); + } + }); + } + + @Override + public Observable getWebJobAsync(String resourceGroupName, String name, String webJobName) { + WebAppsInner client = this.inner(); + return client.getWebJobAsync(resourceGroupName, name, webJobName) + .map(new Func1() { + @Override + public WebJob call(WebJobInner inner) { + return new WebJobImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebAppsInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebAppsInner.java new file mode 100644 index 0000000000000..291647b70c7cd --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebAppsInner.java @@ -0,0 +1,52611 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.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.appservice.v2019_08_01.CsmCopySlotEntity; +import com.microsoft.azure.management.appservice.v2019_08_01.CsmPublishingProfileOptions; +import com.microsoft.azure.management.appservice.v2019_08_01.CsmSlotEntity; +import com.microsoft.azure.management.appservice.v2019_08_01.DefaultErrorResponseException; +import com.microsoft.azure.management.appservice.v2019_08_01.DeletedAppRestoreRequest; +import com.microsoft.azure.management.appservice.v2019_08_01.MigrateMySqlRequest; +import com.microsoft.azure.management.appservice.v2019_08_01.MSDeploy; +import com.microsoft.azure.management.appservice.v2019_08_01.PremierAddOnPatchResource; +import com.microsoft.azure.management.appservice.v2019_08_01.PrivateLinkConnectionApprovalRequestResource; +import com.microsoft.azure.management.appservice.v2019_08_01.SitePatchResource; +import com.microsoft.azure.management.appservice.v2019_08_01.SnapshotRestoreRequest; +import com.microsoft.azure.management.appservice.v2019_08_01.StorageMigrationOptions; +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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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 SitePatchResource siteEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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 CsmSlotEntity 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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps getBasicPublishingCredentialsPolicies" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies") + Observable> getBasicPublishingCredentialsPolicies(@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.appservice.v2019_08_01.WebApps getFtpAllowed" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp") + Observable> getFtpAllowed(@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.appservice.v2019_08_01.WebApps updateFtpAllowed" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp") + Observable> updateFtpAllowed(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps getScmAllowed" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm") + Observable> getScmAllowed(@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.appservice.v2019_08_01.WebApps updateScmAllowed" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm") + Observable> updateScmAllowed(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps updateAzureStorageAccounts" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts") + Observable> updateAzureStorageAccounts(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body AzureStoragePropertyDictionaryResourceInner azureStorageAccounts, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps listAzureStorageAccounts" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list") + Observable> listAzureStorageAccounts(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps getAppSettingsKeyVaultReferences" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings") + Observable> getAppSettingsKeyVaultReferences(@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.appservice.v2019_08_01.WebApps getAppSettingKeyVaultReference" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}") + Observable> getAppSettingKeyVaultReference(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("appSettingKey") String appSettingKey, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps getContainerLogsZip" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download") + @Streaming + Observable> getContainerLogsZip(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps discoverBackup" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup") + Observable> discoverBackup(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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 MSDeploy 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.appservice.v2019_08_01.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 MSDeploy 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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps createOrUpdateFunctionSecret" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") + Observable> createOrUpdateFunctionSecret(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("functionName") String functionName, @Path("keyName") String keyName, @Path("subscriptionId") String subscriptionId, @Body KeyInfoInner key, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps deleteFunctionSecret" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}", method = "DELETE", hasBody = true) + Observable> deleteFunctionSecret(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("functionName") String functionName, @Path("keyName") String keyName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps listFunctionKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys") + Observable> listFunctionKeys(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps listHostKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys") + Observable> listHostKeys(@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.appservice.v2019_08_01.WebApps listSyncStatus" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus") + Observable> listSyncStatus(@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.appservice.v2019_08_01.WebApps syncFunctions" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync") + Observable> syncFunctions(@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.appservice.v2019_08_01.WebApps createOrUpdateHostSecret" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") + Observable> createOrUpdateHostSecret(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("keyType") String keyType, @Path("keyName") String keyName, @Path("subscriptionId") String subscriptionId, @Body KeyInfoInner key, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps deleteHostSecret" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}", method = "DELETE", hasBody = true) + Observable> deleteHostSecret(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("keyType") String keyType, @Path("keyName") String keyName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps getInstanceInfo" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}") + Observable> getInstanceInfo(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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 MSDeploy 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.appservice.v2019_08_01.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 MSDeploy 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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps listSiteBackups" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups") + Observable> listSiteBackups(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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 StorageMigrationOptions 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.appservice.v2019_08_01.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 StorageMigrationOptions 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.appservice.v2019_08_01.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 MigrateMySqlRequest 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.appservice.v2019_08_01.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 MigrateMySqlRequest 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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps getSwiftVirtualNetworkConnection" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") + Observable> getSwiftVirtualNetworkConnection(@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.appservice.v2019_08_01.WebApps createOrUpdateSwiftVirtualNetworkConnection" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") + Observable> createOrUpdateSwiftVirtualNetworkConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SwiftVirtualNetworkInner 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.appservice.v2019_08_01.WebApps deleteSwiftVirtualNetwork" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", method = "DELETE", hasBody = true) + Observable> deleteSwiftVirtualNetwork(@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.appservice.v2019_08_01.WebApps updateSwiftVirtualNetworkConnection" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") + Observable> updateSwiftVirtualNetworkConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SwiftVirtualNetworkInner 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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps getNetworkTraceOperation" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}") + Observable> getNetworkTraceOperation(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps startWebSiteNetworkTraceOperation" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation") + Observable> startWebSiteNetworkTraceOperation(@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.appservice.v2019_08_01.WebApps beginStartWebSiteNetworkTraceOperation" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation") + Observable> beginStartWebSiteNetworkTraceOperation(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps getNetworkTraces" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}") + Observable> getNetworkTraces(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps getNetworkTraceOperationV2" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}") + Observable> getNetworkTraceOperationV2(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps getNetworkTracesV2" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}") + Observable> getNetworkTracesV2(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps updatePremierAddOn" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") + Observable> updatePremierAddOn(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("premierAddOnName") String premierAddOnName, @Path("subscriptionId") String subscriptionId, @Body PremierAddOnPatchResource 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.appservice.v2019_08_01.WebApps getPrivateAccess" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") + Observable> getPrivateAccess(@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.appservice.v2019_08_01.WebApps putPrivateAccessVnet" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") + Observable> putPrivateAccessVnet(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body PrivateAccessInner access, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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, @Body CsmPublishingProfileOptions publishingProfileOptions, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps restoreFromBackupBlob" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob") + Observable> restoreFromBackupBlob(@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.appservice.v2019_08_01.WebApps beginRestoreFromBackupBlob" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob") + Observable> beginRestoreFromBackupBlob(@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.appservice.v2019_08_01.WebApps restoreFromDeletedApp" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp") + Observable> restoreFromDeletedApp(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body DeletedAppRestoreRequest restoreRequest, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps beginRestoreFromDeletedApp" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp") + Observable> beginRestoreFromDeletedApp(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body DeletedAppRestoreRequest restoreRequest, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps restoreSnapshot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot") + Observable> restoreSnapshot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SnapshotRestoreRequest restoreRequest, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps beginRestoreSnapshot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot") + Observable> beginRestoreSnapshot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SnapshotRestoreRequest restoreRequest, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps copyProductionSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy") + Observable> copyProductionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmCopySlotEntity copySlotEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps beginCopyProductionSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy") + Observable> beginCopyProductionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmCopySlotEntity copySlotEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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 SitePatchResource siteEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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 CsmSlotEntity 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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps updateAzureStorageAccountsSlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts") + Observable> updateAzureStorageAccountsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body AzureStoragePropertyDictionaryResourceInner azureStorageAccounts, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps listAzureStorageAccountsSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list") + Observable> listAzureStorageAccountsSlot(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps getContainerLogsZipSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download") + @Streaming + Observable> getContainerLogsZipSlot(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps discoverBackupSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup") + Observable> discoverBackupSlot(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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 MSDeploy 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.appservice.v2019_08_01.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 MSDeploy 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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps createOrUpdateFunctionSecretSlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") + Observable> createOrUpdateFunctionSecretSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("functionName") String functionName, @Path("keyName") String keyName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body KeyInfoInner key, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps deleteFunctionSecretSlot" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}", method = "DELETE", hasBody = true) + Observable> deleteFunctionSecretSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("functionName") String functionName, @Path("keyName") String keyName, @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.appservice.v2019_08_01.WebApps listFunctionKeysSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys") + Observable> listFunctionKeysSlot(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps listHostKeysSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys") + Observable> listHostKeysSlot(@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.appservice.v2019_08_01.WebApps listSyncStatusSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus") + Observable> listSyncStatusSlot(@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.appservice.v2019_08_01.WebApps syncFunctionsSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync") + Observable> syncFunctionsSlot(@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.appservice.v2019_08_01.WebApps createOrUpdateHostSecretSlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") + Observable> createOrUpdateHostSecretSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("keyType") String keyType, @Path("keyName") String keyName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body KeyInfoInner key, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps deleteHostSecretSlot" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}", method = "DELETE", hasBody = true) + Observable> deleteHostSecretSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("keyType") String keyType, @Path("keyName") String keyName, @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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps getInstanceInfoSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}") + Observable> getInstanceInfoSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("instanceId") String instanceId, @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.appservice.v2019_08_01.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.appservice.v2019_08_01.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 MSDeploy 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.appservice.v2019_08_01.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 MSDeploy 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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps listSiteBackupsSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups") + Observable> listSiteBackupsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps getSwiftVirtualNetworkConnectionSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") + Observable> getSwiftVirtualNetworkConnectionSlot(@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.appservice.v2019_08_01.WebApps createOrUpdateSwiftVirtualNetworkConnectionSlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") + Observable> createOrUpdateSwiftVirtualNetworkConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SwiftVirtualNetworkInner 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.appservice.v2019_08_01.WebApps deleteSwiftVirtualNetworkSlot" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", method = "DELETE", hasBody = true) + Observable> deleteSwiftVirtualNetworkSlot(@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.appservice.v2019_08_01.WebApps updateSwiftVirtualNetworkConnectionSlot" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") + Observable> updateSwiftVirtualNetworkConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SwiftVirtualNetworkInner 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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps getNetworkTraceOperationSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}") + Observable> getNetworkTraceOperationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps startWebSiteNetworkTraceOperationSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation") + Observable> startWebSiteNetworkTraceOperationSlot(@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.appservice.v2019_08_01.WebApps beginStartWebSiteNetworkTraceOperationSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation") + Observable> beginStartWebSiteNetworkTraceOperationSlot(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps getNetworkTracesSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}") + Observable> getNetworkTracesSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps getNetworkTraceOperationSlotV2" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}") + Observable> getNetworkTraceOperationSlotV2(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps getNetworkTracesSlotV2" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}") + Observable> getNetworkTracesSlotV2(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps updatePremierAddOnSlot" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") + Observable> updatePremierAddOnSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("premierAddOnName") String premierAddOnName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body PremierAddOnPatchResource 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.appservice.v2019_08_01.WebApps getPrivateAccessSlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") + Observable> getPrivateAccessSlot(@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.appservice.v2019_08_01.WebApps putPrivateAccessVnetSlot" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") + Observable> putPrivateAccessVnetSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body PrivateAccessInner access, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps getPrivateEndpointConnection" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") + Observable> getPrivateEndpointConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps approveOrRejectPrivateEndpointConnection" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") + Observable> approveOrRejectPrivateEndpointConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Path("subscriptionId") String subscriptionId, @Body PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps beginApproveOrRejectPrivateEndpointConnection" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") + Observable> beginApproveOrRejectPrivateEndpointConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Path("subscriptionId") String subscriptionId, @Body PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps deletePrivateEndpointConnection" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}", method = "DELETE", hasBody = true) + Observable> deletePrivateEndpointConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps beginDeletePrivateEndpointConnection" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}", method = "DELETE", hasBody = true) + Observable> beginDeletePrivateEndpointConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps getPrivateLinkResources" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources") + Observable> getPrivateLinkResources(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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, @Body CsmPublishingProfileOptions publishingProfileOptions, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps restoreFromBackupBlobSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob") + Observable> restoreFromBackupBlobSlot(@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.appservice.v2019_08_01.WebApps beginRestoreFromBackupBlobSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob") + Observable> beginRestoreFromBackupBlobSlot(@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.appservice.v2019_08_01.WebApps restoreFromDeletedAppSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp") + Observable> restoreFromDeletedAppSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body DeletedAppRestoreRequest restoreRequest, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps beginRestoreFromDeletedAppSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp") + Observable> beginRestoreFromDeletedAppSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body DeletedAppRestoreRequest restoreRequest, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps restoreSnapshotSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot") + Observable> restoreSnapshotSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SnapshotRestoreRequest restoreRequest, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps beginRestoreSnapshotSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot") + Observable> beginRestoreSnapshotSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SnapshotRestoreRequest restoreRequest, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps copySlotSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy") + Observable> copySlotSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmCopySlotEntity copySlotEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.WebApps beginCopySlotSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy") + Observable> beginCopySlotSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmCopySlotEntity copySlotEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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 CsmSlotEntity 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.appservice.v2019_08_01.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 CsmSlotEntity 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.appservice.v2019_08_01.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 CsmSlotEntity 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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps listSnapshotsFromDRSecondarySlot" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr") + Observable> listSnapshotsFromDRSecondarySlot(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps startNetworkTraceSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace") + Observable> startNetworkTraceSlot(@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.appservice.v2019_08_01.WebApps beginStartNetworkTraceSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace") + Observable> beginStartNetworkTraceSlot(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps stopNetworkTraceSlot" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace") + Observable> stopNetworkTraceSlot(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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 CsmSlotEntity 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.appservice.v2019_08_01.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 CsmSlotEntity 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.appservice.v2019_08_01.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 CsmSlotEntity 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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps listSnapshotsFromDRSecondary" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr") + Observable> listSnapshotsFromDRSecondary(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps startNetworkTrace" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace") + Observable> startNetworkTrace(@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.appservice.v2019_08_01.WebApps beginStartNetworkTrace" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace") + Observable> beginStartNetworkTrace(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps stopNetworkTrace" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace") + Observable> stopNetworkTrace(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps listSiteBackupsNext" }) + @GET + Observable> listSiteBackupsNext(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps listSiteBackupsSlotNext" }) + @GET + Observable> listSiteBackupsSlotNext(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps listSnapshotsFromDRSecondarySlotNext" }) + @GET + Observable> listSnapshotsFromDRSecondarySlotNext(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps listSnapshotsFromDRSecondaryNext" }) + @GET + Observable> listSnapshotsFromDRSecondaryNext(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebApps listWebJobsNext" }) + @GET + Observable> listWebJobsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get all apps for a subscription. + * Description for Get all apps for a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean includeSlots = null; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), includeSlots, this.client.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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), includeSlots, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the details of a web, mobile, or API app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteEnvelope); + Observable> observable = service.createOrUpdate(resourceGroupName, name, this.client.subscriptionId(), siteEnvelope, this.client.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteEnvelope); + return service.beginCreateOrUpdate(resourceGroupName, name, this.client.subscriptionId(), siteEnvelope, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean deleteMetrics = null; + final Boolean deleteEmptyServerFarm = null; + return service.delete(resourceGroupName, name, this.client.subscriptionId(), deleteMetrics, deleteEmptyServerFarm, this.client.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. + * Description for 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 false if you want to keep empty App Service plan. By default, empty App Service plan is deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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) { + deleteWithServiceResponseAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm).toBlocking().single().body(); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Description for 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 false if you want to keep empty App Service plan. By default, empty App Service plan is deleted. + * @param serviceCallback 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, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm), serviceCallback); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Description for 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 false if you want to keep empty App Service plan. By default, empty App Service plan is deleted. + * @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) { + return deleteWithServiceResponseAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm).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. + * Description for 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 false if you want to keep empty App Service plan. By default, empty App Service plan is deleted. + * @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) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(resourceGroupName, name, this.client.subscriptionId(), deleteMetrics, deleteEmptyServerFarm, this.client.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 DefaultErrorResponseException, 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(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Description for 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 DefaultErrorResponseException 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, SitePatchResource 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. + * Description for 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, SitePatchResource 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. + * Description for 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, SitePatchResource 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. + * Description for 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, SitePatchResource 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteEnvelope); + return service.update(resourceGroupName, name, this.client.subscriptionId(), siteEnvelope, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Analyze a custom hostname. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String hostName = null; + return service.analyzeCustomHostname(resourceGroupName, name, this.client.subscriptionId(), hostName, this.client.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.analyzeCustomHostname(resourceGroupName, name, this.client.subscriptionId(), hostName, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Applies the configuration settings from the target slot onto the current slot. + * Description for 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 DefaultErrorResponseException 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, CsmSlotEntity slotSwapEntity) { + applySlotConfigToProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).toBlocking().single().body(); + } + + /** + * Applies the configuration settings from the target slot onto the current slot. + * Description for 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, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(applySlotConfigToProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity), serviceCallback); + } + + /** + * Applies the configuration settings from the target slot onto the current slot. + * Description for 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, CsmSlotEntity 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. + * Description for 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, CsmSlotEntity 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(slotSwapEntity); + return service.applySlotConfigToProduction(resourceGroupName, name, this.client.subscriptionId(), slotSwapEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a backup of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(request); + return service.backup(resourceGroupName, name, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = backupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse backupDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets existing backups of an app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listBackups(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBackupsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBackupsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a backup of an app by its ID. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getBackupStatus(resourceGroupName, name, backupId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getBackupStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getBackupStatusDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a backup of an app by its ID. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteBackup(resourceGroupName, name, backupId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(request); + return service.listBackupStatusSecrets(resourceGroupName, name, backupId, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listBackupStatusSecretsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listBackupStatusSecretsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void restore(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + restoreWithServiceResponseAsync(resourceGroupName, name, backupId, request).toBlocking().last().body(); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Description for 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). + * Description for 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, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(request); + Observable> observable = service.restore(resourceGroupName, name, backupId, this.client.subscriptionId(), request, this.client.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). + * Description for 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginRestore(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + beginRestoreWithServiceResponseAsync(resourceGroupName, name, backupId, request).toBlocking().single().body(); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Description for 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). + * Description for 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 {@link ServiceResponse} object if successful. + */ + public Observable beginRestoreAsync(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + return beginRestoreWithServiceResponseAsync(resourceGroupName, name, backupId, request).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Description for 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 {@link ServiceResponse} object if successful. + */ + 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(request); + return service.beginRestore(resourceGroupName, name, backupId, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRestoreDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRestoreDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CsmPublishingCredentialsPoliciesCollectionInner object if successful. + */ + public CsmPublishingCredentialsPoliciesCollectionInner getBasicPublishingCredentialsPolicies(String resourceGroupName, String name) { + return getBasicPublishingCredentialsPoliciesWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @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 getBasicPublishingCredentialsPoliciesAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getBasicPublishingCredentialsPoliciesWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @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 CsmPublishingCredentialsPoliciesCollectionInner object + */ + public Observable getBasicPublishingCredentialsPoliciesAsync(String resourceGroupName, String name) { + return getBasicPublishingCredentialsPoliciesWithServiceResponseAsync(resourceGroupName, name).map(new Func1, CsmPublishingCredentialsPoliciesCollectionInner>() { + @Override + public CsmPublishingCredentialsPoliciesCollectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @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 CsmPublishingCredentialsPoliciesCollectionInner object + */ + public Observable> getBasicPublishingCredentialsPoliciesWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getBasicPublishingCredentialsPolicies(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getBasicPublishingCredentialsPoliciesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getBasicPublishingCredentialsPoliciesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Returns whether FTP is allowed on the site or not. + * Description for Returns whether FTP is allowed on the site or not. + * + * @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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CsmPublishingCredentialsPoliciesEntityInner object if successful. + */ + public CsmPublishingCredentialsPoliciesEntityInner getFtpAllowed(String resourceGroupName, String name) { + return getFtpAllowedWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Returns whether FTP is allowed on the site or not. + * Description for Returns whether FTP is allowed on the site or not. + * + * @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 getFtpAllowedAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getFtpAllowedWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Returns whether FTP is allowed on the site or not. + * Description for Returns whether FTP is allowed on the site or not. + * + * @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 CsmPublishingCredentialsPoliciesEntityInner object + */ + public Observable getFtpAllowedAsync(String resourceGroupName, String name) { + return getFtpAllowedWithServiceResponseAsync(resourceGroupName, name).map(new Func1, CsmPublishingCredentialsPoliciesEntityInner>() { + @Override + public CsmPublishingCredentialsPoliciesEntityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Returns whether FTP is allowed on the site or not. + * Description for Returns whether FTP is allowed on the site or not. + * + * @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 CsmPublishingCredentialsPoliciesEntityInner object + */ + public Observable> getFtpAllowedWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getFtpAllowed(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getFtpAllowedDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getFtpAllowedDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates whether FTP is allowed on the site or not. + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity the CsmPublishingCredentialsPoliciesEntityInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CsmPublishingCredentialsPoliciesEntityInner object if successful. + */ + public CsmPublishingCredentialsPoliciesEntityInner updateFtpAllowed(String resourceGroupName, String name, CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + return updateFtpAllowedWithServiceResponseAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity).toBlocking().single().body(); + } + + /** + * Updates whether FTP is allowed on the site or not. + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity the CsmPublishingCredentialsPoliciesEntityInner value + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateFtpAllowedAsync(String resourceGroupName, String name, CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateFtpAllowedWithServiceResponseAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity), serviceCallback); + } + + /** + * Updates whether FTP is allowed on the site or not. + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity the CsmPublishingCredentialsPoliciesEntityInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CsmPublishingCredentialsPoliciesEntityInner object + */ + public Observable updateFtpAllowedAsync(String resourceGroupName, String name, CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + return updateFtpAllowedWithServiceResponseAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity).map(new Func1, CsmPublishingCredentialsPoliciesEntityInner>() { + @Override + public CsmPublishingCredentialsPoliciesEntityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates whether FTP is allowed on the site or not. + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity the CsmPublishingCredentialsPoliciesEntityInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CsmPublishingCredentialsPoliciesEntityInner object + */ + public Observable> updateFtpAllowedWithServiceResponseAsync(String resourceGroupName, String name, CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + if (resourceGroupName == null) { + throw new 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 (csmPublishingAccessPoliciesEntity == null) { + throw new IllegalArgumentException("Parameter csmPublishingAccessPoliciesEntity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(csmPublishingAccessPoliciesEntity); + return service.updateFtpAllowed(resourceGroupName, name, this.client.subscriptionId(), csmPublishingAccessPoliciesEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateFtpAllowedDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateFtpAllowedDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Returns whether Scm basic auth is allowed on the site or not. + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CsmPublishingCredentialsPoliciesEntityInner object if successful. + */ + public CsmPublishingCredentialsPoliciesEntityInner getScmAllowed(String resourceGroupName, String name) { + return getScmAllowedWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Returns whether Scm basic auth is allowed on the site or not. + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @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 getScmAllowedAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getScmAllowedWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Returns whether Scm basic auth is allowed on the site or not. + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @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 CsmPublishingCredentialsPoliciesEntityInner object + */ + public Observable getScmAllowedAsync(String resourceGroupName, String name) { + return getScmAllowedWithServiceResponseAsync(resourceGroupName, name).map(new Func1, CsmPublishingCredentialsPoliciesEntityInner>() { + @Override + public CsmPublishingCredentialsPoliciesEntityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Returns whether Scm basic auth is allowed on the site or not. + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @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 CsmPublishingCredentialsPoliciesEntityInner object + */ + public Observable> getScmAllowedWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getScmAllowed(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getScmAllowedDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getScmAllowedDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates whether user publishing credentials are allowed on the site or not. + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity the CsmPublishingCredentialsPoliciesEntityInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the CsmPublishingCredentialsPoliciesEntityInner object if successful. + */ + public CsmPublishingCredentialsPoliciesEntityInner updateScmAllowed(String resourceGroupName, String name, CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + return updateScmAllowedWithServiceResponseAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity).toBlocking().single().body(); + } + + /** + * Updates whether user publishing credentials are allowed on the site or not. + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity the CsmPublishingCredentialsPoliciesEntityInner value + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateScmAllowedAsync(String resourceGroupName, String name, CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateScmAllowedWithServiceResponseAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity), serviceCallback); + } + + /** + * Updates whether user publishing credentials are allowed on the site or not. + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity the CsmPublishingCredentialsPoliciesEntityInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CsmPublishingCredentialsPoliciesEntityInner object + */ + public Observable updateScmAllowedAsync(String resourceGroupName, String name, CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + return updateScmAllowedWithServiceResponseAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity).map(new Func1, CsmPublishingCredentialsPoliciesEntityInner>() { + @Override + public CsmPublishingCredentialsPoliciesEntityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates whether user publishing credentials are allowed on the site or not. + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity the CsmPublishingCredentialsPoliciesEntityInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CsmPublishingCredentialsPoliciesEntityInner object + */ + public Observable> updateScmAllowedWithServiceResponseAsync(String resourceGroupName, String name, CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + if (resourceGroupName == null) { + throw new 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 (csmPublishingAccessPoliciesEntity == null) { + throw new IllegalArgumentException("Parameter csmPublishingAccessPoliciesEntity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(csmPublishingAccessPoliciesEntity); + return service.updateScmAllowed(resourceGroupName, name, this.client.subscriptionId(), csmPublishingAccessPoliciesEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateScmAllowedDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateScmAllowedDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List the configurations of an app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listConfigurations(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listConfigurationsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listConfigurationsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Replaces the application settings of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(appSettings); + return service.updateApplicationSettings(resourceGroupName, name, this.client.subscriptionId(), appSettings, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the application settings of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listApplicationSettings(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listApplicationSettingsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listApplicationSettingsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the Authentication / Authorization settings associated with web app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteAuthSettings); + return service.updateAuthSettings(resourceGroupName, name, this.client.subscriptionId(), siteAuthSettings, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the Authentication/Authorization settings of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getAuthSettings(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getAuthSettingsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getAuthSettingsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the Azure storage account configurations of an app. + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AzureStoragePropertyDictionaryResourceInner object if successful. + */ + public AzureStoragePropertyDictionaryResourceInner updateAzureStorageAccounts(String resourceGroupName, String name, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts) { + return updateAzureStorageAccountsWithServiceResponseAsync(resourceGroupName, name, azureStorageAccounts).toBlocking().single().body(); + } + + /** + * Updates the Azure storage account configurations of an app. + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param azureStorageAccounts Azure storage accounts 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 updateAzureStorageAccountsAsync(String resourceGroupName, String name, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateAzureStorageAccountsWithServiceResponseAsync(resourceGroupName, name, azureStorageAccounts), serviceCallback); + } + + /** + * Updates the Azure storage account configurations of an app. + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureStoragePropertyDictionaryResourceInner object + */ + public Observable updateAzureStorageAccountsAsync(String resourceGroupName, String name, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts) { + return updateAzureStorageAccountsWithServiceResponseAsync(resourceGroupName, name, azureStorageAccounts).map(new Func1, AzureStoragePropertyDictionaryResourceInner>() { + @Override + public AzureStoragePropertyDictionaryResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Azure storage account configurations of an app. + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureStoragePropertyDictionaryResourceInner object + */ + public Observable> updateAzureStorageAccountsWithServiceResponseAsync(String resourceGroupName, String name, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts) { + if (resourceGroupName == null) { + throw new 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 (azureStorageAccounts == null) { + throw new IllegalArgumentException("Parameter azureStorageAccounts is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(azureStorageAccounts); + return service.updateAzureStorageAccounts(resourceGroupName, name, this.client.subscriptionId(), azureStorageAccounts, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateAzureStorageAccountsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateAzureStorageAccountsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the Azure storage account configurations of an app. + * Description for Gets the Azure storage account 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AzureStoragePropertyDictionaryResourceInner object if successful. + */ + public AzureStoragePropertyDictionaryResourceInner listAzureStorageAccounts(String resourceGroupName, String name) { + return listAzureStorageAccountsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the Azure storage account configurations of an app. + * Description for Gets the Azure storage account 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 listAzureStorageAccountsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listAzureStorageAccountsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the Azure storage account configurations of an app. + * Description for Gets the Azure storage account 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 AzureStoragePropertyDictionaryResourceInner object + */ + public Observable listAzureStorageAccountsAsync(String resourceGroupName, String name) { + return listAzureStorageAccountsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, AzureStoragePropertyDictionaryResourceInner>() { + @Override + public AzureStoragePropertyDictionaryResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Azure storage account configurations of an app. + * Description for Gets the Azure storage account 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 AzureStoragePropertyDictionaryResourceInner object + */ + public Observable> listAzureStorageAccountsWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listAzureStorageAccounts(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listAzureStorageAccountsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listAzureStorageAccountsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the backup configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(request); + return service.updateBackupConfiguration(resourceGroupName, name, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateBackupConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateBackupConfigurationDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes the backup configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteBackupConfiguration(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteBackupConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteBackupConfigurationDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the backup configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getBackupConfiguration(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getBackupConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getBackupConfigurationDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the config reference app settings and status of an app. + * Description for Gets the config reference app settings and status 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the KeyVaultReferenceCollectionInner object if successful. + */ + public KeyVaultReferenceCollectionInner getAppSettingsKeyVaultReferences(String resourceGroupName, String name) { + return getAppSettingsKeyVaultReferencesWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the config reference app settings and status of an app. + * Description for Gets the config reference app settings and status 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 getAppSettingsKeyVaultReferencesAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getAppSettingsKeyVaultReferencesWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the config reference app settings and status of an app. + * Description for Gets the config reference app settings and status 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 KeyVaultReferenceCollectionInner object + */ + public Observable getAppSettingsKeyVaultReferencesAsync(String resourceGroupName, String name) { + return getAppSettingsKeyVaultReferencesWithServiceResponseAsync(resourceGroupName, name).map(new Func1, KeyVaultReferenceCollectionInner>() { + @Override + public KeyVaultReferenceCollectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the config reference app settings and status of an app. + * Description for Gets the config reference app settings and status 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 KeyVaultReferenceCollectionInner object + */ + public Observable> getAppSettingsKeyVaultReferencesWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getAppSettingsKeyVaultReferences(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getAppSettingsKeyVaultReferencesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getAppSettingsKeyVaultReferencesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the config reference and status of an app. + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the KeyVaultReferenceResourceInner object if successful. + */ + public KeyVaultReferenceResourceInner getAppSettingKeyVaultReference(String resourceGroupName, String name, String appSettingKey) { + return getAppSettingKeyVaultReferenceWithServiceResponseAsync(resourceGroupName, name, appSettingKey).toBlocking().single().body(); + } + + /** + * Gets the config reference and status of an app. + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key 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 getAppSettingKeyVaultReferenceAsync(String resourceGroupName, String name, String appSettingKey, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getAppSettingKeyVaultReferenceWithServiceResponseAsync(resourceGroupName, name, appSettingKey), serviceCallback); + } + + /** + * Gets the config reference and status of an app. + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the KeyVaultReferenceResourceInner object + */ + public Observable getAppSettingKeyVaultReferenceAsync(String resourceGroupName, String name, String appSettingKey) { + return getAppSettingKeyVaultReferenceWithServiceResponseAsync(resourceGroupName, name, appSettingKey).map(new Func1, KeyVaultReferenceResourceInner>() { + @Override + public KeyVaultReferenceResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the config reference and status of an app. + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the KeyVaultReferenceResourceInner object + */ + public Observable> getAppSettingKeyVaultReferenceWithServiceResponseAsync(String resourceGroupName, String name, String appSettingKey) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (appSettingKey == null) { + throw new IllegalArgumentException("Parameter appSettingKey is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getAppSettingKeyVaultReference(resourceGroupName, name, appSettingKey, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getAppSettingKeyVaultReferenceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getAppSettingKeyVaultReferenceDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Replaces the connection strings of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionStrings); + return service.updateConnectionStrings(resourceGroupName, name, this.client.subscriptionId(), connectionStrings, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateConnectionStringsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateConnectionStringsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the connection strings of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listConnectionStrings(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listConnectionStringsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listConnectionStringsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the logging configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getDiagnosticLogsConfiguration(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDiagnosticLogsConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDiagnosticLogsConfigurationDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the logging configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteLogsConfig); + return service.updateDiagnosticLogsConfig(resourceGroupName, name, this.client.subscriptionId(), siteLogsConfig, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Replaces the metadata of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(metadata); + return service.updateMetadata(resourceGroupName, name, this.client.subscriptionId(), metadata, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the metadata of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listMetadata(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listMetadataDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listMetadataDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.listPublishingCredentials(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginListPublishingCredentials(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListPublishingCredentialsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListPublishingCredentialsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the Push settings associated with web app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(pushSettings); + return service.updateSitePushSettings(resourceGroupName, name, this.client.subscriptionId(), pushSettings, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the Push settings associated with web app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSitePushSettings(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listSitePushSettingsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listSitePushSettingsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the names of app settings and connection strings that stick to the slot (not swapped). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSlotConfigurationNames(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listSlotConfigurationNamesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listSlotConfigurationNamesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the names of application settings and connection string that remain with the slot during swap operation. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(slotConfigNames); + return service.updateSlotConfigurationNames(resourceGroupName, name, this.client.subscriptionId(), slotConfigNames, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getConfiguration(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getConfigurationDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteConfig); + return service.createOrUpdateConfiguration(resourceGroupName, name, this.client.subscriptionId(), siteConfig, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteConfig); + return service.updateConfiguration(resourceGroupName, name, this.client.subscriptionId(), siteConfig, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listConfigurationSnapshotInfo(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listConfigurationSnapshotInfoDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listConfigurationSnapshotInfoDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a snapshot of the configuration of an app at a previous point in time. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getConfigurationSnapshot(resourceGroupName, name, snapshotId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getConfigurationSnapshotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getConfigurationSnapshotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Reverts the configuration of an app to a previous snapshot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.recoverSiteConfigurationSnapshot(resourceGroupName, name, snapshotId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = recoverSiteConfigurationSnapshotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse recoverSiteConfigurationSnapshotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the last lines of docker logs for the given site. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getWebSiteContainerLogs(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = 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. + * Description for 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 getContainerLogsZip(String resourceGroupName, String name) { + return getContainerLogsZipWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the ZIP archived docker log files for the given site. + * Description for 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 getContainerLogsZipAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getContainerLogsZipWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the ZIP archived docker log files for the given site. + * Description for 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 getContainerLogsZipAsync(String resourceGroupName, String name) { + return getContainerLogsZipWithServiceResponseAsync(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. + * Description for 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> getContainerLogsZipWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getContainerLogsZip(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getContainerLogsZipDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getContainerLogsZipDelegate(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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listContinuousWebJobs(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listContinuousWebJobsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listContinuousWebJobsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a continuous web job by its ID for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getContinuousWebJob(resourceGroupName, name, webJobName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getContinuousWebJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getContinuousWebJobDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a continuous web job by its ID for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteContinuousWebJob(resourceGroupName, name, webJobName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteContinuousWebJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteContinuousWebJobDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Start a continuous web job for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.startContinuousWebJob(resourceGroupName, name, webJobName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = startContinuousWebJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse startContinuousWebJobDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Stop a continuous web job for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.stopContinuousWebJob(resourceGroupName, name, webJobName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = stopContinuousWebJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse stopContinuousWebJobDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List deployments for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listDeployments(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDeploymentsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDeploymentsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a deployment by its ID for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getDeployment(resourceGroupName, name, id, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Create a deployment for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(deployment); + return service.createDeployment(resourceGroupName, name, id, this.client.subscriptionId(), deployment, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a deployment by its ID for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteDeployment(resourceGroupName, name, id, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List deployment log for specific deployment for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listDeploymentLog(resourceGroupName, name, id, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDeploymentLogDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDeploymentLogDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * + * @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 DefaultErrorResponseException 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 discoverBackup(String resourceGroupName, String name, RestoreRequestInner request) { + return discoverBackupWithServiceResponseAsync(resourceGroupName, name, request).toBlocking().single().body(); + } + + /** + * Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * + * @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 discoverBackupAsync(String resourceGroupName, String name, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(discoverBackupWithServiceResponseAsync(resourceGroupName, name, request), serviceCallback); + } + + /** + * Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * + * @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 discoverBackupAsync(String resourceGroupName, String name, RestoreRequestInner request) { + return discoverBackupWithServiceResponseAsync(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. Use this to get information about the databases stored in a backup. + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * + * @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> discoverBackupWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(request); + return service.discoverBackup(resourceGroupName, name, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = discoverBackupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse discoverBackupDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listDomainOwnershipIdentifiers(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDomainOwnershipIdentifiersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDomainOwnershipIdentifiersDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get domain ownership identifier for web app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getDomainOwnershipIdentifier(resourceGroupName, name, domainOwnershipIdentifierName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDomainOwnershipIdentifierDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDomainOwnershipIdentifierDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(domainOwnershipIdentifier); + return service.createOrUpdateDomainOwnershipIdentifier(resourceGroupName, name, domainOwnershipIdentifierName, this.client.subscriptionId(), domainOwnershipIdentifier, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a domain ownership identifier for a web app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteDomainOwnershipIdentifier(resourceGroupName, name, domainOwnershipIdentifierName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDomainOwnershipIdentifierDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDomainOwnershipIdentifierDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(domainOwnershipIdentifier); + return service.updateDomainOwnershipIdentifier(resourceGroupName, name, domainOwnershipIdentifierName, this.client.subscriptionId(), domainOwnershipIdentifier, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the status of the last MSDeploy operation. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getMSDeployStatus(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMSDeployStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMSDeployStatusDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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 DefaultErrorResponseException 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, MSDeploy mSDeploy) { + return createMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, mSDeploy).toBlocking().last().body(); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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, MSDeploy mSDeploy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, mSDeploy), serviceCallback); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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, MSDeploy 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. + * Description for 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, MSDeploy 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(mSDeploy); + Observable> observable = service.createMSDeployOperation(resourceGroupName, name, this.client.subscriptionId(), mSDeploy, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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 DefaultErrorResponseException 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, MSDeploy mSDeploy) { + return beginCreateMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, mSDeploy).toBlocking().single().body(); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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, MSDeploy mSDeploy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, mSDeploy), serviceCallback); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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, MSDeploy 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. + * Description for 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, MSDeploy 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(mSDeploy); + return service.beginCreateMSDeployOperation(resourceGroupName, name, this.client.subscriptionId(), mSDeploy, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .register(409, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getMSDeployLog(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMSDeployLogDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMSDeployLogDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List the functions for a web site, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listFunctions(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listFunctionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listFunctionsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Fetch a short lived token that can be exchanged for a master key. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getFunctionsAdminToken(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getFunctionsAdminTokenDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getFunctionsAdminTokenDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get function information by its ID for web site, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getFunction(resourceGroupName, name, functionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getFunctionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getFunctionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Create function for web site, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(functionEnvelope); + Observable> observable = service.createFunction(resourceGroupName, name, functionName, this.client.subscriptionId(), functionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create function for web site, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(functionEnvelope); + return service.beginCreateFunction(resourceGroupName, name, functionName, this.client.subscriptionId(), functionEnvelope, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a function for web site, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteFunction(resourceGroupName, name, functionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteFunctionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteFunctionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Add or update a function secret. + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param key The key to create or update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the KeyInfoInner object if successful. + */ + public KeyInfoInner createOrUpdateFunctionSecret(String resourceGroupName, String name, String functionName, String keyName, KeyInfoInner key) { + return createOrUpdateFunctionSecretWithServiceResponseAsync(resourceGroupName, name, functionName, keyName, key).toBlocking().single().body(); + } + + /** + * Add or update a function secret. + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param key The key to create or update + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateFunctionSecretAsync(String resourceGroupName, String name, String functionName, String keyName, KeyInfoInner key, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateFunctionSecretWithServiceResponseAsync(resourceGroupName, name, functionName, keyName, key), serviceCallback); + } + + /** + * Add or update a function secret. + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param key The key to create or update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the KeyInfoInner object + */ + public Observable createOrUpdateFunctionSecretAsync(String resourceGroupName, String name, String functionName, String keyName, KeyInfoInner key) { + return createOrUpdateFunctionSecretWithServiceResponseAsync(resourceGroupName, name, functionName, keyName, key).map(new Func1, KeyInfoInner>() { + @Override + public KeyInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Add or update a function secret. + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param key The key to create or update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the KeyInfoInner object + */ + public Observable> createOrUpdateFunctionSecretWithServiceResponseAsync(String resourceGroupName, String name, String functionName, String keyName, KeyInfoInner key) { + if (resourceGroupName == null) { + throw new 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 (keyName == null) { + throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (key == null) { + throw new IllegalArgumentException("Parameter key is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(key); + return service.createOrUpdateFunctionSecret(resourceGroupName, name, functionName, keyName, this.client.subscriptionId(), key, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateFunctionSecretDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateFunctionSecretDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a function secret. + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteFunctionSecret(String resourceGroupName, String name, String functionName, String keyName) { + deleteFunctionSecretWithServiceResponseAsync(resourceGroupName, name, functionName, keyName).toBlocking().single().body(); + } + + /** + * Delete a function secret. + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteFunctionSecretAsync(String resourceGroupName, String name, String functionName, String keyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteFunctionSecretWithServiceResponseAsync(resourceGroupName, name, functionName, keyName), serviceCallback); + } + + /** + * Delete a function secret. + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteFunctionSecretAsync(String resourceGroupName, String name, String functionName, String keyName) { + return deleteFunctionSecretWithServiceResponseAsync(resourceGroupName, name, functionName, keyName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a function secret. + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteFunctionSecretWithServiceResponseAsync(String resourceGroupName, String name, String functionName, String keyName) { + if (resourceGroupName == null) { + throw new 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 (keyName == null) { + throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteFunctionSecret(resourceGroupName, name, functionName, keyName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteFunctionSecretDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteFunctionSecretDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get function keys for a function in a web site, or a deployment slot. + * Description for Get function keys 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 DefaultErrorResponseException 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 listFunctionKeys(String resourceGroupName, String name, String functionName) { + return listFunctionKeysWithServiceResponseAsync(resourceGroupName, name, functionName).toBlocking().single().body(); + } + + /** + * Get function keys for a function in a web site, or a deployment slot. + * Description for Get function keys 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 listFunctionKeysAsync(String resourceGroupName, String name, String functionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listFunctionKeysWithServiceResponseAsync(resourceGroupName, name, functionName), serviceCallback); + } + + /** + * Get function keys for a function in a web site, or a deployment slot. + * Description for Get function keys 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 StringDictionaryInner object + */ + public Observable listFunctionKeysAsync(String resourceGroupName, String name, String functionName) { + return listFunctionKeysWithServiceResponseAsync(resourceGroupName, name, functionName).map(new Func1, StringDictionaryInner>() { + @Override + public StringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get function keys for a function in a web site, or a deployment slot. + * Description for Get function keys 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 StringDictionaryInner object + */ + public Observable> listFunctionKeysWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listFunctionKeys(resourceGroupName, name, functionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listFunctionKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listFunctionKeysDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get function secrets for a function in a web site, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listFunctionSecrets(resourceGroupName, name, functionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listFunctionSecretsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listFunctionSecretsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get host secrets for a function app. + * Description for Get host secrets for a function app. + * + * @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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HostKeysInner object if successful. + */ + public HostKeysInner listHostKeys(String resourceGroupName, String name) { + return listHostKeysWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Get host secrets for a function app. + * Description for Get host secrets for a function app. + * + * @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 listHostKeysAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listHostKeysWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Get host secrets for a function app. + * Description for Get host secrets for a function app. + * + * @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 HostKeysInner object + */ + public Observable listHostKeysAsync(String resourceGroupName, String name) { + return listHostKeysWithServiceResponseAsync(resourceGroupName, name).map(new Func1, HostKeysInner>() { + @Override + public HostKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get host secrets for a function app. + * Description for Get host secrets for a function app. + * + * @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 HostKeysInner object + */ + public Observable> listHostKeysWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listHostKeys(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listHostKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listHostKeysDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * This is to allow calling via powershell and ARM template. + * Description for 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void listSyncStatus(String resourceGroupName, String name) { + listSyncStatusWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * This is to allow calling via powershell and ARM template. + * Description for 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 listSyncStatusAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listSyncStatusWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * This is to allow calling via powershell and ARM template. + * Description for 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 {@link ServiceResponse} object if successful. + */ + public Observable listSyncStatusAsync(String resourceGroupName, String name) { + return listSyncStatusWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * This is to allow calling via powershell and ARM template. + * Description for 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 {@link ServiceResponse} object if successful. + */ + public Observable> listSyncStatusWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSyncStatus(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listSyncStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listSyncStatusDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Syncs function trigger metadata to the management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void syncFunctions(String resourceGroupName, String name) { + syncFunctionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Syncs function trigger metadata to the management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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 syncFunctionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(syncFunctionsWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Syncs function trigger metadata to the management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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 syncFunctionsAsync(String resourceGroupName, String name) { + return syncFunctionsWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Syncs function trigger metadata to the management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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> syncFunctionsWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.syncFunctions(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = syncFunctionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse syncFunctionsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Add or update a host level secret. + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param key The key to create or update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the KeyInfoInner object if successful. + */ + public KeyInfoInner createOrUpdateHostSecret(String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key) { + return createOrUpdateHostSecretWithServiceResponseAsync(resourceGroupName, name, keyType, keyName, key).toBlocking().single().body(); + } + + /** + * Add or update a host level secret. + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param key The key to create or update + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateHostSecretAsync(String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateHostSecretWithServiceResponseAsync(resourceGroupName, name, keyType, keyName, key), serviceCallback); + } + + /** + * Add or update a host level secret. + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param key The key to create or update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the KeyInfoInner object + */ + public Observable createOrUpdateHostSecretAsync(String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key) { + return createOrUpdateHostSecretWithServiceResponseAsync(resourceGroupName, name, keyType, keyName, key).map(new Func1, KeyInfoInner>() { + @Override + public KeyInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Add or update a host level secret. + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param key The key to create or update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the KeyInfoInner object + */ + public Observable> createOrUpdateHostSecretWithServiceResponseAsync(String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (keyType == null) { + throw new IllegalArgumentException("Parameter keyType is required and cannot be null."); + } + if (keyName == null) { + throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (key == null) { + throw new IllegalArgumentException("Parameter key is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(key); + return service.createOrUpdateHostSecret(resourceGroupName, name, keyType, keyName, this.client.subscriptionId(), key, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateHostSecretDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateHostSecretDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a host level secret. + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteHostSecret(String resourceGroupName, String name, String keyType, String keyName) { + deleteHostSecretWithServiceResponseAsync(resourceGroupName, name, keyType, keyName).toBlocking().single().body(); + } + + /** + * Delete a host level secret. + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteHostSecretAsync(String resourceGroupName, String name, String keyType, String keyName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteHostSecretWithServiceResponseAsync(resourceGroupName, name, keyType, keyName), serviceCallback); + } + + /** + * Delete a host level secret. + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteHostSecretAsync(String resourceGroupName, String name, String keyType, String keyName) { + return deleteHostSecretWithServiceResponseAsync(resourceGroupName, name, keyType, keyName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a host level secret. + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteHostSecretWithServiceResponseAsync(String resourceGroupName, String name, String keyType, String keyName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (keyType == null) { + throw new IllegalArgumentException("Parameter keyType is required and cannot be null."); + } + if (keyName == null) { + throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteHostSecret(resourceGroupName, name, keyType, keyName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteHostSecretDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteHostSecretDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listHostNameBindings(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listHostNameBindingsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listHostNameBindingsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the named hostname binding for an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getHostNameBinding(resourceGroupName, name, hostName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getHostNameBindingDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getHostNameBindingDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a hostname binding for an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(hostNameBinding); + return service.createOrUpdateHostNameBinding(resourceGroupName, name, hostName, this.client.subscriptionId(), hostNameBinding, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateHostNameBindingDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateHostNameBindingDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a hostname binding for an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteHostNameBinding(resourceGroupName, name, hostName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteHostNameBindingDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteHostNameBindingDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getHybridConnection(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getHybridConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getHybridConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.createOrUpdateHybridConnection(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateHybridConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateHybridConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Removes a Hybrid Connection from this site. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteHybridConnection(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteHybridConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteHybridConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.updateHybridConnection(resourceGroupName, name, namespaceName, relayName, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateHybridConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateHybridConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Retrieves all Service Bus Hybrid Connections used by this Web App. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listHybridConnections(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listHybridConnectionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listHybridConnectionsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listRelayServiceConnections(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listRelayServiceConnectionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listRelayServiceConnectionsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a hybrid connection configuration by its name. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getRelayServiceConnection(resourceGroupName, name, entityName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getRelayServiceConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getRelayServiceConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.createOrUpdateRelayServiceConnection(resourceGroupName, name, entityName, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateRelayServiceConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateRelayServiceConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a relay service connection by its name. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteRelayServiceConnection(resourceGroupName, name, entityName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteRelayServiceConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteRelayServiceConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.updateRelayServiceConnection(resourceGroupName, name, entityName, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateRelayServiceConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateRelayServiceConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all scale-out instances of an app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listInstanceIdentifiers(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceIdentifiersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceIdentifiersDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all scale-out instances of an app. + * Description for 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 instanceId the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WebSiteInstanceStatusInner object if successful. + */ + public WebSiteInstanceStatusInner getInstanceInfo(String resourceGroupName, String name, String instanceId) { + return getInstanceInfoWithServiceResponseAsync(resourceGroupName, name, instanceId).toBlocking().single().body(); + } + + /** + * Gets all scale-out instances of an app. + * Description for 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 instanceId the String value + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getInstanceInfoAsync(String resourceGroupName, String name, String instanceId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getInstanceInfoWithServiceResponseAsync(resourceGroupName, name, instanceId), serviceCallback); + } + + /** + * Gets all scale-out instances of an app. + * Description for 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 instanceId the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WebSiteInstanceStatusInner object + */ + public Observable getInstanceInfoAsync(String resourceGroupName, String name, String instanceId) { + return getInstanceInfoWithServiceResponseAsync(resourceGroupName, name, instanceId).map(new Func1, WebSiteInstanceStatusInner>() { + @Override + public WebSiteInstanceStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets all scale-out instances of an app. + * Description for 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 instanceId the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WebSiteInstanceStatusInner object + */ + public Observable> getInstanceInfoWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getInstanceInfo(resourceGroupName, name, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceInfoDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceInfoDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the status of the last MSDeploy operation. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getInstanceMsDeployStatus(resourceGroupName, name, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceMsDeployStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceMsDeployStatusDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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 DefaultErrorResponseException 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, MSDeploy mSDeploy) { + return createInstanceMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, instanceId, mSDeploy).toBlocking().last().body(); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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, MSDeploy mSDeploy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createInstanceMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, instanceId, mSDeploy), serviceCallback); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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, MSDeploy 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. + * Description for 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, MSDeploy 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(mSDeploy); + Observable> observable = service.createInstanceMSDeployOperation(resourceGroupName, name, instanceId, this.client.subscriptionId(), mSDeploy, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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 DefaultErrorResponseException 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, MSDeploy mSDeploy) { + return beginCreateInstanceMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, instanceId, mSDeploy).toBlocking().single().body(); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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, MSDeploy mSDeploy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateInstanceMSDeployOperationWithServiceResponseAsync(resourceGroupName, name, instanceId, mSDeploy), serviceCallback); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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, MSDeploy 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. + * Description for 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, MSDeploy 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(mSDeploy); + return service.beginCreateInstanceMSDeployOperation(resourceGroupName, name, instanceId, this.client.subscriptionId(), mSDeploy, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .register(409, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getInstanceMSDeployLog(resourceGroupName, name, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceMSDeployLogDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceMSDeployLogDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listInstanceProcesses(resourceGroupName, name, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceProcessesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getInstanceProcess(resourceGroupName, name, processId, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceProcessDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceProcessDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteInstanceProcess(resourceGroupName, name, processId, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteInstanceProcessDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteInstanceProcessDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getInstanceProcessDump(resourceGroupName, name, processId, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceProcessDumpDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceProcessDumpDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listInstanceProcessModules(resourceGroupName, name, processId, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceProcessModulesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessModulesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getInstanceProcessModule(resourceGroupName, name, processId, baseAddress, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceProcessModuleDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceProcessModuleDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listInstanceProcessThreads(resourceGroupName, name, processId, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceProcessThreadsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessThreadsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Shows whether an app can be cloned to another resource group or subscription. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.isCloneable(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = isCloneableDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse isCloneableDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets existing backups of an app. + * Description for 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 DefaultErrorResponseException thrown 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 listSiteBackups(final String resourceGroupName, final String name) { + ServiceResponse> response = listSiteBackupsSinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteBackupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets existing backups of an app. + * Description for 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> listSiteBackupsAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteBackupsSinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteBackupsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets existing backups of an app. + * Description for 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> listSiteBackupsAsync(final String resourceGroupName, final String name) { + return listSiteBackupsWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets existing backups of an app. + * Description for 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>> listSiteBackupsWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listSiteBackupsSinglePageAsync(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(listSiteBackupsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets existing backups of an app. + * Description for 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>> listSiteBackupsSinglePageAsync(final String resourceGroupName, final String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSiteBackups(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteBackupsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteBackupsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * This is to allow calling via powershell and ARM template. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSyncFunctionTriggers(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listSyncFunctionTriggersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listSyncFunctionTriggersDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Restores a web app. + * Description for 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 DefaultErrorResponseException 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, StorageMigrationOptions migrationOptions) { + return migrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, migrationOptions).toBlocking().last().body(); + } + + /** + * Restores a web app. + * Description for 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, StorageMigrationOptions migrationOptions, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(migrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, migrationOptions), serviceCallback); + } + + /** + * Restores a web app. + * Description for 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, StorageMigrationOptions migrationOptions) { + return migrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, migrationOptions).map(new Func1, StorageMigrationResponseInner>() { + @Override + public StorageMigrationResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a web app. + * Description for 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, StorageMigrationOptions 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(migrationOptions); + Observable> observable = service.migrateStorage(resourceGroupName, name, this.client.subscriptionId(), subscriptionName, migrationOptions, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Restores a web app. + * Description for 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 DefaultErrorResponseException 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, StorageMigrationOptions migrationOptions) { + return beginMigrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, migrationOptions).toBlocking().single().body(); + } + + /** + * Restores a web app. + * Description for 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, StorageMigrationOptions migrationOptions, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginMigrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, migrationOptions), serviceCallback); + } + + /** + * Restores a web app. + * Description for 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, StorageMigrationOptions migrationOptions) { + return beginMigrateStorageWithServiceResponseAsync(resourceGroupName, name, subscriptionName, migrationOptions).map(new Func1, StorageMigrationResponseInner>() { + @Override + public StorageMigrationResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a web app. + * Description for 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, StorageMigrationOptions 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(migrationOptions); + return service.beginMigrateStorage(resourceGroupName, name, this.client.subscriptionId(), subscriptionName, migrationOptions, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Migrates a local (in-app) MySql database to a remote MySql database. + * Description for 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 DefaultErrorResponseException 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, MigrateMySqlRequest migrationRequestEnvelope) { + return migrateMySqlWithServiceResponseAsync(resourceGroupName, name, migrationRequestEnvelope).toBlocking().last().body(); + } + + /** + * Migrates a local (in-app) MySql database to a remote MySql database. + * Description for 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, MigrateMySqlRequest migrationRequestEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(migrateMySqlWithServiceResponseAsync(resourceGroupName, name, migrationRequestEnvelope), serviceCallback); + } + + /** + * Migrates a local (in-app) MySql database to a remote MySql database. + * Description for 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, MigrateMySqlRequest 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. + * Description for 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, MigrateMySqlRequest 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(migrationRequestEnvelope); + Observable> observable = service.migrateMySql(resourceGroupName, name, this.client.subscriptionId(), migrationRequestEnvelope, this.client.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. + * Description for 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 DefaultErrorResponseException 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, MigrateMySqlRequest migrationRequestEnvelope) { + return beginMigrateMySqlWithServiceResponseAsync(resourceGroupName, name, migrationRequestEnvelope).toBlocking().single().body(); + } + + /** + * Migrates a local (in-app) MySql database to a remote MySql database. + * Description for 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, MigrateMySqlRequest migrationRequestEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginMigrateMySqlWithServiceResponseAsync(resourceGroupName, name, migrationRequestEnvelope), serviceCallback); + } + + /** + * Migrates a local (in-app) MySql database to a remote MySql database. + * Description for 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, MigrateMySqlRequest 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. + * Description for 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, MigrateMySqlRequest 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(migrationRequestEnvelope); + return service.beginMigrateMySql(resourceGroupName, name, this.client.subscriptionId(), migrationRequestEnvelope, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getMigrateMySqlStatus(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMigrateMySqlStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMigrateMySqlStatusDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a Swift Virtual Network connection. + * Description for Gets a Swift Virtual Network connection. + * + * @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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SwiftVirtualNetworkInner object if successful. + */ + public SwiftVirtualNetworkInner getSwiftVirtualNetworkConnection(String resourceGroupName, String name) { + return getSwiftVirtualNetworkConnectionWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets a Swift Virtual Network connection. + * Description for Gets a Swift Virtual Network connection. + * + * @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 getSwiftVirtualNetworkConnectionAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSwiftVirtualNetworkConnectionWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets a Swift Virtual Network connection. + * Description for Gets a Swift Virtual Network connection. + * + * @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 SwiftVirtualNetworkInner object + */ + public Observable getSwiftVirtualNetworkConnectionAsync(String resourceGroupName, String name) { + return getSwiftVirtualNetworkConnectionWithServiceResponseAsync(resourceGroupName, name).map(new Func1, SwiftVirtualNetworkInner>() { + @Override + public SwiftVirtualNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a Swift Virtual Network connection. + * Description for Gets a Swift Virtual Network connection. + * + * @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 SwiftVirtualNetworkInner object + */ + public Observable> getSwiftVirtualNetworkConnectionWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSwiftVirtualNetworkConnection(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSwiftVirtualNetworkConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSwiftVirtualNetworkConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SwiftVirtualNetworkInner object if successful. + */ + public SwiftVirtualNetworkInner createOrUpdateSwiftVirtualNetworkConnection(String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope) { + return createOrUpdateSwiftVirtualNetworkConnectionWithServiceResponseAsync(resourceGroupName, name, connectionEnvelope).toBlocking().single().body(); + } + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @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 createOrUpdateSwiftVirtualNetworkConnectionAsync(String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateSwiftVirtualNetworkConnectionWithServiceResponseAsync(resourceGroupName, name, connectionEnvelope), serviceCallback); + } + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SwiftVirtualNetworkInner object + */ + public Observable createOrUpdateSwiftVirtualNetworkConnectionAsync(String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope) { + return createOrUpdateSwiftVirtualNetworkConnectionWithServiceResponseAsync(resourceGroupName, name, connectionEnvelope).map(new Func1, SwiftVirtualNetworkInner>() { + @Override + public SwiftVirtualNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SwiftVirtualNetworkInner object + */ + public Observable> createOrUpdateSwiftVirtualNetworkConnectionWithServiceResponseAsync(String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.createOrUpdateSwiftVirtualNetworkConnection(resourceGroupName, name, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateSwiftVirtualNetworkConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateSwiftVirtualNetworkConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a Swift Virtual Network connection from an app (or deployment slot). + * Description for Deletes a Swift Virtual Network connection from an app (or 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteSwiftVirtualNetwork(String resourceGroupName, String name) { + deleteSwiftVirtualNetworkWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Deletes a Swift Virtual Network connection from an app (or deployment slot). + * Description for Deletes a Swift Virtual Network connection from an app (or 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 deleteSwiftVirtualNetworkAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteSwiftVirtualNetworkWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Deletes a Swift Virtual Network connection from an app (or deployment slot). + * Description for Deletes a Swift Virtual Network connection from an app (or 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 {@link ServiceResponse} object if successful. + */ + public Observable deleteSwiftVirtualNetworkAsync(String resourceGroupName, String name) { + return deleteSwiftVirtualNetworkWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a Swift Virtual Network connection from an app (or deployment slot). + * Description for Deletes a Swift Virtual Network connection from an app (or 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 {@link ServiceResponse} object if successful. + */ + public Observable> deleteSwiftVirtualNetworkWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteSwiftVirtualNetwork(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteSwiftVirtualNetworkDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteSwiftVirtualNetworkDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SwiftVirtualNetworkInner object if successful. + */ + public SwiftVirtualNetworkInner updateSwiftVirtualNetworkConnection(String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope) { + return updateSwiftVirtualNetworkConnectionWithServiceResponseAsync(resourceGroupName, name, connectionEnvelope).toBlocking().single().body(); + } + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @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 updateSwiftVirtualNetworkConnectionAsync(String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateSwiftVirtualNetworkConnectionWithServiceResponseAsync(resourceGroupName, name, connectionEnvelope), serviceCallback); + } + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SwiftVirtualNetworkInner object + */ + public Observable updateSwiftVirtualNetworkConnectionAsync(String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope) { + return updateSwiftVirtualNetworkConnectionWithServiceResponseAsync(resourceGroupName, name, connectionEnvelope).map(new Func1, SwiftVirtualNetworkInner>() { + @Override + public SwiftVirtualNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SwiftVirtualNetworkInner object + */ + public Observable> updateSwiftVirtualNetworkConnectionWithServiceResponseAsync(String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.updateSwiftVirtualNetworkConnection(resourceGroupName, name, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateSwiftVirtualNetworkConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateSwiftVirtualNetworkConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all network features used by the app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listNetworkFeatures(resourceGroupName, name, view, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listNetworkFeaturesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listNetworkFeaturesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List getNetworkTraceOperation(String resourceGroupName, String name, String operationId) { + return getNetworkTraceOperationWithServiceResponseAsync(resourceGroupName, name, operationId).toBlocking().single().body(); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the 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> getNetworkTraceOperationAsync(String resourceGroupName, String name, String operationId, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(getNetworkTraceOperationWithServiceResponseAsync(resourceGroupName, name, operationId), serviceCallback); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NetworkTraceInner> object + */ + public Observable> getNetworkTraceOperationAsync(String resourceGroupName, String name, String operationId) { + return getNetworkTraceOperationWithServiceResponseAsync(resourceGroupName, name, operationId).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NetworkTraceInner> object + */ + public Observable>> getNetworkTraceOperationWithServiceResponseAsync(String resourceGroupName, String name, String operationId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (operationId == null) { + throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getNetworkTraceOperation(resourceGroupName, name, operationId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = getNetworkTraceOperationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getNetworkTraceOperationDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Start capturing network packets for the site (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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 DefaultErrorResponseException 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 (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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 (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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 (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return service.startWebSiteNetworkTrace(resourceGroupName, name, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.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 (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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 DefaultErrorResponseException 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 (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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 (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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 (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.startWebSiteNetworkTrace(resourceGroupName, name, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Start capturing network packets for the site. + * Description for 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 DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List startWebSiteNetworkTraceOperation(String resourceGroupName, String name) { + return startWebSiteNetworkTraceOperationWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().body(); + } + + /** + * Start capturing network packets for the site. + * Description for 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> startWebSiteNetworkTraceOperationAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(startWebSiteNetworkTraceOperationWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + public Observable> startWebSiteNetworkTraceOperationAsync(String resourceGroupName, String name) { + return startWebSiteNetworkTraceOperationWithServiceResponseAsync(resourceGroupName, name).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + public Observable>> startWebSiteNetworkTraceOperationWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + Observable> observable = service.startWebSiteNetworkTraceOperation(resourceGroupName, name, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken>() { }.getType()); + } + /** + * Start capturing network packets for the site. + * Description for 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 DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List startWebSiteNetworkTraceOperation(String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return startWebSiteNetworkTraceOperationWithServiceResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).toBlocking().last().body(); + } + + /** + * Start capturing network packets for the site. + * Description for 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> startWebSiteNetworkTraceOperationAsync(String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(startWebSiteNetworkTraceOperationWithServiceResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + public Observable> startWebSiteNetworkTraceOperationAsync(String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return startWebSiteNetworkTraceOperationWithServiceResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + public Observable>> startWebSiteNetworkTraceOperationWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.startWebSiteNetworkTraceOperation(resourceGroupName, name, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken>() { }.getType()); + } + + /** + * Start capturing network packets for the site. + * Description for 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 DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List beginStartWebSiteNetworkTraceOperation(String resourceGroupName, String name) { + return beginStartWebSiteNetworkTraceOperationWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Start capturing network packets for the site. + * Description for 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> beginStartWebSiteNetworkTraceOperationAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(beginStartWebSiteNetworkTraceOperationWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Description for 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 List<NetworkTraceInner> object + */ + public Observable> beginStartWebSiteNetworkTraceOperationAsync(String resourceGroupName, String name) { + return beginStartWebSiteNetworkTraceOperationWithServiceResponseAsync(resourceGroupName, name).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 List<NetworkTraceInner> object + */ + public Observable>> beginStartWebSiteNetworkTraceOperationWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return service.beginStartWebSiteNetworkTraceOperation(resourceGroupName, name, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = beginStartWebSiteNetworkTraceOperationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List beginStartWebSiteNetworkTraceOperation(String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return beginStartWebSiteNetworkTraceOperationWithServiceResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).toBlocking().single().body(); + } + + /** + * Start capturing network packets for the site. + * Description for 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> beginStartWebSiteNetworkTraceOperationAsync(String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(beginStartWebSiteNetworkTraceOperationWithServiceResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Description for 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 List<NetworkTraceInner> object + */ + public Observable> beginStartWebSiteNetworkTraceOperationAsync(String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return beginStartWebSiteNetworkTraceOperationWithServiceResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 List<NetworkTraceInner> object + */ + public Observable>> beginStartWebSiteNetworkTraceOperationWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginStartWebSiteNetworkTraceOperation(resourceGroupName, name, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = beginStartWebSiteNetworkTraceOperationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> beginStartWebSiteNetworkTraceOperationDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void stopWebSiteNetworkTrace(String resourceGroupName, String name) { + stopWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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. + * Description for 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 {@link ServiceResponse} object if successful. + */ + public Observable stopWebSiteNetworkTraceAsync(String resourceGroupName, String name) { + return stopWebSiteNetworkTraceWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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 {@link ServiceResponse} object if successful. + */ + 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.stopWebSiteNetworkTrace(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = stopWebSiteNetworkTraceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse stopWebSiteNetworkTraceDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List getNetworkTraces(String resourceGroupName, String name, String operationId) { + return getNetworkTracesWithServiceResponseAsync(resourceGroupName, name, operationId).toBlocking().single().body(); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the 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> getNetworkTracesAsync(String resourceGroupName, String name, String operationId, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(getNetworkTracesWithServiceResponseAsync(resourceGroupName, name, operationId), serviceCallback); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NetworkTraceInner> object + */ + public Observable> getNetworkTracesAsync(String resourceGroupName, String name, String operationId) { + return getNetworkTracesWithServiceResponseAsync(resourceGroupName, name, operationId).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NetworkTraceInner> object + */ + public Observable>> getNetworkTracesWithServiceResponseAsync(String resourceGroupName, String name, String operationId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (operationId == null) { + throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getNetworkTraces(resourceGroupName, name, operationId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = getNetworkTracesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getNetworkTracesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List getNetworkTraceOperationV2(String resourceGroupName, String name, String operationId) { + return getNetworkTraceOperationV2WithServiceResponseAsync(resourceGroupName, name, operationId).toBlocking().single().body(); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the 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> getNetworkTraceOperationV2Async(String resourceGroupName, String name, String operationId, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(getNetworkTraceOperationV2WithServiceResponseAsync(resourceGroupName, name, operationId), serviceCallback); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NetworkTraceInner> object + */ + public Observable> getNetworkTraceOperationV2Async(String resourceGroupName, String name, String operationId) { + return getNetworkTraceOperationV2WithServiceResponseAsync(resourceGroupName, name, operationId).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NetworkTraceInner> object + */ + public Observable>> getNetworkTraceOperationV2WithServiceResponseAsync(String resourceGroupName, String name, String operationId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (operationId == null) { + throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getNetworkTraceOperationV2(resourceGroupName, name, operationId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = getNetworkTraceOperationV2Delegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getNetworkTraceOperationV2Delegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List getNetworkTracesV2(String resourceGroupName, String name, String operationId) { + return getNetworkTracesV2WithServiceResponseAsync(resourceGroupName, name, operationId).toBlocking().single().body(); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the 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> getNetworkTracesV2Async(String resourceGroupName, String name, String operationId, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(getNetworkTracesV2WithServiceResponseAsync(resourceGroupName, name, operationId), serviceCallback); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NetworkTraceInner> object + */ + public Observable> getNetworkTracesV2Async(String resourceGroupName, String name, String operationId) { + return getNetworkTracesV2WithServiceResponseAsync(resourceGroupName, name, operationId).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NetworkTraceInner> object + */ + public Observable>> getNetworkTracesV2WithServiceResponseAsync(String resourceGroupName, String name, String operationId) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (operationId == null) { + throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getNetworkTracesV2(resourceGroupName, name, operationId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = getNetworkTracesV2Delegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getNetworkTracesV2Delegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Generates a new publishing password for an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.generateNewSitePublishingPassword(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets perfmon counters for web app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + return service.listPerfMonCounters(resourceGroupName, name, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPerfMonCountersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets perfmon counters for web app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listPerfMonCounters(resourceGroupName, name, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPerfMonCountersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPerfMonCountersDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets web app's event logs. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSitePhpErrorLogFlag(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSitePhpErrorLogFlagDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSitePhpErrorLogFlagDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the premier add-ons of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listPremierAddOns(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listPremierAddOnsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listPremierAddOnsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a named add-on of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getPremierAddOn(resourceGroupName, name, premierAddOnName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getPremierAddOnDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPremierAddOnDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates a named add-on of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(premierAddOn); + return service.addPremierAddOn(resourceGroupName, name, premierAddOnName, this.client.subscriptionId(), premierAddOn, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a premier add-on from an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deletePremierAddOn(resourceGroupName, name, premierAddOnName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deletePremierAddOnDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deletePremierAddOnDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates a named add-on of an app. + * Description for 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 DefaultErrorResponseException 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 updatePremierAddOn(String resourceGroupName, String name, String premierAddOnName, PremierAddOnPatchResource premierAddOn) { + return updatePremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, premierAddOn).toBlocking().single().body(); + } + + /** + * Updates a named add-on of an app. + * Description for 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 updatePremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName, PremierAddOnPatchResource premierAddOn, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updatePremierAddOnWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, premierAddOn), serviceCallback); + } + + /** + * Updates a named add-on of an app. + * Description for 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 updatePremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName, PremierAddOnPatchResource premierAddOn) { + return updatePremierAddOnWithServiceResponseAsync(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. + * Description for 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> updatePremierAddOnWithServiceResponseAsync(String resourceGroupName, String name, String premierAddOnName, PremierAddOnPatchResource 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(premierAddOn); + return service.updatePremierAddOn(resourceGroupName, name, premierAddOnName, this.client.subscriptionId(), premierAddOn, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updatePremierAddOnDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updatePremierAddOnDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateAccessInner object if successful. + */ + public PrivateAccessInner getPrivateAccess(String resourceGroupName, String name) { + return getPrivateAccessWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access 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 getPrivateAccessAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getPrivateAccessWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access 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 PrivateAccessInner object + */ + public Observable getPrivateAccessAsync(String resourceGroupName, String name) { + return getPrivateAccessWithServiceResponseAsync(resourceGroupName, name).map(new Func1, PrivateAccessInner>() { + @Override + public PrivateAccessInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access 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 PrivateAccessInner object + */ + public Observable> getPrivateAccessWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getPrivateAccess(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getPrivateAccessDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPrivateAccessDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Sets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param access The information for the private access + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateAccessInner object if successful. + */ + public PrivateAccessInner putPrivateAccessVnet(String resourceGroupName, String name, PrivateAccessInner access) { + return putPrivateAccessVnetWithServiceResponseAsync(resourceGroupName, name, access).toBlocking().single().body(); + } + + /** + * Sets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param access The information for the private access + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture putPrivateAccessVnetAsync(String resourceGroupName, String name, PrivateAccessInner access, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(putPrivateAccessVnetWithServiceResponseAsync(resourceGroupName, name, access), serviceCallback); + } + + /** + * Sets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param access The information for the private access + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateAccessInner object + */ + public Observable putPrivateAccessVnetAsync(String resourceGroupName, String name, PrivateAccessInner access) { + return putPrivateAccessVnetWithServiceResponseAsync(resourceGroupName, name, access).map(new Func1, PrivateAccessInner>() { + @Override + public PrivateAccessInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Sets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param access The information for the private access + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateAccessInner object + */ + public Observable> putPrivateAccessVnetWithServiceResponseAsync(String resourceGroupName, String name, PrivateAccessInner access) { + if (resourceGroupName == null) { + throw new 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 (access == null) { + throw new IllegalArgumentException("Parameter access is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(access); + return service.putPrivateAccessVnet(resourceGroupName, name, this.client.subscriptionId(), access, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = putPrivateAccessVnetDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse putPrivateAccessVnetDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listProcesses(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProcessesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getProcess(resourceGroupName, name, processId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getProcessDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getProcessDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteProcess(resourceGroupName, name, processId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteProcessDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteProcessDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getProcessDump(resourceGroupName, name, processId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getProcessDumpDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getProcessDumpDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listProcessModules(resourceGroupName, name, processId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProcessModulesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessModulesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getProcessModule(resourceGroupName, name, processId, baseAddress, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getProcessModuleDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getProcessModuleDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listProcessThreads(resourceGroupName, name, processId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProcessThreadsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessThreadsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get public certificates for an app or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listPublicCertificates(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPublicCertificatesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPublicCertificatesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the named public certificate for an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getPublicCertificate(resourceGroupName, name, publicCertificateName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getPublicCertificateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPublicCertificateDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a hostname binding for an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(publicCertificate); + return service.createOrUpdatePublicCertificate(resourceGroupName, name, publicCertificateName, this.client.subscriptionId(), publicCertificate, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a hostname binding for an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deletePublicCertificate(resourceGroupName, name, publicCertificateName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deletePublicCertificateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deletePublicCertificateDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Description for 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 publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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, CsmPublishingProfileOptions publishingProfileOptions) { + return listPublishingProfileXmlWithSecretsWithServiceResponseAsync(resourceGroupName, name, publishingProfileOptions).toBlocking().single().body(); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Description for 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 publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @param serviceCallback 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, CsmPublishingProfileOptions publishingProfileOptions, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listPublishingProfileXmlWithSecretsWithServiceResponseAsync(resourceGroupName, name, publishingProfileOptions), serviceCallback); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Description for 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 publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable listPublishingProfileXmlWithSecretsAsync(String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions) { + return listPublishingProfileXmlWithSecretsWithServiceResponseAsync(resourceGroupName, name, publishingProfileOptions).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). + * Description for 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 publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable> listPublishingProfileXmlWithSecretsWithServiceResponseAsync(String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions) { + if (resourceGroupName == null) { + throw new 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 (publishingProfileOptions == null) { + throw new IllegalArgumentException("Parameter publishingProfileOptions is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(publishingProfileOptions); + return service.listPublishingProfileXmlWithSecrets(resourceGroupName, name, this.client.subscriptionId(), publishingProfileOptions, this.client.apiVersion(), this.client.acceptLanguage(), 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.resetProductionSlotConfig(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean softRestart = null; + final Boolean synchronous = null; + return service.restart(resourceGroupName, name, this.client.subscriptionId(), softRestart, synchronous, this.client.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). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.restart(resourceGroupName, name, this.client.subscriptionId(), softRestart, synchronous, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void restoreFromBackupBlob(String resourceGroupName, String name, RestoreRequestInner request) { + restoreFromBackupBlobWithServiceResponseAsync(resourceGroupName, name, request).toBlocking().last().body(); + } + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @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 restoreFromBackupBlobAsync(String resourceGroupName, String name, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restoreFromBackupBlobWithServiceResponseAsync(resourceGroupName, name, request), serviceCallback); + } + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable restoreFromBackupBlobAsync(String resourceGroupName, String name, RestoreRequestInner request) { + return restoreFromBackupBlobWithServiceResponseAsync(resourceGroupName, name, request).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> restoreFromBackupBlobWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(request); + Observable> observable = service.restoreFromBackupBlob(resourceGroupName, name, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginRestoreFromBackupBlob(String resourceGroupName, String name, RestoreRequestInner request) { + beginRestoreFromBackupBlobWithServiceResponseAsync(resourceGroupName, name, request).toBlocking().single().body(); + } + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @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 beginRestoreFromBackupBlobAsync(String resourceGroupName, String name, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRestoreFromBackupBlobWithServiceResponseAsync(resourceGroupName, name, request), serviceCallback); + } + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginRestoreFromBackupBlobAsync(String resourceGroupName, String name, RestoreRequestInner request) { + return beginRestoreFromBackupBlobWithServiceResponseAsync(resourceGroupName, name, request).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginRestoreFromBackupBlobWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(request); + return service.beginRestoreFromBackupBlob(resourceGroupName, name, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRestoreFromBackupBlobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRestoreFromBackupBlobDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void restoreFromDeletedApp(String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { + restoreFromDeletedAppWithServiceResponseAsync(resourceGroupName, name, restoreRequest).toBlocking().last().body(); + } + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore 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 restoreFromDeletedAppAsync(String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restoreFromDeletedAppWithServiceResponseAsync(resourceGroupName, name, restoreRequest), serviceCallback); + } + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable restoreFromDeletedAppAsync(String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { + return restoreFromDeletedAppWithServiceResponseAsync(resourceGroupName, name, restoreRequest).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> restoreFromDeletedAppWithServiceResponseAsync(String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { + if (resourceGroupName == null) { + throw new 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 (restoreRequest == null) { + throw new IllegalArgumentException("Parameter restoreRequest is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(restoreRequest); + Observable> observable = service.restoreFromDeletedApp(resourceGroupName, name, this.client.subscriptionId(), restoreRequest, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginRestoreFromDeletedApp(String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { + beginRestoreFromDeletedAppWithServiceResponseAsync(resourceGroupName, name, restoreRequest).toBlocking().single().body(); + } + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore 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 beginRestoreFromDeletedAppAsync(String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRestoreFromDeletedAppWithServiceResponseAsync(resourceGroupName, name, restoreRequest), serviceCallback); + } + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginRestoreFromDeletedAppAsync(String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { + return beginRestoreFromDeletedAppWithServiceResponseAsync(resourceGroupName, name, restoreRequest).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginRestoreFromDeletedAppWithServiceResponseAsync(String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { + if (resourceGroupName == null) { + throw new 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 (restoreRequest == null) { + throw new IllegalArgumentException("Parameter restoreRequest is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(restoreRequest); + return service.beginRestoreFromDeletedApp(resourceGroupName, name, this.client.subscriptionId(), restoreRequest, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRestoreFromDeletedAppDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRestoreFromDeletedAppDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void restoreSnapshot(String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { + restoreSnapshotWithServiceResponseAsync(resourceGroupName, name, restoreRequest).toBlocking().last().body(); + } + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. 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 restoreSnapshotAsync(String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restoreSnapshotWithServiceResponseAsync(resourceGroupName, name, restoreRequest), serviceCallback); + } + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. 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 restoreSnapshotAsync(String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { + return restoreSnapshotWithServiceResponseAsync(resourceGroupName, name, restoreRequest).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. 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> restoreSnapshotWithServiceResponseAsync(String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { + if (resourceGroupName == null) { + throw new 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 (restoreRequest == null) { + throw new IllegalArgumentException("Parameter restoreRequest is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(restoreRequest); + Observable> observable = service.restoreSnapshot(resourceGroupName, name, this.client.subscriptionId(), restoreRequest, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginRestoreSnapshot(String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { + beginRestoreSnapshotWithServiceResponseAsync(resourceGroupName, name, restoreRequest).toBlocking().single().body(); + } + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. 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 beginRestoreSnapshotAsync(String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRestoreSnapshotWithServiceResponseAsync(resourceGroupName, name, restoreRequest), serviceCallback); + } + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. 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 beginRestoreSnapshotAsync(String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { + return beginRestoreSnapshotWithServiceResponseAsync(resourceGroupName, name, restoreRequest).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. 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> beginRestoreSnapshotWithServiceResponseAsync(String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { + if (resourceGroupName == null) { + throw new 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 (restoreRequest == null) { + throw new IllegalArgumentException("Parameter restoreRequest is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(restoreRequest); + return service.beginRestoreSnapshot(resourceGroupName, name, this.client.subscriptionId(), restoreRequest, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRestoreSnapshotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRestoreSnapshotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSiteExtensions(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteExtensionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteExtensionsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get site extension information by its ID for a web site, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSiteExtension(resourceGroupName, name, siteExtensionId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteExtensionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSiteExtensionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.installSiteExtension(resourceGroupName, name, siteExtensionId, this.client.subscriptionId(), this.client.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginInstallSiteExtension(resourceGroupName, name, siteExtensionId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginInstallSiteExtensionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginInstallSiteExtensionDelegate(Response response) throws DefaultErrorResponseException, 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(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Remove a site extension from a web site, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteSiteExtension(resourceGroupName, name, siteExtensionId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteSiteExtensionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteSiteExtensionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void copyProductionSlot(String resourceGroupName, String name, CsmCopySlotEntity copySlotEntity) { + copyProductionSlotWithServiceResponseAsync(resourceGroupName, name, copySlotEntity).toBlocking().last().body(); + } + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. 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 copyProductionSlotAsync(String resourceGroupName, String name, CsmCopySlotEntity copySlotEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(copyProductionSlotWithServiceResponseAsync(resourceGroupName, name, copySlotEntity), serviceCallback); + } + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable copyProductionSlotAsync(String resourceGroupName, String name, CsmCopySlotEntity copySlotEntity) { + return copyProductionSlotWithServiceResponseAsync(resourceGroupName, name, copySlotEntity).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> copyProductionSlotWithServiceResponseAsync(String resourceGroupName, String name, CsmCopySlotEntity copySlotEntity) { + if (resourceGroupName == null) { + throw new 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 (copySlotEntity == null) { + throw new IllegalArgumentException("Parameter copySlotEntity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(copySlotEntity); + Observable> observable = service.copyProductionSlot(resourceGroupName, name, this.client.subscriptionId(), copySlotEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginCopyProductionSlot(String resourceGroupName, String name, CsmCopySlotEntity copySlotEntity) { + beginCopyProductionSlotWithServiceResponseAsync(resourceGroupName, name, copySlotEntity).toBlocking().single().body(); + } + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. 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 beginCopyProductionSlotAsync(String resourceGroupName, String name, CsmCopySlotEntity copySlotEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCopyProductionSlotWithServiceResponseAsync(resourceGroupName, name, copySlotEntity), serviceCallback); + } + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginCopyProductionSlotAsync(String resourceGroupName, String name, CsmCopySlotEntity copySlotEntity) { + return beginCopyProductionSlotWithServiceResponseAsync(resourceGroupName, name, copySlotEntity).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginCopyProductionSlotWithServiceResponseAsync(String resourceGroupName, String name, CsmCopySlotEntity copySlotEntity) { + if (resourceGroupName == null) { + throw new 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 (copySlotEntity == null) { + throw new IllegalArgumentException("Parameter copySlotEntity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(copySlotEntity); + return service.beginCopyProductionSlot(resourceGroupName, name, this.client.subscriptionId(), copySlotEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCopyProductionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCopyProductionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets an app's deployment slots. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSlots(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSlotsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSlotsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the details of a web, mobile, or API app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteEnvelope); + Observable> observable = service.createOrUpdateSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteEnvelope, this.client.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteEnvelope); + return service.beginCreateOrUpdateSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteEnvelope, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean deleteMetrics = null; + final Boolean deleteEmptyServerFarm = null; + return service.deleteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), deleteMetrics, deleteEmptyServerFarm, this.client.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. + * Description for 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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) { + deleteSlotWithServiceResponseAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm).toBlocking().single().body(); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Description for 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 serviceCallback 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, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteSlotWithServiceResponseAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm), serviceCallback); + } + + /** + * Deletes a web, mobile, or API app, or one of the deployment slots. + * Description for 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. + * @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) { + return deleteSlotWithServiceResponseAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm).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. + * Description for 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. + * @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) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteSlot(resourceGroupName, name, slot, this.client.subscriptionId(), deleteMetrics, deleteEmptyServerFarm, this.client.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 DefaultErrorResponseException, 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(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * Description for 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 DefaultErrorResponseException 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, SitePatchResource 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. + * Description for 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, SitePatchResource 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. + * Description for 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, SitePatchResource 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. + * Description for 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, SitePatchResource 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteEnvelope); + return service.updateSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteEnvelope, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Analyze a custom hostname. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String hostName = null; + return service.analyzeCustomHostnameSlot(resourceGroupName, name, slot, this.client.subscriptionId(), hostName, this.client.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.analyzeCustomHostnameSlot(resourceGroupName, name, slot, this.client.subscriptionId(), hostName, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Applies the configuration settings from the target slot onto the current slot. + * Description for 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 DefaultErrorResponseException 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, CsmSlotEntity slotSwapEntity) { + applySlotConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().single().body(); + } + + /** + * Applies the configuration settings from the target slot onto the current slot. + * Description for 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, CsmSlotEntity 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. + * Description for 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, CsmSlotEntity 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. + * Description for 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, CsmSlotEntity slotSwapEntity) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (slotSwapEntity == null) { + throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(slotSwapEntity); + return service.applySlotConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), slotSwapEntity, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a backup of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(request); + return service.backupSlot(resourceGroupName, name, slot, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = backupSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse backupSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets existing backups of an app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listBackupsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBackupsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBackupsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a backup of an app by its ID. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getBackupStatusSlot(resourceGroupName, name, backupId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getBackupStatusSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getBackupStatusSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a backup of an app by its ID. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteBackupSlot(resourceGroupName, name, backupId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(request); + return service.listBackupStatusSecretsSlot(resourceGroupName, name, backupId, slot, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listBackupStatusSecretsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listBackupStatusSecretsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void restoreSlot(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + restoreSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).toBlocking().last().body(); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Description for 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). + * Description for 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, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(request); + Observable> observable = service.restoreSlot(resourceGroupName, name, backupId, slot, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginRestoreSlot(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + beginRestoreSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).toBlocking().single().body(); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Description for 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). + * Description for 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 {@link ServiceResponse} object if successful. + */ + public Observable beginRestoreSlotAsync(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + return beginRestoreSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a specific backup to another app (or deployment slot, if specified). + * Description for 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 {@link ServiceResponse} object if successful. + */ + 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(request); + return service.beginRestoreSlot(resourceGroupName, name, backupId, slot, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRestoreSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRestoreSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List the configurations of an app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listConfigurationsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listConfigurationsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listConfigurationsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Replaces the application settings of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(appSettings); + return service.updateApplicationSettingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), appSettings, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the application settings of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listApplicationSettingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listApplicationSettingsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listApplicationSettingsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the Authentication / Authorization settings associated with web app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteAuthSettings); + return service.updateAuthSettingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteAuthSettings, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the Authentication/Authorization settings of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getAuthSettingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getAuthSettingsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getAuthSettingsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the Azure storage account configurations of an app. + * Description for Updates the Azure storage account 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 update the Azure storage account configurations for the production slot. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AzureStoragePropertyDictionaryResourceInner object if successful. + */ + public AzureStoragePropertyDictionaryResourceInner updateAzureStorageAccountsSlot(String resourceGroupName, String name, String slot, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts) { + return updateAzureStorageAccountsSlotWithServiceResponseAsync(resourceGroupName, name, slot, azureStorageAccounts).toBlocking().single().body(); + } + + /** + * Updates the Azure storage account configurations of an app. + * Description for Updates the Azure storage account 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 update the Azure storage account configurations for the production slot. + * @param azureStorageAccounts Azure storage accounts 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 updateAzureStorageAccountsSlotAsync(String resourceGroupName, String name, String slot, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateAzureStorageAccountsSlotWithServiceResponseAsync(resourceGroupName, name, slot, azureStorageAccounts), serviceCallback); + } + + /** + * Updates the Azure storage account configurations of an app. + * Description for Updates the Azure storage account 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 update the Azure storage account configurations for the production slot. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureStoragePropertyDictionaryResourceInner object + */ + public Observable updateAzureStorageAccountsSlotAsync(String resourceGroupName, String name, String slot, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts) { + return updateAzureStorageAccountsSlotWithServiceResponseAsync(resourceGroupName, name, slot, azureStorageAccounts).map(new Func1, AzureStoragePropertyDictionaryResourceInner>() { + @Override + public AzureStoragePropertyDictionaryResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the Azure storage account configurations of an app. + * Description for Updates the Azure storage account 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 update the Azure storage account configurations for the production slot. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureStoragePropertyDictionaryResourceInner object + */ + public Observable> updateAzureStorageAccountsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts) { + if (resourceGroupName == null) { + throw new 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 (azureStorageAccounts == null) { + throw new IllegalArgumentException("Parameter azureStorageAccounts is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(azureStorageAccounts); + return service.updateAzureStorageAccountsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), azureStorageAccounts, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateAzureStorageAccountsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateAzureStorageAccountsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the Azure storage account configurations of an app. + * Description for Gets the Azure storage account 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 update the Azure storage account configurations for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AzureStoragePropertyDictionaryResourceInner object if successful. + */ + public AzureStoragePropertyDictionaryResourceInner listAzureStorageAccountsSlot(String resourceGroupName, String name, String slot) { + return listAzureStorageAccountsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the Azure storage account configurations of an app. + * Description for Gets the Azure storage account 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 update the Azure storage account configurations 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 listAzureStorageAccountsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listAzureStorageAccountsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the Azure storage account configurations of an app. + * Description for Gets the Azure storage account 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 update the Azure storage account configurations for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureStoragePropertyDictionaryResourceInner object + */ + public Observable listAzureStorageAccountsSlotAsync(String resourceGroupName, String name, String slot) { + return listAzureStorageAccountsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, AzureStoragePropertyDictionaryResourceInner>() { + @Override + public AzureStoragePropertyDictionaryResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the Azure storage account configurations of an app. + * Description for Gets the Azure storage account 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 update the Azure storage account configurations for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureStoragePropertyDictionaryResourceInner object + */ + public Observable> listAzureStorageAccountsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listAzureStorageAccountsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listAzureStorageAccountsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listAzureStorageAccountsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the backup configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(request); + return service.updateBackupConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateBackupConfigurationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateBackupConfigurationSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes the backup configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteBackupConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteBackupConfigurationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteBackupConfigurationSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the backup configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getBackupConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getBackupConfigurationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getBackupConfigurationSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Replaces the connection strings of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionStrings); + return service.updateConnectionStringsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), connectionStrings, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateConnectionStringsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateConnectionStringsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the connection strings of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listConnectionStringsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listConnectionStringsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listConnectionStringsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the logging configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getDiagnosticLogsConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDiagnosticLogsConfigurationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDiagnosticLogsConfigurationSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the logging configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteLogsConfig); + return service.updateDiagnosticLogsConfigSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteLogsConfig, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Replaces the metadata of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(metadata); + return service.updateMetadataSlot(resourceGroupName, name, slot, this.client.subscriptionId(), metadata, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the metadata of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listMetadataSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listMetadataSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listMetadataSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.listPublishingCredentialsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Gets the Git/FTP publishing credentials of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginListPublishingCredentialsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginListPublishingCredentialsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginListPublishingCredentialsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the Push settings associated with web app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(pushSettings); + return service.updateSitePushSettingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), pushSettings, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the Push settings associated with web app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSitePushSettingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listSitePushSettingsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listSitePushSettingsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the configuration of an app, such as platform version and bitness, default documents, virtual applications, Always On, etc. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getConfigurationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getConfigurationSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteConfig); + return service.createOrUpdateConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteConfig, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteConfig); + return service.updateConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteConfig, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listConfigurationSnapshotInfoSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listConfigurationSnapshotInfoSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listConfigurationSnapshotInfoSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a snapshot of the configuration of an app at a previous point in time. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getConfigurationSnapshotSlot(resourceGroupName, name, snapshotId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getConfigurationSnapshotSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getConfigurationSnapshotSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Reverts the configuration of an app to a previous snapshot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.recoverSiteConfigurationSnapshotSlot(resourceGroupName, name, snapshotId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = recoverSiteConfigurationSnapshotSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse recoverSiteConfigurationSnapshotSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the last lines of docker logs for the given site. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getWebSiteContainerLogsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = 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. + * Description for 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 getContainerLogsZipSlot(String resourceGroupName, String name, String slot) { + return getContainerLogsZipSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets the ZIP archived docker log files for the given site. + * Description for 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 getContainerLogsZipSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getContainerLogsZipSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets the ZIP archived docker log files for the given site. + * Description for 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 getContainerLogsZipSlotAsync(String resourceGroupName, String name, String slot) { + return getContainerLogsZipSlotWithServiceResponseAsync(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. + * Description for 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> getContainerLogsZipSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getContainerLogsZipSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getContainerLogsZipSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getContainerLogsZipSlotDelegate(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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listContinuousWebJobsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listContinuousWebJobsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listContinuousWebJobsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a continuous web job by its ID for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getContinuousWebJobSlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getContinuousWebJobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getContinuousWebJobSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a continuous web job by its ID for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteContinuousWebJobSlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteContinuousWebJobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteContinuousWebJobSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Start a continuous web job for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.startContinuousWebJobSlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = startContinuousWebJobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse startContinuousWebJobSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Stop a continuous web job for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.stopContinuousWebJobSlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = stopContinuousWebJobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse stopContinuousWebJobSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List deployments for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listDeploymentsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDeploymentsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDeploymentsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a deployment by its ID for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getDeploymentSlot(resourceGroupName, name, id, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Create a deployment for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(deployment); + return service.createDeploymentSlot(resourceGroupName, name, id, slot, this.client.subscriptionId(), deployment, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a deployment by its ID for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteDeploymentSlot(resourceGroupName, name, id, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List deployment log for specific deployment for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listDeploymentLogSlot(resourceGroupName, name, id, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDeploymentLogSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDeploymentLogSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * + * @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 DefaultErrorResponseException 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 discoverBackupSlot(String resourceGroupName, String name, String slot, RestoreRequestInner request) { + return discoverBackupSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).toBlocking().single().body(); + } + + /** + * Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * + * @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 discoverBackupSlotAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(discoverBackupSlotWithServiceResponseAsync(resourceGroupName, name, slot, request), serviceCallback); + } + + /** + * Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * + * @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 discoverBackupSlotAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request) { + return discoverBackupSlotWithServiceResponseAsync(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. Use this to get information about the databases stored in a backup. + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + * + * @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> discoverBackupSlotWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(request); + return service.discoverBackupSlot(resourceGroupName, name, slot, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = discoverBackupSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse discoverBackupSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listDomainOwnershipIdentifiersSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDomainOwnershipIdentifiersSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDomainOwnershipIdentifiersSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get domain ownership identifier for web app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getDomainOwnershipIdentifierSlot(resourceGroupName, name, domainOwnershipIdentifierName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDomainOwnershipIdentifierSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDomainOwnershipIdentifierSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(domainOwnershipIdentifier); + return service.createOrUpdateDomainOwnershipIdentifierSlot(resourceGroupName, name, domainOwnershipIdentifierName, slot, this.client.subscriptionId(), domainOwnershipIdentifier, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a domain ownership identifier for a web app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteDomainOwnershipIdentifierSlot(resourceGroupName, name, domainOwnershipIdentifierName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDomainOwnershipIdentifierSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDomainOwnershipIdentifierSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(domainOwnershipIdentifier); + return service.updateDomainOwnershipIdentifierSlot(resourceGroupName, name, domainOwnershipIdentifierName, slot, this.client.subscriptionId(), domainOwnershipIdentifier, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the status of the last MSDeploy operation. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getMSDeployStatusSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMSDeployStatusSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMSDeployStatusSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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 DefaultErrorResponseException 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, MSDeploy mSDeploy) { + return createMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, mSDeploy).toBlocking().last().body(); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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, MSDeploy mSDeploy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, mSDeploy), serviceCallback); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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, MSDeploy 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. + * Description for 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, MSDeploy 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(mSDeploy); + Observable> observable = service.createMSDeployOperationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), mSDeploy, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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 DefaultErrorResponseException 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, MSDeploy mSDeploy) { + return beginCreateMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, mSDeploy).toBlocking().single().body(); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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, MSDeploy mSDeploy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, mSDeploy), serviceCallback); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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, MSDeploy 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. + * Description for 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, MSDeploy 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(mSDeploy); + return service.beginCreateMSDeployOperationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), mSDeploy, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .register(409, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getMSDeployLogSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMSDeployLogSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMSDeployLogSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List the functions for a web site, or a deployment slot. + * Description for 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * @param serviceCallback 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. + * Description for 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. + * @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. + * Description for 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. + * @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. + * Description for 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. + * @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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listInstanceFunctionsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceFunctionsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceFunctionsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Fetch a short lived token that can be exchanged for a master key. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getFunctionsAdminTokenSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getFunctionsAdminTokenSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getFunctionsAdminTokenSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get function information by its ID for web site, or a deployment slot. + * Description for 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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. + * @param serviceCallback 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. + * Description for 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. + * @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. + * Description for 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. + * @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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getInstanceFunctionSlot(resourceGroupName, name, functionName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceFunctionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceFunctionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Create function for web site, or a deployment slot. + * Description for 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. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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. + * @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. + * Description for 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. + * @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. + * Description for 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. + * @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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(functionEnvelope); + Observable> observable = service.createInstanceFunctionSlot(resourceGroupName, name, functionName, slot, this.client.subscriptionId(), functionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Create function for web site, or a deployment slot. + * Description for 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. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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. + * @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. + * Description for 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. + * @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. + * Description for 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. + * @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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(functionEnvelope); + return service.beginCreateInstanceFunctionSlot(resourceGroupName, name, functionName, slot, this.client.subscriptionId(), functionEnvelope, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a function for web site, or a deployment slot. + * Description for 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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. + * @param serviceCallback 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. + * Description for 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. + * @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. + * Description for 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. + * @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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteInstanceFunctionSlot(resourceGroupName, name, functionName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteInstanceFunctionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteInstanceFunctionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Add or update a function secret. + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the KeyInfoInner object if successful. + */ + public KeyInfoInner createOrUpdateFunctionSecretSlot(String resourceGroupName, String name, String functionName, String keyName, String slot, KeyInfoInner key) { + return createOrUpdateFunctionSecretSlotWithServiceResponseAsync(resourceGroupName, name, functionName, keyName, slot, key).toBlocking().single().body(); + } + + /** + * Add or update a function secret. + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateFunctionSecretSlotAsync(String resourceGroupName, String name, String functionName, String keyName, String slot, KeyInfoInner key, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateFunctionSecretSlotWithServiceResponseAsync(resourceGroupName, name, functionName, keyName, slot, key), serviceCallback); + } + + /** + * Add or update a function secret. + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the KeyInfoInner object + */ + public Observable createOrUpdateFunctionSecretSlotAsync(String resourceGroupName, String name, String functionName, String keyName, String slot, KeyInfoInner key) { + return createOrUpdateFunctionSecretSlotWithServiceResponseAsync(resourceGroupName, name, functionName, keyName, slot, key).map(new Func1, KeyInfoInner>() { + @Override + public KeyInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Add or update a function secret. + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the KeyInfoInner object + */ + public Observable> createOrUpdateFunctionSecretSlotWithServiceResponseAsync(String resourceGroupName, String name, String functionName, String keyName, String slot, KeyInfoInner key) { + if (resourceGroupName == null) { + throw new 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 (keyName == null) { + throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (key == null) { + throw new IllegalArgumentException("Parameter key is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(key); + return service.createOrUpdateFunctionSecretSlot(resourceGroupName, name, functionName, keyName, slot, this.client.subscriptionId(), key, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateFunctionSecretSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateFunctionSecretSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a function secret. + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteFunctionSecretSlot(String resourceGroupName, String name, String functionName, String keyName, String slot) { + deleteFunctionSecretSlotWithServiceResponseAsync(resourceGroupName, name, functionName, keyName, slot).toBlocking().single().body(); + } + + /** + * Delete a function secret. + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @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 deleteFunctionSecretSlotAsync(String resourceGroupName, String name, String functionName, String keyName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteFunctionSecretSlotWithServiceResponseAsync(resourceGroupName, name, functionName, keyName, slot), serviceCallback); + } + + /** + * Delete a function secret. + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteFunctionSecretSlotAsync(String resourceGroupName, String name, String functionName, String keyName, String slot) { + return deleteFunctionSecretSlotWithServiceResponseAsync(resourceGroupName, name, functionName, keyName, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a function secret. + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteFunctionSecretSlotWithServiceResponseAsync(String resourceGroupName, String name, String functionName, String keyName, 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 (keyName == null) { + throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteFunctionSecretSlot(resourceGroupName, name, functionName, keyName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteFunctionSecretSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteFunctionSecretSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get function keys for a function in a web site, or a deployment slot. + * Description for Get function keys 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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 listFunctionKeysSlot(String resourceGroupName, String name, String functionName, String slot) { + return listFunctionKeysSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot).toBlocking().single().body(); + } + + /** + * Get function keys for a function in a web site, or a deployment slot. + * Description for Get function keys 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. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listFunctionKeysSlotAsync(String resourceGroupName, String name, String functionName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listFunctionKeysSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot), serviceCallback); + } + + /** + * Get function keys for a function in a web site, or a deployment slot. + * Description for Get function keys 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable listFunctionKeysSlotAsync(String resourceGroupName, String name, String functionName, String slot) { + return listFunctionKeysSlotWithServiceResponseAsync(resourceGroupName, name, functionName, slot).map(new Func1, StringDictionaryInner>() { + @Override + public StringDictionaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get function keys for a function in a web site, or a deployment slot. + * Description for Get function keys 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the StringDictionaryInner object + */ + public Observable> listFunctionKeysSlotWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listFunctionKeysSlot(resourceGroupName, name, functionName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listFunctionKeysSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listFunctionKeysSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get function secrets for a function in a web site, or a deployment slot. + * Description for 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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. + * @param serviceCallback 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. + * Description for 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. + * @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. + * Description for 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. + * @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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listFunctionSecretsSlot(resourceGroupName, name, functionName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listFunctionSecretsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listFunctionSecretsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get host secrets for a function app. + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the HostKeysInner object if successful. + */ + public HostKeysInner listHostKeysSlot(String resourceGroupName, String name, String slot) { + return listHostKeysSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Get host secrets for a function app. + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 listHostKeysSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listHostKeysSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Get host secrets for a function app. + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HostKeysInner object + */ + public Observable listHostKeysSlotAsync(String resourceGroupName, String name, String slot) { + return listHostKeysSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, HostKeysInner>() { + @Override + public HostKeysInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get host secrets for a function app. + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the HostKeysInner object + */ + public Observable> listHostKeysSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listHostKeysSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listHostKeysSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listHostKeysSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * This is to allow calling via powershell and ARM template. + * Description for 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void listSyncStatusSlot(String resourceGroupName, String name, String slot) { + listSyncStatusSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * This is to allow calling via powershell and ARM template. + * Description for 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. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listSyncStatusSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listSyncStatusSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * This is to allow calling via powershell and ARM template. + * Description for 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable listSyncStatusSlotAsync(String resourceGroupName, String name, String slot) { + return listSyncStatusSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * This is to allow calling via powershell and ARM template. + * Description for 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> listSyncStatusSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSyncStatusSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listSyncStatusSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listSyncStatusSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Syncs function trigger metadata to the management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void syncFunctionsSlot(String resourceGroupName, String name, String slot) { + syncFunctionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Syncs function trigger metadata to the management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture syncFunctionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(syncFunctionsSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Syncs function trigger metadata to the management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable syncFunctionsSlotAsync(String resourceGroupName, String name, String slot) { + return syncFunctionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Syncs function trigger metadata to the management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> syncFunctionsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.syncFunctionsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = syncFunctionsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse syncFunctionsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Add or update a host level secret. + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the KeyInfoInner object if successful. + */ + public KeyInfoInner createOrUpdateHostSecretSlot(String resourceGroupName, String name, String keyType, String keyName, String slot, KeyInfoInner key) { + return createOrUpdateHostSecretSlotWithServiceResponseAsync(resourceGroupName, name, keyType, keyName, slot, key).toBlocking().single().body(); + } + + /** + * Add or update a host level secret. + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateHostSecretSlotAsync(String resourceGroupName, String name, String keyType, String keyName, String slot, KeyInfoInner key, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateHostSecretSlotWithServiceResponseAsync(resourceGroupName, name, keyType, keyName, slot, key), serviceCallback); + } + + /** + * Add or update a host level secret. + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the KeyInfoInner object + */ + public Observable createOrUpdateHostSecretSlotAsync(String resourceGroupName, String name, String keyType, String keyName, String slot, KeyInfoInner key) { + return createOrUpdateHostSecretSlotWithServiceResponseAsync(resourceGroupName, name, keyType, keyName, slot, key).map(new Func1, KeyInfoInner>() { + @Override + public KeyInfoInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Add or update a host level secret. + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the KeyInfoInner object + */ + public Observable> createOrUpdateHostSecretSlotWithServiceResponseAsync(String resourceGroupName, String name, String keyType, String keyName, String slot, KeyInfoInner key) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (keyType == null) { + throw new IllegalArgumentException("Parameter keyType is required and cannot be null."); + } + if (keyName == null) { + throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (key == null) { + throw new IllegalArgumentException("Parameter key is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(key); + return service.createOrUpdateHostSecretSlot(resourceGroupName, name, keyType, keyName, slot, this.client.subscriptionId(), key, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateHostSecretSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateHostSecretSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a host level secret. + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteHostSecretSlot(String resourceGroupName, String name, String keyType, String keyName, String slot) { + deleteHostSecretSlotWithServiceResponseAsync(resourceGroupName, name, keyType, keyName, slot).toBlocking().single().body(); + } + + /** + * Delete a host level secret. + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @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 deleteHostSecretSlotAsync(String resourceGroupName, String name, String keyType, String keyName, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteHostSecretSlotWithServiceResponseAsync(resourceGroupName, name, keyType, keyName, slot), serviceCallback); + } + + /** + * Delete a host level secret. + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteHostSecretSlotAsync(String resourceGroupName, String name, String keyType, String keyName, String slot) { + return deleteHostSecretSlotWithServiceResponseAsync(resourceGroupName, name, keyType, keyName, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a host level secret. + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteHostSecretSlotWithServiceResponseAsync(String resourceGroupName, String name, String keyType, String keyName, 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 (keyType == null) { + throw new IllegalArgumentException("Parameter keyType is required and cannot be null."); + } + if (keyName == null) { + throw new IllegalArgumentException("Parameter keyName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteHostSecretSlot(resourceGroupName, name, keyType, keyName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteHostSecretSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteHostSecretSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listHostNameBindingsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listHostNameBindingsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listHostNameBindingsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the named hostname binding for an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getHostNameBindingSlot(resourceGroupName, name, slot, hostName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getHostNameBindingSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getHostNameBindingSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a hostname binding for an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(hostNameBinding); + return service.createOrUpdateHostNameBindingSlot(resourceGroupName, name, hostName, slot, this.client.subscriptionId(), hostNameBinding, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateHostNameBindingSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateHostNameBindingSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a hostname binding for an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteHostNameBindingSlot(resourceGroupName, name, slot, hostName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteHostNameBindingSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteHostNameBindingSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getHybridConnectionSlot(resourceGroupName, name, namespaceName, relayName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getHybridConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getHybridConnectionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.createOrUpdateHybridConnectionSlot(resourceGroupName, name, namespaceName, relayName, slot, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateHybridConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateHybridConnectionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Removes a Hybrid Connection from this site. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteHybridConnectionSlot(resourceGroupName, name, namespaceName, relayName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteHybridConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteHybridConnectionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a new Hybrid Connection using a Service Bus relay. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.updateHybridConnectionSlot(resourceGroupName, name, namespaceName, relayName, slot, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateHybridConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateHybridConnectionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Retrieves all Service Bus Hybrid Connections used by this Web App. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listHybridConnectionsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listHybridConnectionsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listHybridConnectionsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets hybrid connections configured for an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listRelayServiceConnectionsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listRelayServiceConnectionsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listRelayServiceConnectionsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a hybrid connection configuration by its name. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getRelayServiceConnectionSlot(resourceGroupName, name, entityName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getRelayServiceConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getRelayServiceConnectionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.createOrUpdateRelayServiceConnectionSlot(resourceGroupName, name, entityName, slot, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateRelayServiceConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateRelayServiceConnectionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a relay service connection by its name. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteRelayServiceConnectionSlot(resourceGroupName, name, entityName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteRelayServiceConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteRelayServiceConnectionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.updateRelayServiceConnectionSlot(resourceGroupName, name, entityName, slot, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateRelayServiceConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateRelayServiceConnectionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all scale-out instances of an app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listInstanceIdentifiersSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceIdentifiersSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceIdentifiersSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all scale-out instances of an app. + * Description for 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 instanceId the String value + * @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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the WebSiteInstanceStatusInner object if successful. + */ + public WebSiteInstanceStatusInner getInstanceInfoSlot(String resourceGroupName, String name, String instanceId, String slot) { + return getInstanceInfoSlotWithServiceResponseAsync(resourceGroupName, name, instanceId, slot).toBlocking().single().body(); + } + + /** + * Gets all scale-out instances of an app. + * Description for 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 instanceId the String value + * @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 getInstanceInfoSlotAsync(String resourceGroupName, String name, String instanceId, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getInstanceInfoSlotWithServiceResponseAsync(resourceGroupName, name, instanceId, slot), serviceCallback); + } + + /** + * Gets all scale-out instances of an app. + * Description for 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 instanceId the String value + * @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 WebSiteInstanceStatusInner object + */ + public Observable getInstanceInfoSlotAsync(String resourceGroupName, String name, String instanceId, String slot) { + return getInstanceInfoSlotWithServiceResponseAsync(resourceGroupName, name, instanceId, slot).map(new Func1, WebSiteInstanceStatusInner>() { + @Override + public WebSiteInstanceStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets all scale-out instances of an app. + * Description for 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 instanceId the String value + * @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 WebSiteInstanceStatusInner object + */ + public Observable> getInstanceInfoSlotWithServiceResponseAsync(String resourceGroupName, String name, String instanceId, 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 (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getInstanceInfoSlot(resourceGroupName, name, instanceId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceInfoSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceInfoSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the status of the last MSDeploy operation. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getInstanceMsDeployStatusSlot(resourceGroupName, name, slot, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceMsDeployStatusSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceMsDeployStatusSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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 DefaultErrorResponseException 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, MSDeploy mSDeploy) { + return createInstanceMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId, mSDeploy).toBlocking().last().body(); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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, MSDeploy mSDeploy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createInstanceMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId, mSDeploy), serviceCallback); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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, MSDeploy 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. + * Description for 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, MSDeploy 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(mSDeploy); + Observable> observable = service.createInstanceMSDeployOperationSlot(resourceGroupName, name, slot, instanceId, this.client.subscriptionId(), mSDeploy, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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 DefaultErrorResponseException 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, MSDeploy mSDeploy) { + return beginCreateInstanceMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId, mSDeploy).toBlocking().single().body(); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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, MSDeploy mSDeploy, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateInstanceMSDeployOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, instanceId, mSDeploy), serviceCallback); + } + + /** + * Invoke the MSDeploy web app extension. + * Description for 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, MSDeploy 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. + * Description for 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, MSDeploy 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(mSDeploy); + return service.beginCreateInstanceMSDeployOperationSlot(resourceGroupName, name, slot, instanceId, this.client.subscriptionId(), mSDeploy, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .register(409, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the MSDeploy Log for the last MSDeploy operation. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getInstanceMSDeployLogSlot(resourceGroupName, name, slot, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceMSDeployLogSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceMSDeployLogSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listInstanceProcessesSlot(resourceGroupName, name, slot, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceProcessesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessesSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getInstanceProcessSlot(resourceGroupName, name, processId, slot, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceProcessSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceProcessSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteInstanceProcessSlot(resourceGroupName, name, processId, slot, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteInstanceProcessSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteInstanceProcessSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getInstanceProcessDumpSlot(resourceGroupName, name, processId, slot, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceProcessDumpSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceProcessDumpSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listInstanceProcessModulesSlot(resourceGroupName, name, processId, slot, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceProcessModulesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessModulesSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getInstanceProcessModuleSlot(resourceGroupName, name, processId, baseAddress, slot, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getInstanceProcessModuleSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getInstanceProcessModuleSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listInstanceProcessThreadsSlot(resourceGroupName, name, processId, slot, instanceId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listInstanceProcessThreadsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listInstanceProcessThreadsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Shows whether an app can be cloned to another resource group or subscription. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.isCloneableSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = isCloneableSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse isCloneableSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets existing backups of an app. + * Description for 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 DefaultErrorResponseException thrown 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 listSiteBackupsSlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listSiteBackupsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteBackupsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets existing backups of an app. + * Description for 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> listSiteBackupsSlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteBackupsSlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteBackupsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets existing backups of an app. + * Description for 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> listSiteBackupsSlotAsync(final String resourceGroupName, final String name, final String slot) { + return listSiteBackupsSlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets existing backups of an app. + * Description for 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>> listSiteBackupsSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listSiteBackupsSlotSinglePageAsync(resourceGroupName, name, slot) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listSiteBackupsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets existing backups of an app. + * Description for 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>> listSiteBackupsSlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSiteBackupsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteBackupsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteBackupsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * This is to allow calling via powershell and ARM template. + * Description for 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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. + * @param serviceCallback 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. + * Description for 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. + * @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. + * Description for 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. + * @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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSyncFunctionTriggersSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listSyncFunctionTriggersSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listSyncFunctionTriggersSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Returns the status of MySql in app migration, if one is active, and whether or not MySql in app is enabled. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getMigrateMySqlStatusSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMigrateMySqlStatusSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMigrateMySqlStatusSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a Swift Virtual Network connection. + * Description for Gets a Swift Virtual Network connection. + * + * @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 a gateway for the production slot's Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SwiftVirtualNetworkInner object if successful. + */ + public SwiftVirtualNetworkInner getSwiftVirtualNetworkConnectionSlot(String resourceGroupName, String name, String slot) { + return getSwiftVirtualNetworkConnectionSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets a Swift Virtual Network connection. + * Description for Gets a Swift Virtual Network connection. + * + * @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 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 getSwiftVirtualNetworkConnectionSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSwiftVirtualNetworkConnectionSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets a Swift Virtual Network connection. + * Description for Gets a Swift Virtual Network connection. + * + * @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 a gateway for the production slot's Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SwiftVirtualNetworkInner object + */ + public Observable getSwiftVirtualNetworkConnectionSlotAsync(String resourceGroupName, String name, String slot) { + return getSwiftVirtualNetworkConnectionSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, SwiftVirtualNetworkInner>() { + @Override + public SwiftVirtualNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a Swift Virtual Network connection. + * Description for Gets a Swift Virtual Network connection. + * + * @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 a gateway for the production slot's Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SwiftVirtualNetworkInner object + */ + public Observable> getSwiftVirtualNetworkConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSwiftVirtualNetworkConnectionSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSwiftVirtualNetworkConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSwiftVirtualNetworkConnectionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @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 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SwiftVirtualNetworkInner object if successful. + */ + public SwiftVirtualNetworkInner createOrUpdateSwiftVirtualNetworkConnectionSlot(String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope) { + return createOrUpdateSwiftVirtualNetworkConnectionSlotWithServiceResponseAsync(resourceGroupName, name, slot, connectionEnvelope).toBlocking().single().body(); + } + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @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 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 createOrUpdateSwiftVirtualNetworkConnectionSlotAsync(String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateSwiftVirtualNetworkConnectionSlotWithServiceResponseAsync(resourceGroupName, name, slot, connectionEnvelope), serviceCallback); + } + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @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 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 SwiftVirtualNetworkInner object + */ + public Observable createOrUpdateSwiftVirtualNetworkConnectionSlotAsync(String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope) { + return createOrUpdateSwiftVirtualNetworkConnectionSlotWithServiceResponseAsync(resourceGroupName, name, slot, connectionEnvelope).map(new Func1, SwiftVirtualNetworkInner>() { + @Override + public SwiftVirtualNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @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 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 SwiftVirtualNetworkInner object + */ + public Observable> createOrUpdateSwiftVirtualNetworkConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner 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 (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.createOrUpdateSwiftVirtualNetworkConnectionSlot(resourceGroupName, name, slot, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateSwiftVirtualNetworkConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateSwiftVirtualNetworkConnectionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a Swift Virtual Network connection from an app (or deployment slot). + * Description for Deletes a Swift Virtual Network connection from an app (or 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 will delete the connection for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteSwiftVirtualNetworkSlot(String resourceGroupName, String name, String slot) { + deleteSwiftVirtualNetworkSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Deletes a Swift Virtual Network connection from an app (or deployment slot). + * Description for Deletes a Swift Virtual Network connection from an app (or 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 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 deleteSwiftVirtualNetworkSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteSwiftVirtualNetworkSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Deletes a Swift Virtual Network connection from an app (or deployment slot). + * Description for Deletes a Swift Virtual Network connection from an app (or 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 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 deleteSwiftVirtualNetworkSlotAsync(String resourceGroupName, String name, String slot) { + return deleteSwiftVirtualNetworkSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a Swift Virtual Network connection from an app (or deployment slot). + * Description for Deletes a Swift Virtual Network connection from an app (or 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 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> deleteSwiftVirtualNetworkSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteSwiftVirtualNetworkSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteSwiftVirtualNetworkSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteSwiftVirtualNetworkSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @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 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SwiftVirtualNetworkInner object if successful. + */ + public SwiftVirtualNetworkInner updateSwiftVirtualNetworkConnectionSlot(String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope) { + return updateSwiftVirtualNetworkConnectionSlotWithServiceResponseAsync(resourceGroupName, name, slot, connectionEnvelope).toBlocking().single().body(); + } + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @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 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 updateSwiftVirtualNetworkConnectionSlotAsync(String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateSwiftVirtualNetworkConnectionSlotWithServiceResponseAsync(resourceGroupName, name, slot, connectionEnvelope), serviceCallback); + } + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @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 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 SwiftVirtualNetworkInner object + */ + public Observable updateSwiftVirtualNetworkConnectionSlotAsync(String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope) { + return updateSwiftVirtualNetworkConnectionSlotWithServiceResponseAsync(resourceGroupName, name, slot, connectionEnvelope).map(new Func1, SwiftVirtualNetworkInner>() { + @Override + public SwiftVirtualNetworkInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + * + * @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 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 SwiftVirtualNetworkInner object + */ + public Observable> updateSwiftVirtualNetworkConnectionSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner 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 (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.updateSwiftVirtualNetworkConnectionSlot(resourceGroupName, name, slot, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateSwiftVirtualNetworkConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateSwiftVirtualNetworkConnectionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all network features used by the app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listNetworkFeaturesSlot(resourceGroupName, name, view, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listNetworkFeaturesSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listNetworkFeaturesSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List getNetworkTraceOperationSlot(String resourceGroupName, String name, String operationId, String slot) { + return getNetworkTraceOperationSlotWithServiceResponseAsync(resourceGroupName, name, operationId, slot).toBlocking().single().body(); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation 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> getNetworkTraceOperationSlotAsync(String resourceGroupName, String name, String operationId, String slot, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(getNetworkTraceOperationSlotWithServiceResponseAsync(resourceGroupName, name, operationId, slot), serviceCallback); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NetworkTraceInner> object + */ + public Observable> getNetworkTraceOperationSlotAsync(String resourceGroupName, String name, String operationId, String slot) { + return getNetworkTraceOperationSlotWithServiceResponseAsync(resourceGroupName, name, operationId, slot).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NetworkTraceInner> object + */ + public Observable>> getNetworkTraceOperationSlotWithServiceResponseAsync(String resourceGroupName, String name, String operationId, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (operationId == null) { + throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getNetworkTraceOperationSlot(resourceGroupName, name, operationId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = getNetworkTraceOperationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getNetworkTraceOperationSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Start capturing network packets for the site (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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 DefaultErrorResponseException 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 (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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 (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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 (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return service.startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.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 (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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 DefaultErrorResponseException 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 (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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 (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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 (To be deprecated). + * Description for Start capturing network packets for the site (To be deprecated). + * + * @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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.startWebSiteNetworkTraceSlot(resourceGroupName, name, slot, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Start capturing network packets for the site. + * Description for 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 DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List startWebSiteNetworkTraceOperationSlot(String resourceGroupName, String name, String slot) { + return startWebSiteNetworkTraceOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().last().body(); + } + + /** + * Start capturing network packets for the site. + * Description for 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> startWebSiteNetworkTraceOperationSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(startWebSiteNetworkTraceOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + public Observable> startWebSiteNetworkTraceOperationSlotAsync(String resourceGroupName, String name, String slot) { + return startWebSiteNetworkTraceOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + public Observable>> startWebSiteNetworkTraceOperationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + Observable> observable = service.startWebSiteNetworkTraceOperationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken>() { }.getType()); + } + /** + * Start capturing network packets for the site. + * Description for 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 DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List startWebSiteNetworkTraceOperationSlot(String resourceGroupName, String name, String slot, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return startWebSiteNetworkTraceOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl).toBlocking().last().body(); + } + + /** + * Start capturing network packets for the site. + * Description for 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> startWebSiteNetworkTraceOperationSlotAsync(String resourceGroupName, String name, String slot, Integer durationInSeconds, Integer maxFrameLength, String sasUrl, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(startWebSiteNetworkTraceOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + public Observable> startWebSiteNetworkTraceOperationSlotAsync(String resourceGroupName, String name, String slot, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return startWebSiteNetworkTraceOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + public Observable>> startWebSiteNetworkTraceOperationSlotWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.startWebSiteNetworkTraceOperationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken>() { }.getType()); + } + + /** + * Start capturing network packets for the site. + * Description for 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 DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List beginStartWebSiteNetworkTraceOperationSlot(String resourceGroupName, String name, String slot) { + return beginStartWebSiteNetworkTraceOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Start capturing network packets for the site. + * Description for 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> beginStartWebSiteNetworkTraceOperationSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(beginStartWebSiteNetworkTraceOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Description for 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 List<NetworkTraceInner> object + */ + public Observable> beginStartWebSiteNetworkTraceOperationSlotAsync(String resourceGroupName, String name, String slot) { + return beginStartWebSiteNetworkTraceOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 List<NetworkTraceInner> object + */ + public Observable>> beginStartWebSiteNetworkTraceOperationSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return service.beginStartWebSiteNetworkTraceOperationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = beginStartWebSiteNetworkTraceOperationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List beginStartWebSiteNetworkTraceOperationSlot(String resourceGroupName, String name, String slot, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return beginStartWebSiteNetworkTraceOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl).toBlocking().single().body(); + } + + /** + * Start capturing network packets for the site. + * Description for 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> beginStartWebSiteNetworkTraceOperationSlotAsync(String resourceGroupName, String name, String slot, Integer durationInSeconds, Integer maxFrameLength, String sasUrl, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(beginStartWebSiteNetworkTraceOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Description for 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 List<NetworkTraceInner> object + */ + public Observable> beginStartWebSiteNetworkTraceOperationSlotAsync(String resourceGroupName, String name, String slot, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return beginStartWebSiteNetworkTraceOperationSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 List<NetworkTraceInner> object + */ + public Observable>> beginStartWebSiteNetworkTraceOperationSlotWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginStartWebSiteNetworkTraceOperationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = beginStartWebSiteNetworkTraceOperationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> beginStartWebSiteNetworkTraceOperationSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void stopWebSiteNetworkTraceSlot(String resourceGroupName, String name, String slot) { + stopWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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. + * Description for 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 {@link ServiceResponse} object if successful. + */ + public Observable stopWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot) { + return stopWebSiteNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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 {@link ServiceResponse} object if successful. + */ + 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.stopWebSiteNetworkTraceSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = stopWebSiteNetworkTraceSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse stopWebSiteNetworkTraceSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List getNetworkTracesSlot(String resourceGroupName, String name, String operationId, String slot) { + return getNetworkTracesSlotWithServiceResponseAsync(resourceGroupName, name, operationId, slot).toBlocking().single().body(); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation 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> getNetworkTracesSlotAsync(String resourceGroupName, String name, String operationId, String slot, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(getNetworkTracesSlotWithServiceResponseAsync(resourceGroupName, name, operationId, slot), serviceCallback); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NetworkTraceInner> object + */ + public Observable> getNetworkTracesSlotAsync(String resourceGroupName, String name, String operationId, String slot) { + return getNetworkTracesSlotWithServiceResponseAsync(resourceGroupName, name, operationId, slot).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NetworkTraceInner> object + */ + public Observable>> getNetworkTracesSlotWithServiceResponseAsync(String resourceGroupName, String name, String operationId, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (operationId == null) { + throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getNetworkTracesSlot(resourceGroupName, name, operationId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = getNetworkTracesSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getNetworkTracesSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List getNetworkTraceOperationSlotV2(String resourceGroupName, String name, String operationId, String slot) { + return getNetworkTraceOperationSlotV2WithServiceResponseAsync(resourceGroupName, name, operationId, slot).toBlocking().single().body(); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation 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> getNetworkTraceOperationSlotV2Async(String resourceGroupName, String name, String operationId, String slot, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(getNetworkTraceOperationSlotV2WithServiceResponseAsync(resourceGroupName, name, operationId, slot), serviceCallback); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NetworkTraceInner> object + */ + public Observable> getNetworkTraceOperationSlotV2Async(String resourceGroupName, String name, String operationId, String slot) { + return getNetworkTraceOperationSlotV2WithServiceResponseAsync(resourceGroupName, name, operationId, slot).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NetworkTraceInner> object + */ + public Observable>> getNetworkTraceOperationSlotV2WithServiceResponseAsync(String resourceGroupName, String name, String operationId, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (operationId == null) { + throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getNetworkTraceOperationSlotV2(resourceGroupName, name, operationId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = getNetworkTraceOperationSlotV2Delegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getNetworkTraceOperationSlotV2Delegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List getNetworkTracesSlotV2(String resourceGroupName, String name, String operationId, String slot) { + return getNetworkTracesSlotV2WithServiceResponseAsync(resourceGroupName, name, operationId, slot).toBlocking().single().body(); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation 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> getNetworkTracesSlotV2Async(String resourceGroupName, String name, String operationId, String slot, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(getNetworkTracesSlotV2WithServiceResponseAsync(resourceGroupName, name, operationId, slot), serviceCallback); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NetworkTraceInner> object + */ + public Observable> getNetworkTracesSlotV2Async(String resourceGroupName, String name, String operationId, String slot) { + return getNetworkTracesSlotV2WithServiceResponseAsync(resourceGroupName, name, operationId, slot).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a named operation for a network trace capturing (or deployment slot, if specified). + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NetworkTraceInner> object + */ + public Observable>> getNetworkTracesSlotV2WithServiceResponseAsync(String resourceGroupName, String name, String operationId, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (operationId == null) { + throw new IllegalArgumentException("Parameter operationId is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getNetworkTracesSlotV2(resourceGroupName, name, operationId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = getNetworkTracesSlotV2Delegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getNetworkTracesSlotV2Delegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Generates a new publishing password for an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.generateNewSitePublishingPasswordSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets perfmon counters for web app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + return service.listPerfMonCountersSlot(resourceGroupName, name, slot, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPerfMonCountersSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets perfmon counters for web app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listPerfMonCountersSlot(resourceGroupName, name, slot, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPerfMonCountersSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPerfMonCountersSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets web app's event logs. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSitePhpErrorLogFlagSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSitePhpErrorLogFlagSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSitePhpErrorLogFlagSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the premier add-ons of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listPremierAddOnsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listPremierAddOnsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listPremierAddOnsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a named add-on of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getPremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getPremierAddOnSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPremierAddOnSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates a named add-on of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(premierAddOn); + return service.addPremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, this.client.subscriptionId(), premierAddOn, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a premier add-on from an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deletePremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deletePremierAddOnSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deletePremierAddOnSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates a named add-on of an app. + * Description for 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 DefaultErrorResponseException 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 updatePremierAddOnSlot(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnPatchResource premierAddOn) { + return updatePremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot, premierAddOn).toBlocking().single().body(); + } + + /** + * Updates a named add-on of an app. + * Description for 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 updatePremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnPatchResource premierAddOn, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updatePremierAddOnSlotWithServiceResponseAsync(resourceGroupName, name, premierAddOnName, slot, premierAddOn), serviceCallback); + } + + /** + * Updates a named add-on of an app. + * Description for 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 updatePremierAddOnSlotAsync(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnPatchResource premierAddOn) { + return updatePremierAddOnSlotWithServiceResponseAsync(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. + * Description for 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> updatePremierAddOnSlotWithServiceResponseAsync(String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnPatchResource 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(premierAddOn); + return service.updatePremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, this.client.subscriptionId(), premierAddOn, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updatePremierAddOnSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updatePremierAddOnSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access 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 the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateAccessInner object if successful. + */ + public PrivateAccessInner getPrivateAccessSlot(String resourceGroupName, String name, String slot) { + return getPrivateAccessSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Gets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access 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 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 getPrivateAccessSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getPrivateAccessSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Gets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access 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 the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateAccessInner object + */ + public Observable getPrivateAccessSlotAsync(String resourceGroupName, String name, String slot) { + return getPrivateAccessSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, PrivateAccessInner>() { + @Override + public PrivateAccessInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access 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 the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateAccessInner object + */ + public Observable> getPrivateAccessSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getPrivateAccessSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getPrivateAccessSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPrivateAccessSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Sets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access 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 the web app. + * @param access The information for the private access + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateAccessInner object if successful. + */ + public PrivateAccessInner putPrivateAccessVnetSlot(String resourceGroupName, String name, String slot, PrivateAccessInner access) { + return putPrivateAccessVnetSlotWithServiceResponseAsync(resourceGroupName, name, slot, access).toBlocking().single().body(); + } + + /** + * Sets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access 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 the web app. + * @param access The information for the private access + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture putPrivateAccessVnetSlotAsync(String resourceGroupName, String name, String slot, PrivateAccessInner access, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(putPrivateAccessVnetSlotWithServiceResponseAsync(resourceGroupName, name, slot, access), serviceCallback); + } + + /** + * Sets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access 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 the web app. + * @param access The information for the private access + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateAccessInner object + */ + public Observable putPrivateAccessVnetSlotAsync(String resourceGroupName, String name, String slot, PrivateAccessInner access) { + return putPrivateAccessVnetSlotWithServiceResponseAsync(resourceGroupName, name, slot, access).map(new Func1, PrivateAccessInner>() { + @Override + public PrivateAccessInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Sets data around private site access enablement and authorized Virtual Networks that can access the site. + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access 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 the web app. + * @param access The information for the private access + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateAccessInner object + */ + public Observable> putPrivateAccessVnetSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, PrivateAccessInner access) { + if (resourceGroupName == null) { + throw new 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 (access == null) { + throw new IllegalArgumentException("Parameter access is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(access); + return service.putPrivateAccessVnetSlot(resourceGroupName, name, slot, this.client.subscriptionId(), access, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = putPrivateAccessVnetSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse putPrivateAccessVnetSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a private endpoint connection. + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointConnectionResourceInner object if successful. + */ + public PrivateEndpointConnectionResourceInner getPrivateEndpointConnection(String resourceGroupName, String name, String privateEndpointConnectionName) { + return getPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, name, privateEndpointConnectionName).toBlocking().single().body(); + } + + /** + * Gets a private endpoint connection. + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getPrivateEndpointConnectionAsync(String resourceGroupName, String name, String privateEndpointConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, name, privateEndpointConnectionName), serviceCallback); + } + + /** + * Gets a private endpoint connection. + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionResourceInner object + */ + public Observable getPrivateEndpointConnectionAsync(String resourceGroupName, String name, String privateEndpointConnectionName) { + return getPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, name, privateEndpointConnectionName).map(new Func1, PrivateEndpointConnectionResourceInner>() { + @Override + public PrivateEndpointConnectionResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a private endpoint connection. + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionResourceInner object + */ + public Observable> getPrivateEndpointConnectionWithServiceResponseAsync(String resourceGroupName, String name, String privateEndpointConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getPrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getPrivateEndpointConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPrivateEndpointConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Approves or rejects a private endpoint connection. + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @param privateEndpointWrapper the PrivateLinkConnectionApprovalRequestResource value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointConnectionResourceInner object if successful. + */ + public PrivateEndpointConnectionResourceInner approveOrRejectPrivateEndpointConnection(String resourceGroupName, String name, String privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return approveOrRejectPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).toBlocking().last().body(); + } + + /** + * Approves or rejects a private endpoint connection. + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @param privateEndpointWrapper the PrivateLinkConnectionApprovalRequestResource value + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture approveOrRejectPrivateEndpointConnectionAsync(String resourceGroupName, String name, String privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(approveOrRejectPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper), serviceCallback); + } + + /** + * Approves or rejects a private endpoint connection. + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @param privateEndpointWrapper the PrivateLinkConnectionApprovalRequestResource value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable approveOrRejectPrivateEndpointConnectionAsync(String resourceGroupName, String name, String privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return approveOrRejectPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).map(new Func1, PrivateEndpointConnectionResourceInner>() { + @Override + public PrivateEndpointConnectionResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Approves or rejects a private endpoint connection. + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @param privateEndpointWrapper the PrivateLinkConnectionApprovalRequestResource value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> approveOrRejectPrivateEndpointConnectionWithServiceResponseAsync(String resourceGroupName, String name, String privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (privateEndpointWrapper == null) { + throw new IllegalArgumentException("Parameter privateEndpointWrapper is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(privateEndpointWrapper); + Observable> observable = service.approveOrRejectPrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName, this.client.subscriptionId(), privateEndpointWrapper, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Approves or rejects a private endpoint connection. + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @param privateEndpointWrapper the PrivateLinkConnectionApprovalRequestResource value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointConnectionResourceInner object if successful. + */ + public PrivateEndpointConnectionResourceInner beginApproveOrRejectPrivateEndpointConnection(String resourceGroupName, String name, String privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return beginApproveOrRejectPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).toBlocking().single().body(); + } + + /** + * Approves or rejects a private endpoint connection. + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @param privateEndpointWrapper the PrivateLinkConnectionApprovalRequestResource value + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginApproveOrRejectPrivateEndpointConnectionAsync(String resourceGroupName, String name, String privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginApproveOrRejectPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper), serviceCallback); + } + + /** + * Approves or rejects a private endpoint connection. + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @param privateEndpointWrapper the PrivateLinkConnectionApprovalRequestResource value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionResourceInner object + */ + public Observable beginApproveOrRejectPrivateEndpointConnectionAsync(String resourceGroupName, String name, String privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return beginApproveOrRejectPrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).map(new Func1, PrivateEndpointConnectionResourceInner>() { + @Override + public PrivateEndpointConnectionResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Approves or rejects a private endpoint connection. + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @param privateEndpointWrapper the PrivateLinkConnectionApprovalRequestResource value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionResourceInner object + */ + public Observable> beginApproveOrRejectPrivateEndpointConnectionWithServiceResponseAsync(String resourceGroupName, String name, String privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (privateEndpointWrapper == null) { + throw new IllegalArgumentException("Parameter privateEndpointWrapper is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(privateEndpointWrapper); + return service.beginApproveOrRejectPrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName, this.client.subscriptionId(), privateEndpointWrapper, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginApproveOrRejectPrivateEndpointConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginApproveOrRejectPrivateEndpointConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a private endpoint connection. + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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 deletePrivateEndpointConnection(String resourceGroupName, String name, String privateEndpointConnectionName) { + return deletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, name, privateEndpointConnectionName).toBlocking().last().body(); + } + + /** + * Deletes a private endpoint connection. + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deletePrivateEndpointConnectionAsync(String resourceGroupName, String name, String privateEndpointConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, name, privateEndpointConnectionName), serviceCallback); + } + + /** + * Deletes a private endpoint connection. + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deletePrivateEndpointConnectionAsync(String resourceGroupName, String name, String privateEndpointConnectionName) { + return deletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, name, privateEndpointConnectionName).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a private endpoint connection. + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deletePrivateEndpointConnectionWithServiceResponseAsync(String resourceGroupName, String name, String privateEndpointConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.deletePrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a private endpoint connection. + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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 beginDeletePrivateEndpointConnection(String resourceGroupName, String name, String privateEndpointConnectionName) { + return beginDeletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, name, privateEndpointConnectionName).toBlocking().single().body(); + } + + /** + * Deletes a private endpoint connection. + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeletePrivateEndpointConnectionAsync(String resourceGroupName, String name, String privateEndpointConnectionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, name, privateEndpointConnectionName), serviceCallback); + } + + /** + * Deletes a private endpoint connection. + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Object object + */ + public Observable beginDeletePrivateEndpointConnectionAsync(String resourceGroupName, String name, String privateEndpointConnectionName) { + return beginDeletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, name, privateEndpointConnectionName).map(new Func1, Object>() { + @Override + public Object call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a private endpoint connection. + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Object object + */ + public Observable> beginDeletePrivateEndpointConnectionWithServiceResponseAsync(String resourceGroupName, String name, String privateEndpointConnectionName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDeletePrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeletePrivateEndpointConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeletePrivateEndpointConnectionDelegate(Response response) throws DefaultErrorResponseException, 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(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the private link resources. + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateLinkResourcesWrapperInner object if successful. + */ + public PrivateLinkResourcesWrapperInner getPrivateLinkResources(String resourceGroupName, String name) { + return getPrivateLinkResourcesWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Gets the private link resources. + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getPrivateLinkResourcesAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getPrivateLinkResourcesWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Gets the private link resources. + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkResourcesWrapperInner object + */ + public Observable getPrivateLinkResourcesAsync(String resourceGroupName, String name) { + return getPrivateLinkResourcesWithServiceResponseAsync(resourceGroupName, name).map(new Func1, PrivateLinkResourcesWrapperInner>() { + @Override + public PrivateLinkResourcesWrapperInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the private link resources. + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkResourcesWrapperInner object + */ + public Observable> getPrivateLinkResourcesWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getPrivateLinkResources(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getPrivateLinkResourcesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPrivateLinkResourcesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listProcessesSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProcessesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessesSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getProcessSlot(resourceGroupName, name, processId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getProcessSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getProcessSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteProcessSlot(resourceGroupName, name, processId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteProcessSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteProcessSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getProcessDumpSlot(resourceGroupName, name, processId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getProcessDumpSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getProcessDumpSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listProcessModulesSlot(resourceGroupName, name, processId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProcessModulesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessModulesSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get process information by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getProcessModuleSlot(resourceGroupName, name, processId, baseAddress, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getProcessModuleSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getProcessModuleSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listProcessThreadsSlot(resourceGroupName, name, processId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listProcessThreadsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listProcessThreadsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get public certificates for an app or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listPublicCertificatesSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPublicCertificatesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPublicCertificatesSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the named public certificate for an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getPublicCertificateSlot(resourceGroupName, name, slot, publicCertificateName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getPublicCertificateSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getPublicCertificateSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Creates a hostname binding for an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(publicCertificate); + return service.createOrUpdatePublicCertificateSlot(resourceGroupName, name, publicCertificateName, slot, this.client.subscriptionId(), publicCertificate, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a hostname binding for an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deletePublicCertificateSlot(resourceGroupName, name, slot, publicCertificateName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deletePublicCertificateSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deletePublicCertificateSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Description for 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 publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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, CsmPublishingProfileOptions publishingProfileOptions) { + return listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(resourceGroupName, name, slot, publishingProfileOptions).toBlocking().single().body(); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Description for 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 publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @param serviceCallback 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, CsmPublishingProfileOptions publishingProfileOptions, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(resourceGroupName, name, slot, publishingProfileOptions), serviceCallback); + } + + /** + * Gets the publishing profile for an app (or deployment slot, if specified). + * Description for 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 publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable listPublishingProfileXmlWithSecretsSlotAsync(String resourceGroupName, String name, String slot, CsmPublishingProfileOptions publishingProfileOptions) { + return listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(resourceGroupName, name, slot, publishingProfileOptions).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). + * Description for 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 publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the InputStream object + */ + public Observable> listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, CsmPublishingProfileOptions publishingProfileOptions) { + if (resourceGroupName == null) { + throw new 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 (publishingProfileOptions == null) { + throw new IllegalArgumentException("Parameter publishingProfileOptions is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(publishingProfileOptions); + return service.listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), publishingProfileOptions, this.client.apiVersion(), this.client.acceptLanguage(), 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Resets the configuration settings of the current slot if they were previously modified by calling the API with POST. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.resetSlotConfigurationSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = resetSlotConfigurationSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse resetSlotConfigurationSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Restarts an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Boolean softRestart = null; + final Boolean synchronous = null; + return service.restartSlot(resourceGroupName, name, slot, this.client.subscriptionId(), softRestart, synchronous, this.client.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). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.restartSlot(resourceGroupName, name, slot, this.client.subscriptionId(), softRestart, synchronous, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup 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 restore a backup of the production slot. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void restoreFromBackupBlobSlot(String resourceGroupName, String name, String slot, RestoreRequestInner request) { + restoreFromBackupBlobSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).toBlocking().last().body(); + } + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup 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 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 restoreFromBackupBlobSlotAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restoreFromBackupBlobSlotWithServiceResponseAsync(resourceGroupName, name, slot, request), serviceCallback); + } + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup 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 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 restoreFromBackupBlobSlotAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request) { + return restoreFromBackupBlobSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup 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 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> restoreFromBackupBlobSlotWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(request); + Observable> observable = service.restoreFromBackupBlobSlot(resourceGroupName, name, slot, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup 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 restore a backup of the production slot. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginRestoreFromBackupBlobSlot(String resourceGroupName, String name, String slot, RestoreRequestInner request) { + beginRestoreFromBackupBlobSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).toBlocking().single().body(); + } + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup 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 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 beginRestoreFromBackupBlobSlotAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRestoreFromBackupBlobSlotWithServiceResponseAsync(resourceGroupName, name, slot, request), serviceCallback); + } + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup 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 restore a backup of the production slot. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginRestoreFromBackupBlobSlotAsync(String resourceGroupName, String name, String slot, RestoreRequestInner request) { + return beginRestoreFromBackupBlobSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores an app from a backup blob in Azure Storage. + * Description for Restores an app from a backup 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 restore a backup of the production slot. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginRestoreFromBackupBlobSlotWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(request); + return service.beginRestoreFromBackupBlobSlot(resourceGroupName, name, slot, this.client.subscriptionId(), request, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRestoreFromBackupBlobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRestoreFromBackupBlobSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this 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 restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void restoreFromDeletedAppSlot(String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { + restoreFromDeletedAppSlotWithServiceResponseAsync(resourceGroupName, name, slot, restoreRequest).toBlocking().last().body(); + } + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this 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 restoreRequest Deleted web app restore 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 restoreFromDeletedAppSlotAsync(String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restoreFromDeletedAppSlotWithServiceResponseAsync(resourceGroupName, name, slot, restoreRequest), serviceCallback); + } + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this 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 restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable restoreFromDeletedAppSlotAsync(String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { + return restoreFromDeletedAppSlotWithServiceResponseAsync(resourceGroupName, name, slot, restoreRequest).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this 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 restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> restoreFromDeletedAppSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { + if (resourceGroupName == null) { + throw new 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 (restoreRequest == null) { + throw new IllegalArgumentException("Parameter restoreRequest is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(restoreRequest); + Observable> observable = service.restoreFromDeletedAppSlot(resourceGroupName, name, slot, this.client.subscriptionId(), restoreRequest, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this 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 restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginRestoreFromDeletedAppSlot(String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { + beginRestoreFromDeletedAppSlotWithServiceResponseAsync(resourceGroupName, name, slot, restoreRequest).toBlocking().single().body(); + } + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this 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 restoreRequest Deleted web app restore 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 beginRestoreFromDeletedAppSlotAsync(String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRestoreFromDeletedAppSlotWithServiceResponseAsync(resourceGroupName, name, slot, restoreRequest), serviceCallback); + } + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this 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 restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginRestoreFromDeletedAppSlotAsync(String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { + return beginRestoreFromDeletedAppSlotWithServiceResponseAsync(resourceGroupName, name, slot, restoreRequest).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a deleted web app to this web app. + * Description for Restores a deleted web app to this 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 restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginRestoreFromDeletedAppSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { + if (resourceGroupName == null) { + throw new 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 (restoreRequest == null) { + throw new IllegalArgumentException("Parameter restoreRequest is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(restoreRequest); + return service.beginRestoreFromDeletedAppSlot(resourceGroupName, name, slot, this.client.subscriptionId(), restoreRequest, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRestoreFromDeletedAppSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRestoreFromDeletedAppSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a 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 restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void restoreSnapshotSlot(String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { + restoreSnapshotSlotWithServiceResponseAsync(resourceGroupName, name, slot, restoreRequest).toBlocking().last().body(); + } + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a 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 restoreRequest Snapshot restore settings. 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 restoreSnapshotSlotAsync(String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(restoreSnapshotSlotWithServiceResponseAsync(resourceGroupName, name, slot, restoreRequest), serviceCallback); + } + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a 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 restoreRequest Snapshot restore settings. 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 restoreSnapshotSlotAsync(String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { + return restoreSnapshotSlotWithServiceResponseAsync(resourceGroupName, name, slot, restoreRequest).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a 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 restoreRequest Snapshot restore settings. 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> restoreSnapshotSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { + if (resourceGroupName == null) { + throw new 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 (restoreRequest == null) { + throw new IllegalArgumentException("Parameter restoreRequest is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(restoreRequest); + Observable> observable = service.restoreSnapshotSlot(resourceGroupName, name, slot, this.client.subscriptionId(), restoreRequest, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a 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 restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginRestoreSnapshotSlot(String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { + beginRestoreSnapshotSlotWithServiceResponseAsync(resourceGroupName, name, slot, restoreRequest).toBlocking().single().body(); + } + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a 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 restoreRequest Snapshot restore settings. 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 beginRestoreSnapshotSlotAsync(String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRestoreSnapshotSlotWithServiceResponseAsync(resourceGroupName, name, slot, restoreRequest), serviceCallback); + } + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a 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 restoreRequest Snapshot restore settings. 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 beginRestoreSnapshotSlotAsync(String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { + return beginRestoreSnapshotSlotWithServiceResponseAsync(resourceGroupName, name, slot, restoreRequest).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Restores a web app from a snapshot. + * Description for Restores a web app from a 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 restoreRequest Snapshot restore settings. 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> beginRestoreSnapshotSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { + if (resourceGroupName == null) { + throw new 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 (restoreRequest == null) { + throw new IllegalArgumentException("Parameter restoreRequest is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(restoreRequest); + return service.beginRestoreSnapshotSlot(resourceGroupName, name, slot, this.client.subscriptionId(), restoreRequest, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRestoreSnapshotSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRestoreSnapshotSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Description for 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 uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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 uses 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. + * Description for 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 uses 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. + * Description for 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 uses 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. + * Description for 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 uses 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSiteExtensionsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteExtensionsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteExtensionsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get site extension information by its ID for a web site, or a deployment slot. + * Description for 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 uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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 uses 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. + * Description for 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 uses 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. + * Description for 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 uses 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSiteExtensionSlot(resourceGroupName, name, siteExtensionId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSiteExtensionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSiteExtensionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Install site extension on a web site, or a deployment slot. + * Description for 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 uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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 uses 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. + * Description for 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 uses 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. + * Description for 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 uses 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.installSiteExtensionSlot(resourceGroupName, name, siteExtensionId, slot, this.client.subscriptionId(), this.client.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. + * Description for 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 uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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 uses 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. + * Description for 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 uses 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. + * Description for 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 uses 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginInstallSiteExtensionSlot(resourceGroupName, name, siteExtensionId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginInstallSiteExtensionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginInstallSiteExtensionSlotDelegate(Response response) throws DefaultErrorResponseException, 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(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Remove a site extension from a web site, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteSiteExtensionSlot(resourceGroupName, name, siteExtensionId, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteSiteExtensionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteSiteExtensionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot 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 copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void copySlotSlot(String resourceGroupName, String name, String slot, CsmCopySlotEntity copySlotEntity) { + copySlotSlotWithServiceResponseAsync(resourceGroupName, name, slot, copySlotEntity).toBlocking().last().body(); + } + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot 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 copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. 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 copySlotSlotAsync(String resourceGroupName, String name, String slot, CsmCopySlotEntity copySlotEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(copySlotSlotWithServiceResponseAsync(resourceGroupName, name, slot, copySlotEntity), serviceCallback); + } + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot 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 copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable copySlotSlotAsync(String resourceGroupName, String name, String slot, CsmCopySlotEntity copySlotEntity) { + return copySlotSlotWithServiceResponseAsync(resourceGroupName, name, slot, copySlotEntity).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot 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 copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> copySlotSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, CsmCopySlotEntity copySlotEntity) { + if (resourceGroupName == null) { + throw new 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 (copySlotEntity == null) { + throw new IllegalArgumentException("Parameter copySlotEntity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(copySlotEntity); + Observable> observable = service.copySlotSlot(resourceGroupName, name, slot, this.client.subscriptionId(), copySlotEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot 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 copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginCopySlotSlot(String resourceGroupName, String name, String slot, CsmCopySlotEntity copySlotEntity) { + beginCopySlotSlotWithServiceResponseAsync(resourceGroupName, name, slot, copySlotEntity).toBlocking().single().body(); + } + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot 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 copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. 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 beginCopySlotSlotAsync(String resourceGroupName, String name, String slot, CsmCopySlotEntity copySlotEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCopySlotSlotWithServiceResponseAsync(resourceGroupName, name, slot, copySlotEntity), serviceCallback); + } + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot 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 copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginCopySlotSlotAsync(String resourceGroupName, String name, String slot, CsmCopySlotEntity copySlotEntity) { + return beginCopySlotSlotWithServiceResponseAsync(resourceGroupName, name, slot, copySlotEntity).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Copies a deployment slot to another deployment slot of an app. + * Description for Copies a deployment slot to another deployment slot 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 copySlotEntity JSON object that contains the target slot name and site config properties to override the source slot config. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginCopySlotSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, CsmCopySlotEntity copySlotEntity) { + if (resourceGroupName == null) { + throw new 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 (copySlotEntity == null) { + throw new IllegalArgumentException("Parameter copySlotEntity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(copySlotEntity); + return service.beginCopySlotSlot(resourceGroupName, name, slot, this.client.subscriptionId(), copySlotEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCopySlotSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCopySlotSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the difference in configuration settings between two web app slots. + * Description for 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 DefaultErrorResponseException thrown 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 CsmSlotEntity 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. + * Description for 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 CsmSlotEntity 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. + * Description for 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 CsmSlotEntity 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. + * Description for 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 CsmSlotEntity 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. + * Description for 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 CsmSlotEntity slotSwapEntity) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (slotSwapEntity == null) { + throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(slotSwapEntity); + return service.listSlotDifferencesSlot(resourceGroupName, name, slot, this.client.subscriptionId(), slotSwapEntity, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Swaps two deployment slots of an app. + * Description for 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 DefaultErrorResponseException 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, CsmSlotEntity slotSwapEntity) { + swapSlotSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().last().body(); + } + + /** + * Swaps two deployment slots of an app. + * Description for 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, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(swapSlotSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity), serviceCallback); + } + + /** + * Swaps two deployment slots of an app. + * Description for 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, CsmSlotEntity 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. + * Description for 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, CsmSlotEntity slotSwapEntity) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (slotSwapEntity == null) { + throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(slotSwapEntity); + Observable> observable = service.swapSlotSlot(resourceGroupName, name, slot, this.client.subscriptionId(), slotSwapEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Swaps two deployment slots of an app. + * Description for 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 DefaultErrorResponseException 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, CsmSlotEntity slotSwapEntity) { + beginSwapSlotSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().single().body(); + } + + /** + * Swaps two deployment slots of an app. + * Description for 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, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginSwapSlotSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity), serviceCallback); + } + + /** + * Swaps two deployment slots of an app. + * Description for 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, CsmSlotEntity 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. + * Description for 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, CsmSlotEntity slotSwapEntity) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (slotSwapEntity == null) { + throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(slotSwapEntity); + return service.beginSwapSlotSlot(resourceGroupName, name, slot, this.client.subscriptionId(), slotSwapEntity, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Returns all Snapshots to the user. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSnapshotsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSnapshotsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSnapshotsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @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 DefaultErrorResponseException thrown 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 listSnapshotsFromDRSecondarySlot(final String resourceGroupName, final String name, final String slot) { + ServiceResponse> response = listSnapshotsFromDRSecondarySlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSnapshotsFromDRSecondarySlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @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> listSnapshotsFromDRSecondarySlotAsync(final String resourceGroupName, final String name, final String slot, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSnapshotsFromDRSecondarySlotSinglePageAsync(resourceGroupName, name, slot), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSnapshotsFromDRSecondarySlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @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> listSnapshotsFromDRSecondarySlotAsync(final String resourceGroupName, final String name, final String slot) { + return listSnapshotsFromDRSecondarySlotWithServiceResponseAsync(resourceGroupName, name, slot) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @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>> listSnapshotsFromDRSecondarySlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) { + return listSnapshotsFromDRSecondarySlotSinglePageAsync(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(listSnapshotsFromDRSecondarySlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + 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>> listSnapshotsFromDRSecondarySlotSinglePageAsync(final String resourceGroupName, final String name, final String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSnapshotsFromDRSecondarySlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSnapshotsFromDRSecondarySlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSnapshotsFromDRSecondarySlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the source control configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSourceControlSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSourceControlSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSourceControlSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the source control configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteSourceControl); + Observable> observable = service.createOrUpdateSourceControlSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteSourceControl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates the source control configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteSourceControl); + return service.beginCreateOrUpdateSourceControlSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteSourceControl, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes the source control configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteSourceControlSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteSourceControlSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteSourceControlSlotDelegate(Response response) throws DefaultErrorResponseException, 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(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the source control configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteSourceControl); + return service.updateSourceControlSlot(resourceGroupName, name, slot, this.client.subscriptionId(), siteSourceControl, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Starts an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.startSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = startSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse startSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Start capturing network packets for the site. + * Description for 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 DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List startNetworkTraceSlot(String resourceGroupName, String name, String slot) { + return startNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().last().body(); + } + + /** + * Start capturing network packets for the site. + * Description for 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> startNetworkTraceSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(startNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + public Observable> startNetworkTraceSlotAsync(String resourceGroupName, String name, String slot) { + return startNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + public Observable>> startNetworkTraceSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + Observable> observable = service.startNetworkTraceSlot(resourceGroupName, name, slot, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken>() { }.getType()); + } + /** + * Start capturing network packets for the site. + * Description for 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 DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List startNetworkTraceSlot(String resourceGroupName, String name, String slot, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return startNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl).toBlocking().last().body(); + } + + /** + * Start capturing network packets for the site. + * Description for 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> startNetworkTraceSlotAsync(String resourceGroupName, String name, String slot, Integer durationInSeconds, Integer maxFrameLength, String sasUrl, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(startNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + public Observable> startNetworkTraceSlotAsync(String resourceGroupName, String name, String slot, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return startNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + public Observable>> startNetworkTraceSlotWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.startNetworkTraceSlot(resourceGroupName, name, slot, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken>() { }.getType()); + } + + /** + * Start capturing network packets for the site. + * Description for 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 DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List beginStartNetworkTraceSlot(String resourceGroupName, String name, String slot) { + return beginStartNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Start capturing network packets for the site. + * Description for 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> beginStartNetworkTraceSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(beginStartNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Description for 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 List<NetworkTraceInner> object + */ + public Observable> beginStartNetworkTraceSlotAsync(String resourceGroupName, String name, String slot) { + return beginStartNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 List<NetworkTraceInner> object + */ + public Observable>> beginStartNetworkTraceSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return service.beginStartNetworkTraceSlot(resourceGroupName, name, slot, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = beginStartNetworkTraceSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List beginStartNetworkTraceSlot(String resourceGroupName, String name, String slot, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return beginStartNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl).toBlocking().single().body(); + } + + /** + * Start capturing network packets for the site. + * Description for 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> beginStartNetworkTraceSlotAsync(String resourceGroupName, String name, String slot, Integer durationInSeconds, Integer maxFrameLength, String sasUrl, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(beginStartNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Description for 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 List<NetworkTraceInner> object + */ + public Observable> beginStartNetworkTraceSlotAsync(String resourceGroupName, String name, String slot, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return beginStartNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 List<NetworkTraceInner> object + */ + public Observable>> beginStartNetworkTraceSlotWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginStartNetworkTraceSlot(resourceGroupName, name, slot, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = beginStartNetworkTraceSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> beginStartNetworkTraceSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Stops an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.stopSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = stopSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse stopSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void stopNetworkTraceSlot(String resourceGroupName, String name, String slot) { + stopNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().body(); + } + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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 stopNetworkTraceSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot), serviceCallback); + } + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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 {@link ServiceResponse} object if successful. + */ + public Observable stopNetworkTraceSlotAsync(String resourceGroupName, String name, String slot) { + return stopNetworkTraceSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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 {@link ServiceResponse} object if successful. + */ + public Observable> stopNetworkTraceSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.stopNetworkTraceSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = stopNetworkTraceSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse stopNetworkTraceSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Sync web app repository. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.syncRepositorySlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = syncRepositorySlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse syncRepositorySlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Syncs function trigger metadata to the management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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 management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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. + * @param serviceCallback 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 management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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. + * @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 management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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. + * @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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.syncFunctionTriggersSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = syncFunctionTriggersSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse syncFunctionTriggersSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listTriggeredWebJobsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTriggeredWebJobsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTriggeredWebJobsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a triggered web job by its ID for an app, or a deployment slot. + * Description for 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 uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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 uses 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. + * Description for 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 uses 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. + * Description for 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 uses 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getTriggeredWebJobSlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getTriggeredWebJobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getTriggeredWebJobSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a triggered web job by its ID for an app, or a deployment slot. + * Description for 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 web job for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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 web job 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. + * Description for 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 web job 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. + * Description for 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 web job 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteTriggeredWebJobSlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteTriggeredWebJobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteTriggeredWebJobSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * Description for 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 uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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 uses 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. + * Description for 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 uses 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. + * Description for 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 uses 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. + * Description for 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 uses 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listTriggeredWebJobHistorySlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTriggeredWebJobHistorySlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTriggeredWebJobHistorySlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * Description for 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 uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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 uses 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. + * Description for 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 uses 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. + * Description for 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 uses 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getTriggeredWebJobHistorySlot(resourceGroupName, name, webJobName, id, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getTriggeredWebJobHistorySlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getTriggeredWebJobHistorySlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Run a triggered web job for an app, or a deployment slot. + * Description for 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 uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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 uses 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. + * Description for 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 uses 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. + * Description for 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 uses 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.runTriggeredWebJobSlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = runTriggeredWebJobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse runTriggeredWebJobSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException thrown 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). + * Description for 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + return service.listUsagesSlot(resourceGroupName, name, slot, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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). + * Description for 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 DefaultErrorResponseException thrown 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). + * Description for 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listUsagesSlot(resourceGroupName, name, slot, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUsagesSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUsagesSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the virtual networks the app (or deployment slot) is connected to. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listVnetConnectionsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listVnetConnectionsSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVnetConnectionsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a virtual network the app (or deployment slot) is connected to by name. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getVnetConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVnetConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVnetConnectionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.createOrUpdateVnetConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateVnetConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateVnetConnectionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a connection from an app (or deployment slot to a named virtual network. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteVnetConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteVnetConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteVnetConnectionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.updateVnetConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateVnetConnectionSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateVnetConnectionSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets an app's Virtual Network gateway. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getVnetConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVnetConnectionGatewaySlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVnetConnectionGatewaySlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.createOrUpdateVnetConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateVnetConnectionGatewaySlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateVnetConnectionGatewaySlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.updateVnetConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateVnetConnectionGatewaySlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateVnetConnectionGatewaySlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List webjobs for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listWebJobsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWebJobsSlotDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebJobsSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get webjob information for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getWebJobSlot(resourceGroupName, name, webJobName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getWebJobSlotDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getWebJobSlotDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the difference in configuration settings between two web app slots. + * Description for 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 DefaultErrorResponseException thrown 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 CsmSlotEntity 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. + * Description for 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 CsmSlotEntity 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. + * Description for 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 CsmSlotEntity 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. + * Description for 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 CsmSlotEntity 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. + * Description for 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 CsmSlotEntity 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(slotSwapEntity); + return service.listSlotDifferencesFromProduction(resourceGroupName, name, this.client.subscriptionId(), slotSwapEntity, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Swaps two deployment slots of an app. + * Description for 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 DefaultErrorResponseException 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, CsmSlotEntity slotSwapEntity) { + swapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).toBlocking().last().body(); + } + + /** + * Swaps two deployment slots of an app. + * Description for 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, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(swapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity), serviceCallback); + } + + /** + * Swaps two deployment slots of an app. + * Description for 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, CsmSlotEntity 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. + * Description for 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, CsmSlotEntity 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(slotSwapEntity); + Observable> observable = service.swapSlotWithProduction(resourceGroupName, name, this.client.subscriptionId(), slotSwapEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Swaps two deployment slots of an app. + * Description for 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 DefaultErrorResponseException 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, CsmSlotEntity slotSwapEntity) { + beginSwapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).toBlocking().single().body(); + } + + /** + * Swaps two deployment slots of an app. + * Description for 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, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginSwapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity), serviceCallback); + } + + /** + * Swaps two deployment slots of an app. + * Description for 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, CsmSlotEntity 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. + * Description for 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, CsmSlotEntity 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(slotSwapEntity); + return service.beginSwapSlotWithProduction(resourceGroupName, name, this.client.subscriptionId(), slotSwapEntity, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Returns all Snapshots to the user. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSnapshots(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSnapshotsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSnapshotsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @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 DefaultErrorResponseException thrown 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 listSnapshotsFromDRSecondary(final String resourceGroupName, final String name) { + ServiceResponse> response = listSnapshotsFromDRSecondarySinglePageAsync(resourceGroupName, name).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSnapshotsFromDRSecondaryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @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> listSnapshotsFromDRSecondaryAsync(final String resourceGroupName, final String name, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSnapshotsFromDRSecondarySinglePageAsync(resourceGroupName, name), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSnapshotsFromDRSecondaryNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @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> listSnapshotsFromDRSecondaryAsync(final String resourceGroupName, final String name) { + return listSnapshotsFromDRSecondaryWithServiceResponseAsync(resourceGroupName, name) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @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>> listSnapshotsFromDRSecondaryWithServiceResponseAsync(final String resourceGroupName, final String name) { + return listSnapshotsFromDRSecondarySinglePageAsync(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(listSnapshotsFromDRSecondaryNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + 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>> listSnapshotsFromDRSecondarySinglePageAsync(final String resourceGroupName, final String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listSnapshotsFromDRSecondary(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSnapshotsFromDRSecondaryDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSnapshotsFromDRSecondaryDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the source control configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getSourceControl(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSourceControlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSourceControlDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the source control configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteSourceControl); + Observable> observable = service.createOrUpdateSourceControl(resourceGroupName, name, this.client.subscriptionId(), siteSourceControl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates the source control configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteSourceControl); + return service.beginCreateOrUpdateSourceControl(resourceGroupName, name, this.client.subscriptionId(), siteSourceControl, this.client.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes the source control configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteSourceControl(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteSourceControlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteSourceControlDelegate(Response response) throws DefaultErrorResponseException, 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(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates the source control configuration of an app. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(siteSourceControl); + return service.updateSourceControl(resourceGroupName, name, this.client.subscriptionId(), siteSourceControl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateSourceControlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateSourceControlDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Starts an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.start(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = startDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse startDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Start capturing network packets for the site. + * Description for 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 DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List startNetworkTrace(String resourceGroupName, String name) { + return startNetworkTraceWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().body(); + } + + /** + * Start capturing network packets for the site. + * Description for 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> startNetworkTraceAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(startNetworkTraceWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + public Observable> startNetworkTraceAsync(String resourceGroupName, String name) { + return startNetworkTraceWithServiceResponseAsync(resourceGroupName, name).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + public Observable>> startNetworkTraceWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + Observable> observable = service.startNetworkTrace(resourceGroupName, name, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken>() { }.getType()); + } + /** + * Start capturing network packets for the site. + * Description for 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 DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List startNetworkTrace(String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return startNetworkTraceWithServiceResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).toBlocking().last().body(); + } + + /** + * Start capturing network packets for the site. + * Description for 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> startNetworkTraceAsync(String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(startNetworkTraceWithServiceResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + public Observable> startNetworkTraceAsync(String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return startNetworkTraceWithServiceResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 for the request + */ + public Observable>> startNetworkTraceWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.startNetworkTrace(resourceGroupName, name, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken>() { }.getType()); + } + + /** + * Start capturing network packets for the site. + * Description for 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 DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List beginStartNetworkTrace(String resourceGroupName, String name) { + return beginStartNetworkTraceWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Start capturing network packets for the site. + * Description for 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> beginStartNetworkTraceAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(beginStartNetworkTraceWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Description for 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 List<NetworkTraceInner> object + */ + public Observable> beginStartNetworkTraceAsync(String resourceGroupName, String name) { + return beginStartNetworkTraceWithServiceResponseAsync(resourceGroupName, name).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 List<NetworkTraceInner> object + */ + public Observable>> beginStartNetworkTraceWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return service.beginStartNetworkTrace(resourceGroupName, name, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = beginStartNetworkTraceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 DefaultErrorResponseException 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<NetworkTraceInner> object if successful. + */ + public List beginStartNetworkTrace(String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return beginStartNetworkTraceWithServiceResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).toBlocking().single().body(); + } + + /** + * Start capturing network packets for the site. + * Description for 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> beginStartNetworkTraceAsync(String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(beginStartNetworkTraceWithServiceResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl), serviceCallback); + } + + /** + * Start capturing network packets for the site. + * Description for 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 List<NetworkTraceInner> object + */ + public Observable> beginStartNetworkTraceAsync(String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return beginStartNetworkTraceWithServiceResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Start capturing network packets for the site. + * Description for 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 List<NetworkTraceInner> object + */ + public Observable>> beginStartNetworkTraceWithServiceResponseAsync(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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginStartNetworkTrace(resourceGroupName, name, this.client.subscriptionId(), durationInSeconds, maxFrameLength, sasUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = beginStartNetworkTraceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> beginStartNetworkTraceDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Stops an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.stop(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = stopDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse stopDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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 DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void stopNetworkTrace(String resourceGroupName, String name) { + stopNetworkTraceWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); + } + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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 stopNetworkTraceAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(stopNetworkTraceWithServiceResponseAsync(resourceGroupName, name), serviceCallback); + } + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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 {@link ServiceResponse} object if successful. + */ + public Observable stopNetworkTraceAsync(String resourceGroupName, String name) { + return stopNetworkTraceWithServiceResponseAsync(resourceGroupName, name).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Stop ongoing capturing network packets for the site. + * Description for 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 {@link ServiceResponse} object if successful. + */ + public Observable> stopNetworkTraceWithServiceResponseAsync(String resourceGroupName, String name) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.stopNetworkTrace(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = stopNetworkTraceDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse stopNetworkTraceDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Sync web app repository. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.syncRepository(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = syncRepositoryDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse syncRepositoryDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Syncs function trigger metadata to the management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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 DefaultErrorResponseException 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 management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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 management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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 management database. + * Description for Syncs function trigger metadata to the management database. + * + * @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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.syncFunctionTriggers(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = syncFunctionTriggersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse syncFunctionTriggersDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listTriggeredWebJobs(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTriggeredWebJobsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTriggeredWebJobsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a triggered web job by its ID for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getTriggeredWebJob(resourceGroupName, name, webJobName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getTriggeredWebJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getTriggeredWebJobDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Delete a triggered web job by its ID for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteTriggeredWebJob(resourceGroupName, name, webJobName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteTriggeredWebJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteTriggeredWebJobDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listTriggeredWebJobHistory(resourceGroupName, name, webJobName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listTriggeredWebJobHistoryDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listTriggeredWebJobHistoryDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getTriggeredWebJobHistory(resourceGroupName, name, webJobName, id, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getTriggeredWebJobHistoryDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getTriggeredWebJobHistoryDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Run a triggered web job for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.runTriggeredWebJob(resourceGroupName, name, webJobName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = runTriggeredWebJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse runTriggeredWebJobDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException thrown 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). + * Description for 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + return service.listUsages(resourceGroupName, name, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = 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). + * Description for 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 DefaultErrorResponseException thrown 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). + * Description for 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listUsages(resourceGroupName, name, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUsagesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUsagesDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the virtual networks the app (or deployment slot) is connected to. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listVnetConnections(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = listVnetConnectionsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listVnetConnectionsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a virtual network the app (or deployment slot) is connected to by name. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getVnetConnection(resourceGroupName, name, vnetName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVnetConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVnetConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.createOrUpdateVnetConnection(resourceGroupName, name, vnetName, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateVnetConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateVnetConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Deletes a connection from an app (or deployment slot to a named virtual network. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteVnetConnection(resourceGroupName, name, vnetName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteVnetConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteVnetConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties (PATCH). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.updateVnetConnection(resourceGroupName, name, vnetName, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateVnetConnectionDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateVnetConnectionDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets an app's Virtual Network gateway. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getVnetConnectionGateway(resourceGroupName, name, vnetName, gatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVnetConnectionGatewayDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getVnetConnectionGatewayDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.createOrUpdateVnetConnectionGateway(resourceGroupName, name, vnetName, gatewayName, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateVnetConnectionGatewayDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateVnetConnectionGatewayDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * Description for 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 DefaultErrorResponseException 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). + * Description for 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). + * Description for 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). + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + return service.updateVnetConnectionGateway(resourceGroupName, name, vnetName, gatewayName, this.client.subscriptionId(), connectionEnvelope, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateVnetConnectionGatewayDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateVnetConnectionGatewayDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List webjobs for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listWebJobs(resourceGroupName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listWebJobsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listWebJobsDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get webjob information for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getWebJob(resourceGroupName, name, webJobName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getWebJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getWebJobDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get all apps for a subscription. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all web, mobile, and API apps in the specified resource group. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets existing backups of an app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List the configurations of an app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List deployments for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List the functions for a web site, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all scale-out instances of an app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets existing backups of an app. + * Description for 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 DefaultErrorResponseException thrown 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 listSiteBackupsNext(final String nextPageLink) { + ServiceResponse> response = listSiteBackupsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteBackupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets existing backups of an app. + * Description for 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> listSiteBackupsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteBackupsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteBackupsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets existing backups of an app. + * Description for 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> listSiteBackupsNextAsync(final String nextPageLink) { + return listSiteBackupsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets existing backups of an app. + * Description for 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>> listSiteBackupsNextWithServiceResponseAsync(final String nextPageLink) { + return listSiteBackupsNextSinglePageAsync(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(listSiteBackupsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets existing backups of an app. + * Description for 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>> listSiteBackupsNextSinglePageAsync(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.listSiteBackupsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteBackupsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteBackupsNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets perfmon counters for web app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get public certificates for an app or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets an app's deployment slots. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets existing backups of an app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List the configurations of an app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List continuous web jobs for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List deployments for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Lists ownership identifiers for domain associated with web app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List the functions for a web site, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get hostname bindings for an app or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets all scale-out instances of an app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets existing backups of an app. + * Description for 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 DefaultErrorResponseException thrown 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 listSiteBackupsSlotNext(final String nextPageLink) { + ServiceResponse> response = listSiteBackupsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSiteBackupsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets existing backups of an app. + * Description for 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> listSiteBackupsSlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSiteBackupsSlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSiteBackupsSlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets existing backups of an app. + * Description for 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> listSiteBackupsSlotNextAsync(final String nextPageLink) { + return listSiteBackupsSlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets existing backups of an app. + * Description for 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>> listSiteBackupsSlotNextWithServiceResponseAsync(final String nextPageLink) { + return listSiteBackupsSlotNextSinglePageAsync(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(listSiteBackupsSlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets existing backups of an app. + * Description for 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>> listSiteBackupsSlotNextSinglePageAsync(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.listSiteBackupsSlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSiteBackupsSlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSiteBackupsSlotNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets perfmon counters for web app. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.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. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List module information for a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List the threads in a process by its ID for a specific scaled-out instance in a web site. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get public certificates for an app or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get list of siteextensions for a web site, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the difference in configuration settings between two web app slots. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Returns all Snapshots to the user. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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 listSnapshotsFromDRSecondarySlotNext(final String nextPageLink) { + ServiceResponse> response = listSnapshotsFromDRSecondarySlotNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSnapshotsFromDRSecondarySlotNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @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> listSnapshotsFromDRSecondarySlotNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSnapshotsFromDRSecondarySlotNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSnapshotsFromDRSecondarySlotNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @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> listSnapshotsFromDRSecondarySlotNextAsync(final String nextPageLink) { + return listSnapshotsFromDRSecondarySlotNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @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>> listSnapshotsFromDRSecondarySlotNextWithServiceResponseAsync(final String nextPageLink) { + return listSnapshotsFromDRSecondarySlotNextSinglePageAsync(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(listSnapshotsFromDRSecondarySlotNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + 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>> listSnapshotsFromDRSecondarySlotNextSinglePageAsync(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.listSnapshotsFromDRSecondarySlotNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSnapshotsFromDRSecondarySlotNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSnapshotsFromDRSecondarySlotNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException thrown 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). + * Description for 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). + * Description for 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). + * Description for 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). + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List webjobs for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get the difference in configuration settings between two web app slots. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Returns all Snapshots to the user. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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 listSnapshotsFromDRSecondaryNext(final String nextPageLink) { + ServiceResponse> response = listSnapshotsFromDRSecondaryNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listSnapshotsFromDRSecondaryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @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> listSnapshotsFromDRSecondaryNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSnapshotsFromDRSecondaryNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listSnapshotsFromDRSecondaryNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @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> listSnapshotsFromDRSecondaryNextAsync(final String nextPageLink) { + return listSnapshotsFromDRSecondaryNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @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>> listSnapshotsFromDRSecondaryNextWithServiceResponseAsync(final String nextPageLink) { + return listSnapshotsFromDRSecondaryNextSinglePageAsync(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(listSnapshotsFromDRSecondaryNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns all Snapshots to the user from DRSecondary endpoint. + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + 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>> listSnapshotsFromDRSecondaryNextSinglePageAsync(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.listSnapshotsFromDRSecondaryNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listSnapshotsFromDRSecondaryNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listSnapshotsFromDRSecondaryNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List triggered web jobs for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List a triggered web job's history for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the quota usage information of an app (or deployment slot, if specified). + * Description for 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 DefaultErrorResponseException thrown 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). + * Description for 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). + * Description for 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). + * Description for 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). + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List webjobs for an app, or a deployment slot. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebJobImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebJobImpl.java new file mode 100644 index 0000000000000..0cf4fc230d8ac --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebJobImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.WebJob; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import java.util.Map; +import com.microsoft.azure.management.appservice.v2019_08_01.WebJobType; + +class WebJobImpl extends IndexableRefreshableWrapperImpl implements WebJob { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String webJobName; + private String slot; + + WebJobImpl(WebJobInner inner, CertificateRegistrationManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.webJobName = IdParsingUtils.getValueFromIdByName(inner.id(), "webjobs"); + this.slot = IdParsingUtils.getValueFromIdByName(inner.id(), "slots"); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getWebJobSlotAsync(this.resourceGroupName, this.name, this.webJobName, this.slot); + } + + + + @Override + public String error() { + return this.inner().error(); + } + + @Override + public String extraInfoUrl() { + return this.inner().extraInfoUrl(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String runCommand() { + return this.inner().runCommand(); + } + + @Override + public Map settings() { + return this.inner().settings(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String url() { + return this.inner().url(); + } + + @Override + public Boolean usingSdk() { + return this.inner().usingSdk(); + } + + @Override + public WebJobType webJobType() { + return this.inner().webJobType(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebJobInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebJobInner.java new file mode 100644 index 0000000000000..2ea47267f81ed --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebJobInner.java @@ -0,0 +1,204 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.WebJobType; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * Web Job Information. + */ +@JsonFlatten +public class WebJobInner extends ProxyOnlyResource { + /** + * Run command. + */ + @JsonProperty(value = "properties.run_command") + private String runCommand; + + /** + * Job URL. + */ + @JsonProperty(value = "properties.url") + private String url; + + /** + * Extra Info URL. + */ + @JsonProperty(value = "properties.extra_info_url") + private String extraInfoUrl; + + /** + * Job type. Possible values include: 'Continuous', 'Triggered'. + */ + @JsonProperty(value = "properties.web_job_type") + private WebJobType webJobType; + + /** + * Error information. + */ + @JsonProperty(value = "properties.error") + private String error; + + /** + * Using SDK?. + */ + @JsonProperty(value = "properties.using_sdk") + private Boolean usingSdk; + + /** + * Job settings. + */ + @JsonProperty(value = "properties.settings") + private Map settings; + + /** + * Get run command. + * + * @return the runCommand value + */ + public String runCommand() { + return this.runCommand; + } + + /** + * Set run command. + * + * @param runCommand the runCommand value to set + * @return the WebJobInner object itself. + */ + public WebJobInner withRunCommand(String runCommand) { + this.runCommand = runCommand; + return this; + } + + /** + * Get job URL. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Set job URL. + * + * @param url the url value to set + * @return the WebJobInner object itself. + */ + public WebJobInner withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get extra Info URL. + * + * @return the extraInfoUrl value + */ + public String extraInfoUrl() { + return this.extraInfoUrl; + } + + /** + * Set extra Info URL. + * + * @param extraInfoUrl the extraInfoUrl value to set + * @return the WebJobInner object itself. + */ + public WebJobInner withExtraInfoUrl(String extraInfoUrl) { + this.extraInfoUrl = extraInfoUrl; + return this; + } + + /** + * Get job type. Possible values include: 'Continuous', 'Triggered'. + * + * @return the webJobType value + */ + public WebJobType webJobType() { + return this.webJobType; + } + + /** + * Set job type. Possible values include: 'Continuous', 'Triggered'. + * + * @param webJobType the webJobType value to set + * @return the WebJobInner object itself. + */ + public WebJobInner withWebJobType(WebJobType webJobType) { + this.webJobType = webJobType; + return this; + } + + /** + * Get error information. + * + * @return the error value + */ + public String error() { + return this.error; + } + + /** + * Set error information. + * + * @param error the error value to set + * @return the WebJobInner object itself. + */ + public WebJobInner withError(String error) { + this.error = error; + return this; + } + + /** + * Get using SDK?. + * + * @return the usingSdk value + */ + public Boolean usingSdk() { + return this.usingSdk; + } + + /** + * Set using SDK?. + * + * @param usingSdk the usingSdk value to set + * @return the WebJobInner object itself. + */ + public WebJobInner withUsingSdk(Boolean usingSdk) { + this.usingSdk = usingSdk; + return this; + } + + /** + * Get job settings. + * + * @return the settings value + */ + public Map settings() { + return this.settings; + } + + /** + * Set job settings. + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebSiteInstanceStatusImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebSiteInstanceStatusImpl.java new file mode 100644 index 0000000000000..4ec79ce260651 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebSiteInstanceStatusImpl.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.WebSiteInstanceStatus; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import java.util.Map; +import com.microsoft.azure.management.appservice.v2019_08_01.ContainerInfo; +import com.microsoft.azure.management.appservice.v2019_08_01.SiteRuntimeState; + +class WebSiteInstanceStatusImpl extends IndexableRefreshableWrapperImpl implements WebSiteInstanceStatus { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String instanceId; + + WebSiteInstanceStatusImpl(WebSiteInstanceStatusInner inner, CertificateRegistrationManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "sites"); + this.instanceId = IdParsingUtils.getValueFromIdByName(inner.id(), "instances"); + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + WebAppsInner client = this.manager().inner().webApps(); + return client.getInstanceInfoAsync(this.resourceGroupName, this.name, this.instanceId); + } + + + + @Override + public String consoleUrl() { + return this.inner().consoleUrl(); + } + + @Override + public Map containers() { + return this.inner().containers(); + } + + @Override + public String detectorUrl() { + return this.inner().detectorUrl(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public SiteRuntimeState state() { + return this.inner().state(); + } + + @Override + public String statusUrl() { + return this.inner().statusUrl(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebSiteInstanceStatusInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebSiteInstanceStatusInner.java new file mode 100644 index 0000000000000..fd3c03626bc67 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebSiteInstanceStatusInner.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.SiteRuntimeState; +import java.util.Map; +import com.microsoft.azure.management.appservice.v2019_08_01.ContainerInfo; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.ProxyOnlyResource; + +/** + * The WebSiteInstanceStatusInner model. + */ +@JsonFlatten +public class WebSiteInstanceStatusInner extends ProxyOnlyResource { + /** + * Possible values include: 'READY', 'STOPPED', 'UNKNOWN'. + */ + @JsonProperty(value = "properties.state") + private SiteRuntimeState state; + + /** + * Link to the GetStatusApi in Kudu. + */ + @JsonProperty(value = "properties.statusUrl") + private String statusUrl; + + /** + * Link to the Diagnose and Solve Portal. + */ + @JsonProperty(value = "properties.detectorUrl") + private String detectorUrl; + + /** + * Link to the Diagnose and Solve Portal. + */ + @JsonProperty(value = "properties.consoleUrl") + private String consoleUrl; + + /** + * The containers property. + */ + @JsonProperty(value = "properties.containers") + private Map containers; + + /** + * Get possible values include: 'READY', 'STOPPED', 'UNKNOWN'. + * + * @return the state value + */ + public SiteRuntimeState state() { + return this.state; + } + + /** + * Set possible values include: 'READY', 'STOPPED', 'UNKNOWN'. + * + * @param state the state value to set + * @return the WebSiteInstanceStatusInner object itself. + */ + public WebSiteInstanceStatusInner withState(SiteRuntimeState state) { + this.state = state; + return this; + } + + /** + * Get link to the GetStatusApi in Kudu. + * + * @return the statusUrl value + */ + public String statusUrl() { + return this.statusUrl; + } + + /** + * Set link to the GetStatusApi in Kudu. + * + * @param statusUrl the statusUrl value to set + * @return the WebSiteInstanceStatusInner object itself. + */ + public WebSiteInstanceStatusInner withStatusUrl(String statusUrl) { + this.statusUrl = statusUrl; + return this; + } + + /** + * Get link to the Diagnose and Solve Portal. + * + * @return the detectorUrl value + */ + public String detectorUrl() { + return this.detectorUrl; + } + + /** + * Set link to the Diagnose and Solve Portal. + * + * @param detectorUrl the detectorUrl value to set + * @return the WebSiteInstanceStatusInner object itself. + */ + public WebSiteInstanceStatusInner withDetectorUrl(String detectorUrl) { + this.detectorUrl = detectorUrl; + return this; + } + + /** + * Get link to the Diagnose and Solve Portal. + * + * @return the consoleUrl value + */ + public String consoleUrl() { + return this.consoleUrl; + } + + /** + * Set link to the Diagnose and Solve Portal. + * + * @param consoleUrl the consoleUrl value to set + * @return the WebSiteInstanceStatusInner object itself. + */ + public WebSiteInstanceStatusInner withConsoleUrl(String consoleUrl) { + this.consoleUrl = consoleUrl; + return this; + } + + /** + * Get the containers value. + * + * @return the containers value + */ + public Map containers() { + return this.containers; + } + + /** + * Set the containers value. + * + * @param containers the containers value to set + * @return the WebSiteInstanceStatusInner object itself. + */ + public WebSiteInstanceStatusInner withContainers(Map containers) { + this.containers = containers; + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebSiteManagementClientImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebSiteManagementClientImpl.java new file mode 100644 index 0000000000000..1a707fbdf1199 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WebSiteManagementClientImpl.java @@ -0,0 +1,3035 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.appservice.v2019_08_01.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.ListOperationCallback; +import com.microsoft.azure.management.appservice.v2019_08_01.CheckNameResourceTypes; +import com.microsoft.azure.management.appservice.v2019_08_01.CsmMoveResourceEnvelope; +import com.microsoft.azure.management.appservice.v2019_08_01.DefaultErrorResponseException; +import com.microsoft.azure.management.appservice.v2019_08_01.ResourceNameAvailabilityRequest; +import com.microsoft.azure.management.appservice.v2019_08_01.SkuName; +import com.microsoft.azure.management.appservice.v2019_08_01.ValidateRequest; +import com.microsoft.azure.management.appservice.v2019_08_01.VnetParameters; +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; + } + + /** API Version. */ + private String apiVersion; + + /** + * Gets API Version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * 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; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * 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; + } + + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + 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 StaticSitesInner object to access its operations. + */ + private StaticSitesInner staticSites; + + /** + * Gets the StaticSitesInner object to access its operations. + * @return the StaticSitesInner object. + */ + public StaticSitesInner staticSites() { + return this.staticSites; + } + + /** + * 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; + } + + /** + * The ResourceHealthMetadatasInner object to access its operations. + */ + private ResourceHealthMetadatasInner resourceHealthMetadatas; + + /** + * Gets the ResourceHealthMetadatasInner object to access its operations. + * @return the ResourceHealthMetadatasInner object. + */ + public ResourceHealthMetadatasInner resourceHealthMetadatas() { + return this.resourceHealthMetadatas; + } + + /** + * 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.apiVersion = "2019-08-01"; + 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.staticSites = new StaticSitesInner(restClient().retrofit(), this); + this.appServiceEnvironments = new AppServiceEnvironmentsInner(restClient().retrofit(), this); + this.appServicePlans = new AppServicePlansInner(restClient().retrofit(), this); + this.resourceHealthMetadatas = new ResourceHealthMetadatasInner(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, %s, auto-generated)", super.userAgent(), "WebSiteManagementClient", "2019-08-01"); + } + + 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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebSiteManagementClient listBillingMeters" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters") + Observable> listBillingMeters(@Path("subscriptionId") String subscriptionId, @Query("billingLocation") String billingLocation, @Query("osType") String osType, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebSiteManagementClient listGeoRegions" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions") + Observable> listGeoRegions(@Path("subscriptionId") String subscriptionId, @Query("sku") SkuName sku, @Query("linuxWorkersEnabled") Boolean linuxWorkersEnabled, @Query("xenonWorkersEnabled") Boolean xenonWorkersEnabled, @Query("linuxDynamicWorkersEnabled") Boolean linuxDynamicWorkersEnabled, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebSiteManagementClient verifyHostingEnvironmentVnet" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet") + Observable> verifyHostingEnvironmentVnet(@Path("subscriptionId") String subscriptionId, @Body VnetParameters 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.appservice.v2019_08_01.WebSiteManagementClient move" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources") + Observable> move(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Body CsmMoveResourceEnvelope 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.appservice.v2019_08_01.WebSiteManagementClient validate" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate") + Observable> validate(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Body ValidateRequest 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.appservice.v2019_08_01.WebSiteManagementClient validateMove" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources") + Observable> validateMove(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Body CsmMoveResourceEnvelope 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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebSiteManagementClient listBillingMetersNext" }) + @GET + Observable> listBillingMetersNext(@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.appservice.v2019_08_01.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.appservice.v2019_08_01.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.appservice.v2019_08_01.WebSiteManagementClient listPremierAddOnOffersNext" }) + @GET + Observable> listPremierAddOnOffersNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets publishing user. + * Description for Gets publishing user. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for Gets publishing user. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the UserInner object + */ + public Observable> getPublishingUserWithServiceResponseAsync() { + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + return service.getPublishingUser(this.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates publishing user. + * Description for Updates publishing user. + * + * @param userDetails Details of publishing user + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + Validator.validate(userDetails); + return service.updatePublishingUser(userDetails, this.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the source controls available for Azure websites. + * Description for Gets the source controls available for Azure websites. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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() { + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + return service.listSourceControls(this.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets source control token. + * Description for Gets source control token. + * + * @param sourceControlType Type of source control + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + return service.getSourceControl(sourceControlType, this.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Updates source control token. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + Validator.validate(requestMessage); + return service.updateSourceControl(sourceControlType, requestMessage, this.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a list of meters for a given location. + * Description for Gets a list of meters for a given location. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BillingMeterInner> object if successful. + */ + public PagedList listBillingMeters() { + ServiceResponse> response = listBillingMetersSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBillingMetersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of meters for a given location. + * Description for Gets a list of meters for a given location. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listBillingMetersAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBillingMetersSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBillingMetersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of meters for a given location. + * Description for Gets a list of meters for a given location. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BillingMeterInner> object + */ + public Observable> listBillingMetersAsync() { + return listBillingMetersWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of meters for a given location. + * Description for Gets a list of meters for a given location. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BillingMeterInner> object + */ + public Observable>> listBillingMetersWithServiceResponseAsync() { + return listBillingMetersSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listBillingMetersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of meters for a given location. + * Description for Gets a list of meters for a given location. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BillingMeterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listBillingMetersSinglePageAsync() { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + final String billingLocation = null; + final String osType = null; + return service.listBillingMeters(this.subscriptionId(), billingLocation, osType, this.apiVersion(), this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBillingMetersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets a list of meters for a given location. + * Description for Gets a list of meters for a given location. + * + * @param billingLocation Azure Location of billable resource + * @param osType App Service OS type meters used for + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BillingMeterInner> object if successful. + */ + public PagedList listBillingMeters(final String billingLocation, final String osType) { + ServiceResponse> response = listBillingMetersSinglePageAsync(billingLocation, osType).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBillingMetersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of meters for a given location. + * Description for Gets a list of meters for a given location. + * + * @param billingLocation Azure Location of billable resource + * @param osType App Service OS type meters used for + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listBillingMetersAsync(final String billingLocation, final String osType, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBillingMetersSinglePageAsync(billingLocation, osType), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBillingMetersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of meters for a given location. + * Description for Gets a list of meters for a given location. + * + * @param billingLocation Azure Location of billable resource + * @param osType App Service OS type meters used for + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BillingMeterInner> object + */ + public Observable> listBillingMetersAsync(final String billingLocation, final String osType) { + return listBillingMetersWithServiceResponseAsync(billingLocation, osType) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of meters for a given location. + * Description for Gets a list of meters for a given location. + * + * @param billingLocation Azure Location of billable resource + * @param osType App Service OS type meters used for + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BillingMeterInner> object + */ + public Observable>> listBillingMetersWithServiceResponseAsync(final String billingLocation, final String osType) { + return listBillingMetersSinglePageAsync(billingLocation, osType) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listBillingMetersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of meters for a given location. + * Description for Gets a list of meters for a given location. + * + ServiceResponse> * @param billingLocation Azure Location of billable resource + ServiceResponse> * @param osType App Service OS type meters used for + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BillingMeterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listBillingMetersSinglePageAsync(final String billingLocation, final String osType) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + return service.listBillingMeters(this.subscriptionId(), billingLocation, osType, this.apiVersion(), this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBillingMetersDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBillingMetersDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Check if a resource name is available. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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 (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() 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 Boolean isFqdn = null; + ResourceNameAvailabilityRequest request = new ResourceNameAvailabilityRequest(); + request.withName(name); + request.withType(type); + request.withIsFqdn(null); + return service.checkNameAvailability(this.subscriptionId(), this.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. + * Description for 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 DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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 (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() 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."); + } + ResourceNameAvailabilityRequest request = new ResourceNameAvailabilityRequest(); + request.withName(name); + request.withType(type); + request.withIsFqdn(isFqdn); + return service.checkNameAvailability(this.subscriptionId(), this.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets list of available geo regions plus ministamps. + * Description for Gets list of available geo regions plus ministamps. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + return service.getSubscriptionDeploymentLocations(this.subscriptionId(), this.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a list of available geographical regions. + * Description for Get a list of available geographical regions. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + final SkuName sku = null; + final Boolean linuxWorkersEnabled = null; + final Boolean xenonWorkersEnabled = null; + final Boolean linuxDynamicWorkersEnabled = null; + return service.listGeoRegions(this.subscriptionId(), sku, linuxWorkersEnabled, xenonWorkersEnabled, linuxDynamicWorkersEnabled, this.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. + * Description for 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', 'Dynamic', 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' + * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Linux workers. + * @param xenonWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Xenon workers. + * @param linuxDynamicWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Linux Consumption Workers. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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, final Boolean xenonWorkersEnabled, final Boolean linuxDynamicWorkersEnabled) { + ServiceResponse> response = listGeoRegionsSinglePageAsync(sku, linuxWorkersEnabled, xenonWorkersEnabled, linuxDynamicWorkersEnabled).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. + * Description for 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', 'Dynamic', 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' + * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Linux workers. + * @param xenonWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Xenon workers. + * @param linuxDynamicWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Linux Consumption 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 Boolean xenonWorkersEnabled, final Boolean linuxDynamicWorkersEnabled, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listGeoRegionsSinglePageAsync(sku, linuxWorkersEnabled, xenonWorkersEnabled, linuxDynamicWorkersEnabled), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listGeoRegionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get a list of available geographical regions. + * Description for 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', 'Dynamic', 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' + * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Linux workers. + * @param xenonWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Xenon workers. + * @param linuxDynamicWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Linux Consumption 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, final Boolean xenonWorkersEnabled, final Boolean linuxDynamicWorkersEnabled) { + return listGeoRegionsWithServiceResponseAsync(sku, linuxWorkersEnabled, xenonWorkersEnabled, linuxDynamicWorkersEnabled) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get a list of available geographical regions. + * Description for 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', 'Dynamic', 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' + * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Linux workers. + * @param xenonWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Xenon workers. + * @param linuxDynamicWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Linux Consumption 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, final Boolean xenonWorkersEnabled, final Boolean linuxDynamicWorkersEnabled) { + return listGeoRegionsSinglePageAsync(sku, linuxWorkersEnabled, xenonWorkersEnabled, linuxDynamicWorkersEnabled) + .concatMap(new Func1>, 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. + * Description for 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', 'Dynamic', 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' + ServiceResponse> * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Linux workers. + ServiceResponse> * @param xenonWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Xenon workers. + ServiceResponse> * @param linuxDynamicWorkersEnabled Specify <code>true</code> if you want to filter to only regions that support Linux Consumption 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, final Boolean xenonWorkersEnabled, final Boolean linuxDynamicWorkersEnabled) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + return service.listGeoRegions(this.subscriptionId(), sku, linuxWorkersEnabled, xenonWorkersEnabled, linuxDynamicWorkersEnabled, this.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List all apps that are assigned to a hostname. + * Description for List all apps that are assigned to a hostname. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + final String name = null; + NameIdentifierInner nameIdentifier = new NameIdentifierInner(); + nameIdentifier.withName(null); + return service.listSiteIdentifiersAssignedToHostName(this.subscriptionId(), this.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. + * Description for List all apps that are assigned to a hostname. + * + * @param name Name of the object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + NameIdentifierInner nameIdentifier = new NameIdentifierInner(); + nameIdentifier.withName(name); + return service.listSiteIdentifiersAssignedToHostName(this.subscriptionId(), this.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List all premier add-on offers. + * Description for List all premier add-on offers. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + return service.listPremierAddOnOffers(this.subscriptionId(), this.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List all SKUs. + * Description for List all SKUs. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException 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. + * Description for 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. + * Description for 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. + * Description for 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."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + return service.listSkus(this.subscriptionId(), this.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules. + * Description for 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 DefaultErrorResponseException 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(VnetParameters 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. + * Description for 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(VnetParameters 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. + * Description for 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(VnetParameters 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. + * Description for 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(VnetParameters 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."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.verifyHostingEnvironmentVnet(this.subscriptionId(), parameters, this.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Move resources between resource groups. + * Description for 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 DefaultErrorResponseException 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, CsmMoveResourceEnvelope moveResourceEnvelope) { + moveWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope).toBlocking().single().body(); + } + + /** + * Move resources between resource groups. + * Description for 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, CsmMoveResourceEnvelope moveResourceEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(moveWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope), serviceCallback); + } + + /** + * Move resources between resource groups. + * Description for 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, CsmMoveResourceEnvelope moveResourceEnvelope) { + return moveWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Move resources between resource groups. + * Description for 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, CsmMoveResourceEnvelope 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."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + Validator.validate(moveResourceEnvelope); + return service.move(resourceGroupName, this.subscriptionId(), moveResourceEnvelope, this.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Validate if a resource can be created. + * Description for 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 DefaultErrorResponseException 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, ValidateRequest validateRequest) { + return validateWithServiceResponseAsync(resourceGroupName, validateRequest).toBlocking().single().body(); + } + + /** + * Validate if a resource can be created. + * Description for 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, ValidateRequest validateRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(validateWithServiceResponseAsync(resourceGroupName, validateRequest), serviceCallback); + } + + /** + * Validate if a resource can be created. + * Description for 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, ValidateRequest 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. + * Description for 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, ValidateRequest 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."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + Validator.validate(validateRequest); + return service.validate(resourceGroupName, this.subscriptionId(), validateRequest, this.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Validate whether a resource can be moved. + * Description for 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 DefaultErrorResponseException 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, CsmMoveResourceEnvelope moveResourceEnvelope) { + validateMoveWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope).toBlocking().single().body(); + } + + /** + * Validate whether a resource can be moved. + * Description for 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, CsmMoveResourceEnvelope moveResourceEnvelope, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(validateMoveWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope), serviceCallback); + } + + /** + * Validate whether a resource can be moved. + * Description for 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, CsmMoveResourceEnvelope 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. + * Description for 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, CsmMoveResourceEnvelope 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."); + } + if (this.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); + } + Validator.validate(moveResourceEnvelope); + return service.validateMove(resourceGroupName, this.subscriptionId(), moveResourceEnvelope, this.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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets the source controls available for Azure websites. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Gets a list of meters for a given location. + * Description for Gets a list of meters for a given location. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws DefaultErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BillingMeterInner> object if successful. + */ + public PagedList listBillingMetersNext(final String nextPageLink) { + ServiceResponse> response = listBillingMetersNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBillingMetersNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets a list of meters for a given location. + * Description for Gets a list of meters for a given location. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listBillingMetersNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBillingMetersNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBillingMetersNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets a list of meters for a given location. + * Description for Gets a list of meters for a given location. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BillingMeterInner> object + */ + public Observable> listBillingMetersNextAsync(final String nextPageLink) { + return listBillingMetersNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of meters for a given location. + * Description for Gets a list of meters for a given location. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BillingMeterInner> object + */ + public Observable>> listBillingMetersNextWithServiceResponseAsync(final String nextPageLink) { + return listBillingMetersNextSinglePageAsync(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(listBillingMetersNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets a list of meters for a given location. + * Description for Gets a list of meters for a given location. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BillingMeterInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listBillingMetersNextSinglePageAsync(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.listBillingMetersNext(nextUrl, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBillingMetersNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBillingMetersNextDelegate(Response response) throws DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * Get a list of available geographical regions. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List all apps that are assigned to a hostname. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + + /** + * List all premier add-on offers. + * Description for 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 DefaultErrorResponseException thrown 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. + * Description for 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. + * Description for 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. + * Description for 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. + * Description for 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 DefaultErrorResponseException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., DefaultErrorResponseException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(DefaultErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WorkerPoolResourceInner.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WorkerPoolResourceInner.java new file mode 100644 index 0000000000000..16162a350b693 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.ComputeModeOptions; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.SkuDescription; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.appservice.v2019_08_01.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 worker size ID for referencing this worker pool. + * + * @return the workerSizeId value + */ + public Integer workerSizeId() { + return this.workerSizeId; + } + + /** + * Set worker size ID for referencing this worker pool. + * + * @param workerSizeId the workerSizeId value to set + * @return the WorkerPoolResourceInner object itself. + */ + public WorkerPoolResourceInner withWorkerSizeId(Integer workerSizeId) { + this.workerSizeId = workerSizeId; + return this; + } + + /** + * Get shared or dedicated app hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'. + * + * @return the computeMode value + */ + public ComputeModeOptions computeMode() { + return this.computeMode; + } + + /** + * Set shared or dedicated app hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'. + * + * @param computeMode the computeMode value to set + * @return the WorkerPoolResourceInner object itself. + */ + public WorkerPoolResourceInner withComputeMode(ComputeModeOptions computeMode) { + this.computeMode = computeMode; + return this; + } + + /** + * Get vM size of the worker pool instances. + * + * @return the workerSize value + */ + public String workerSize() { + return this.workerSize; + } + + /** + * Set vM size of the worker pool instances. + * + * @param workerSize the workerSize value to set + * @return the WorkerPoolResourceInner object itself. + */ + public WorkerPoolResourceInner withWorkerSize(String workerSize) { + this.workerSize = workerSize; + return this; + } + + /** + * Get number of instances in the worker pool. + * + * @return the workerCount value + */ + public Integer workerCount() { + return this.workerCount; + } + + /** + * Set number of instances in the worker pool. + * + * @param workerCount the workerCount value to set + * @return the WorkerPoolResourceInner object itself. + */ + public WorkerPoolResourceInner withWorkerCount(Integer workerCount) { + this.workerCount = workerCount; + return this; + } + + /** + * Get names of all instances in the worker pool (read only). + * + * @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/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WorkerPoolsImpl.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WorkerPoolsImpl.java new file mode 100644 index 0000000000000..903d6e634073d --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/WorkerPoolsImpl.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.appservice.v2019_08_01.implementation; + +import com.microsoft.azure.management.appservice.v2019_08_01.WorkerPools; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.appservice.v2019_08_01.ComputeModeOptions; +import java.util.List; +import com.microsoft.azure.management.appservice.v2019_08_01.SkuDescription; + +class WorkerPoolsImpl extends CreatableUpdatableImpl implements WorkerPools, WorkerPools.Definition, WorkerPools.Update { + private final CertificateRegistrationManager manager; + private String resourceGroupName; + private String name; + private String workerPoolName; + + WorkerPoolsImpl(String name, CertificateRegistrationManager manager) { + super(name, new WorkerPoolResourceInner()); + this.manager = manager; + // Set resource name + this.workerPoolName = name; + // + } + + WorkerPoolsImpl(WorkerPoolResourceInner inner, CertificateRegistrationManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.workerPoolName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.name = IdParsingUtils.getValueFromIdByName(inner.id(), "hostingEnvironments"); + this.workerPoolName = IdParsingUtils.getValueFromIdByName(inner.id(), "workerPools"); + // + } + + @Override + public CertificateRegistrationManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + AppServiceEnvironmentsInner client = this.manager().inner().appServiceEnvironments(); + return client.createOrUpdateWorkerPoolAsync(this.resourceGroupName, this.name, this.workerPoolName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + AppServiceEnvironmentsInner client = this.manager().inner().appServiceEnvironments(); + return client.updateWorkerPoolAsync(this.resourceGroupName, this.name, this.workerPoolName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + AppServiceEnvironmentsInner client = this.manager().inner().appServiceEnvironments(); + return client.getWorkerPoolAsync(this.resourceGroupName, this.name, this.workerPoolName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public ComputeModeOptions computeMode() { + return this.inner().computeMode(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public List instanceNames() { + return this.inner().instanceNames(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public SkuDescription sku() { + return this.inner().sku(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public Integer workerCount() { + return this.inner().workerCount(); + } + + @Override + public String workerSize() { + return this.inner().workerSize(); + } + + @Override + public Integer workerSizeId() { + return this.inner().workerSizeId(); + } + + @Override + public WorkerPoolsImpl withExistingHostingEnvironment(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + @Override + public WorkerPoolsImpl withComputeMode(ComputeModeOptions computeMode) { + this.inner().withComputeMode(computeMode); + return this; + } + + @Override + public WorkerPoolsImpl withKind(String kind) { + this.inner().withKind(kind); + return this; + } + + @Override + public WorkerPoolsImpl withSku(SkuDescription sku) { + this.inner().withSku(sku); + return this; + } + + @Override + public WorkerPoolsImpl withWorkerCount(Integer workerCount) { + this.inner().withWorkerCount(workerCount); + return this; + } + + @Override + public WorkerPoolsImpl withWorkerSize(String workerSize) { + this.inner().withWorkerSize(workerSize); + return this; + } + + @Override + public WorkerPoolsImpl withWorkerSizeId(Integer workerSizeId) { + this.inner().withWorkerSizeId(workerSizeId); + return this; + } + +} diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/package-info.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/package-info.java new file mode 100644 index 0000000000000..afce3f93c4cfc --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01.implementation; diff --git a/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/package-info.java b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/package-info.java new file mode 100644 index 0000000000000..b562a5753fae1 --- /dev/null +++ b/sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/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.appservice.v2019_08_01;