diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/pom.xml b/sdk/adhybridhealthservice/mgmt-v2014_01_01/pom.xml new file mode 100644 index 0000000000000..19c5f5477e46b --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/pom.xml @@ -0,0 +1,135 @@ + + + 4.0.0 + com.microsoft.azure.adhybridhealthservice.v2014_01_01 + + com.microsoft.azure + azure-arm-parent + 1.1.0 + ../../../pom.management.xml + + azure-mgmt-adhybridhealthservice + 1.0.0-beta + jar + Microsoft Azure SDK for ADHybridHealthService Management + This package contains Microsoft ADHybridHealthService 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/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AdDomainServiceMembers.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AdDomainServiceMembers.java new file mode 100644 index 0000000000000..d8a2eb72e0202 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AdDomainServiceMembers.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.AdDomainServiceMembersInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing AdDomainServiceMembers. + */ +public interface AdDomainServiceMembers extends HasInner { + /** + * Gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String serviceName, final boolean isGroupbySite); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AdditionalInformation.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AdditionalInformation.java new file mode 100644 index 0000000000000..417b49026f272 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AdditionalInformation.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.adhybridhealthservice.v2014_01_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The additional information for a property. + */ +public class AdditionalInformation { + /** + * The title name for the property. + */ + @JsonProperty(value = "titleName") + private String titleName; + + /** + * The title value for the property. + */ + @JsonProperty(value = "titleValue") + private String titleValue; + + /** + * The list of properties which are included in the additional information. + */ + @JsonProperty(value = "properties") + private Object properties; + + /** + * Indicates if properties are present or not. + */ + @JsonProperty(value = "hasProperties") + private Boolean hasProperties; + + /** + * Get the title name for the property. + * + * @return the titleName value + */ + public String titleName() { + return this.titleName; + } + + /** + * Set the title name for the property. + * + * @param titleName the titleName value to set + * @return the AdditionalInformation object itself. + */ + public AdditionalInformation withTitleName(String titleName) { + this.titleName = titleName; + return this; + } + + /** + * Get the title value for the property. + * + * @return the titleValue value + */ + public String titleValue() { + return this.titleValue; + } + + /** + * Set the title value for the property. + * + * @param titleValue the titleValue value to set + * @return the AdditionalInformation object itself. + */ + public AdditionalInformation withTitleValue(String titleValue) { + this.titleValue = titleValue; + return this; + } + + /** + * Get the list of properties which are included in the additional information. + * + * @return the properties value + */ + public Object properties() { + return this.properties; + } + + /** + * Set the list of properties which are included in the additional information. + * + * @param properties the properties value to set + * @return the AdditionalInformation object itself. + */ + public AdditionalInformation withProperties(Object properties) { + this.properties = properties; + return this; + } + + /** + * Get indicates if properties are present or not. + * + * @return the hasProperties value + */ + public Boolean hasProperties() { + return this.hasProperties; + } + + /** + * Set indicates if properties are present or not. + * + * @param hasProperties the hasProperties value to set + * @return the AdditionalInformation object itself. + */ + public AdditionalInformation withHasProperties(Boolean hasProperties) { + this.hasProperties = hasProperties; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsServiceMembers.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsServiceMembers.java new file mode 100644 index 0000000000000..fbf9ab58db63a --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsServiceMembers.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.adhybridhealthservice.v2014_01_01; + +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.AddsServiceMembersInner; +import com.microsoft.azure.arm.model.HasInner; +import rx.Completable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceCredential; + +/** + * Type representing AddsServiceMembers. + */ +public interface AddsServiceMembers extends HasInner { + /** + * Gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String serviceName); + + /** + * Gets the details of a server, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String serviceName, UUID serviceMemberId); + + /** + * Deletes a Active Directory Domain Controller server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String serviceName, UUID serviceMemberId); + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listCredentialsAsync(String serviceName, UUID serviceMemberId); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsServices.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsServices.java new file mode 100644 index 0000000000000..6601d0d80eba7 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsServices.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.adhybridhealthservice.v2014_01_01; + +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServicememberAddsserviceAlert; +import rx.Completable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ServicePropertiesInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ReplicationSummary; + +/** + * Type representing AddsServices. + */ +public interface AddsServices { + /** + * Gets the details of an alert for a given Active Directory Domain Controller service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listServerAlertsAsync(final UUID serviceMemberId, final String serviceName); + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getMetricsAsync(String serviceName, String metricName, String groupName); + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listMetricsAverageAsync(final String serviceName, final String metricName, final String groupName); + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listMetricsSumAsync(final String serviceName, final String metricName, final String groupName); + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getMetricMetadataForGroupAsync(String serviceName, String metricName, String groupName); + + /** + * Gets the details of an Active Directory Domain Service for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String serviceName); + + /** + * Deletes an Active Directory Domain Service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String serviceName); + + /** + * Updates an Active Directory Domain Service properties of an onboarded service. + * + * @param serviceName The name of the service which needs to be deleted. + * @param service The service object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable updateAsync(String serviceName, ServicePropertiesInner service); + + /** + * Gets the forest summary for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getForestSummaryAsync(String serviceName); + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listMetricMetadataAsync(final String serviceName); + + /** + * Gets the service related metric information. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getMetricMetadataAsync(String serviceName, String metricName); + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @param query The custom query. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listReplicationSummaryAsync(String serviceName, boolean isGroupbySite, String query); + + /** + * Gets the details of Active Directory Domain Services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listPremiumServicesAsync(); + + /** + * Gets the details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Onboards a service for a given tenant in Azure Active Directory Connect Health. + * + * @param service The service object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable addAsync(ServicePropertiesInner service); + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listReplicationDetailsAsync(String serviceName); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsServicesReplicationStatus.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsServicesReplicationStatus.java new file mode 100644 index 0000000000000..b3daeadd219bb --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsServicesReplicationStatus.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.adhybridhealthservice.v2014_01_01; + +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.AddsServicesReplicationStatusInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing AddsServicesReplicationStatus. + */ +public interface AddsServicesReplicationStatus extends HasInner { + /** + * Gets Replication status for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String serviceName); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsServicesServiceMembers.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsServicesServiceMembers.java new file mode 100644 index 0000000000000..290dcd1de043c --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsServicesServiceMembers.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceServiceMemberModel; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ServiceMemberInner; + +/** + * Type representing AddsServicesServiceMembers. + */ +public interface AddsServicesServiceMembers { + /** + * Gets the details of the servers, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String serviceName); + + /** + * Onboards a server, for a given Active Directory Domain Controller service, to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service under which the server is to be onboarded. + * @param serviceMember The server object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable addAsync(String serviceName, ServiceMemberInner serviceMember); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsServicesUserPreferences.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsServicesUserPreferences.java new file mode 100644 index 0000000000000..4ebd93edc1e99 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsServicesUserPreferences.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.adhybridhealthservice.v2014_01_01; + +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.AddsServicesUserPreferencesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing AddsServicesUserPreferences. + */ +public interface AddsServicesUserPreferences extends HasInner { + /** + * Gets the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String serviceName, String featureName); + + /** + * Deletes the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String serviceName, String featureName); + + /** + * Adds the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable addAsync(String serviceName, String featureName); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceAddsServiceMember.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceAddsServiceMember.java new file mode 100644 index 0000000000000..d889227e33df0 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceAddsServiceMember.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.AddsServiceMemberInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import java.util.List; +import org.joda.time.DateTime; + +/** + * Type representing AddsserviceAddsServiceMember. + */ +public interface AddsserviceAddsServiceMember extends HasInner, HasManager { + /** + * @return the activeAlerts value. + */ + Integer activeAlerts(); + + /** + * @return the additionalInformation value. + */ + String additionalInformation(); + + /** + * @return the addsRoles value. + */ + List addsRoles(); + + /** + * @return the createdDate value. + */ + DateTime createdDate(); + + /** + * @return the dcTypes value. + */ + List dcTypes(); + + /** + * @return the dimensions value. + */ + List dimensions(); + + /** + * @return the disabled value. + */ + Boolean disabled(); + + /** + * @return the disabledReason value. + */ + Integer disabledReason(); + + /** + * @return the domainName value. + */ + String domainName(); + + /** + * @return the gcReachable value. + */ + Boolean gcReachable(); + + /** + * @return the installedQfes value. + */ + List installedQfes(); + + /** + * @return the isAdvertising value. + */ + Boolean isAdvertising(); + + /** + * @return the lastDisabled value. + */ + DateTime lastDisabled(); + + /** + * @return the lastReboot value. + */ + DateTime lastReboot(); + + /** + * @return the lastServerReportedMonitoringLevelChange value. + */ + DateTime lastServerReportedMonitoringLevelChange(); + + /** + * @return the lastUpdated value. + */ + DateTime lastUpdated(); + + /** + * @return the machineId value. + */ + String machineId(); + + /** + * @return the machineName value. + */ + String machineName(); + + /** + * @return the monitoringConfigurationsComputed value. + */ + List monitoringConfigurationsComputed(); + + /** + * @return the monitoringConfigurationsCustomized value. + */ + List monitoringConfigurationsCustomized(); + + /** + * @return the osName value. + */ + String osName(); + + /** + * @return the osVersion value. + */ + String osVersion(); + + /** + * @return the pdcReachable value. + */ + Boolean pdcReachable(); + + /** + * @return the properties value. + */ + List properties(); + + /** + * @return the recommendedQfes value. + */ + List recommendedQfes(); + + /** + * @return the resolvedAlerts value. + */ + Integer resolvedAlerts(); + + /** + * @return the role value. + */ + String role(); + + /** + * @return the serverReportedMonitoringLevel value. + */ + MonitoringLevel serverReportedMonitoringLevel(); + + /** + * @return the serviceId value. + */ + String serviceId(); + + /** + * @return the serviceMemberId value. + */ + String serviceMemberId(); + + /** + * @return the siteName value. + */ + String siteName(); + + /** + * @return the status value. + */ + String status(); + + /** + * @return the sysvolState value. + */ + Boolean sysvolState(); + + /** + * @return the tenantId value. + */ + String tenantId(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceAddsServiceMemberModel.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceAddsServiceMemberModel.java new file mode 100644 index 0000000000000..f7577c50d6ae0 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceAddsServiceMemberModel.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.AddsServiceMemberInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import java.util.List; +import org.joda.time.DateTime; + +/** + * Type representing AddsserviceAddsServiceMemberModel. + */ +public interface AddsserviceAddsServiceMemberModel extends HasInner, HasManager { + /** + * @return the activeAlerts value. + */ + Integer activeAlerts(); + + /** + * @return the additionalInformation value. + */ + String additionalInformation(); + + /** + * @return the addsRoles value. + */ + List addsRoles(); + + /** + * @return the createdDate value. + */ + DateTime createdDate(); + + /** + * @return the dcTypes value. + */ + List dcTypes(); + + /** + * @return the dimensions value. + */ + List dimensions(); + + /** + * @return the disabled value. + */ + Boolean disabled(); + + /** + * @return the disabledReason value. + */ + Integer disabledReason(); + + /** + * @return the domainName value. + */ + String domainName(); + + /** + * @return the gcReachable value. + */ + Boolean gcReachable(); + + /** + * @return the installedQfes value. + */ + List installedQfes(); + + /** + * @return the isAdvertising value. + */ + Boolean isAdvertising(); + + /** + * @return the lastDisabled value. + */ + DateTime lastDisabled(); + + /** + * @return the lastReboot value. + */ + DateTime lastReboot(); + + /** + * @return the lastServerReportedMonitoringLevelChange value. + */ + DateTime lastServerReportedMonitoringLevelChange(); + + /** + * @return the lastUpdated value. + */ + DateTime lastUpdated(); + + /** + * @return the machineId value. + */ + String machineId(); + + /** + * @return the machineName value. + */ + String machineName(); + + /** + * @return the monitoringConfigurationsComputed value. + */ + List monitoringConfigurationsComputed(); + + /** + * @return the monitoringConfigurationsCustomized value. + */ + List monitoringConfigurationsCustomized(); + + /** + * @return the osName value. + */ + String osName(); + + /** + * @return the osVersion value. + */ + String osVersion(); + + /** + * @return the pdcReachable value. + */ + Boolean pdcReachable(); + + /** + * @return the properties value. + */ + List properties(); + + /** + * @return the recommendedQfes value. + */ + List recommendedQfes(); + + /** + * @return the resolvedAlerts value. + */ + Integer resolvedAlerts(); + + /** + * @return the role value. + */ + String role(); + + /** + * @return the serverReportedMonitoringLevel value. + */ + MonitoringLevel serverReportedMonitoringLevel(); + + /** + * @return the serviceId value. + */ + String serviceId(); + + /** + * @return the serviceMemberId value. + */ + String serviceMemberId(); + + /** + * @return the siteName value. + */ + String siteName(); + + /** + * @return the status value. + */ + String status(); + + /** + * @return the sysvolState value. + */ + Boolean sysvolState(); + + /** + * @return the tenantId value. + */ + String tenantId(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceAlert.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceAlert.java new file mode 100644 index 0000000000000..194f4971f0737 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceAlert.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.AlertInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import java.util.List; +import java.util.UUID; +import org.joda.time.DateTime; + +/** + * Type representing AddsserviceAlert. + */ +public interface AddsserviceAlert extends HasInner, HasManager { + /** + * @return the activeAlertProperties value. + */ + List activeAlertProperties(); + + /** + * @return the additionalInformation value. + */ + List additionalInformation(); + + /** + * @return the alertId value. + */ + UUID alertId(); + + /** + * @return the createdDate value. + */ + DateTime createdDate(); + + /** + * @return the description value. + */ + String description(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the lastUpdated value. + */ + DateTime lastUpdated(); + + /** + * @return the level value. + */ + Level level(); + + /** + * @return the monitorRoleType value. + */ + String monitorRoleType(); + + /** + * @return the relatedLinks value. + */ + List relatedLinks(); + + /** + * @return the remediation value. + */ + String remediation(); + + /** + * @return the resolvedAlertProperties value. + */ + List resolvedAlertProperties(); + + /** + * @return the resolvedDate value. + */ + DateTime resolvedDate(); + + /** + * @return the scope value. + */ + String scope(); + + /** + * @return the serviceId value. + */ + UUID serviceId(); + + /** + * @return the serviceMemberId value. + */ + UUID serviceMemberId(); + + /** + * @return the shortName value. + */ + String shortName(); + + /** + * @return the state value. + */ + State state(); + + /** + * @return the tenantId value. + */ + UUID tenantId(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceCredential.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceCredential.java new file mode 100644 index 0000000000000..d089ca4bf1ba6 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceCredential.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.CredentialInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import java.util.List; + +/** + * Type representing AddsserviceCredential. + */ +public interface AddsserviceCredential extends HasInner, HasManager { + /** + * @return the credentialData value. + */ + List credentialData(); + + /** + * @return the identifier value. + */ + String identifier(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceMetricSets.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceMetricSets.java new file mode 100644 index 0000000000000..97cb2df9aa5ce --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceMetricSets.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.MetricSetsInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import java.util.List; +import org.joda.time.DateTime; + +/** + * Type representing AddsserviceMetricSets. + */ +public interface AddsserviceMetricSets extends HasInner, HasManager { + /** + * @return the sets value. + */ + List sets(); + + /** + * @return the timeStamps value. + */ + List timeStamps(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceServiceMember.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceServiceMember.java new file mode 100644 index 0000000000000..c1d12b7eef4e8 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceServiceMember.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ServiceMemberInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import org.joda.time.DateTime; + +/** + * Type representing AddsserviceServiceMember. + */ +public interface AddsserviceServiceMember extends HasInner, HasManager { + /** + * @return the activeAlerts value. + */ + Integer activeAlerts(); + + /** + * @return the additionalInformation value. + */ + String additionalInformation(); + + /** + * @return the createdDate value. + */ + DateTime createdDate(); + + /** + * @return the dimensions value. + */ + Object dimensions(); + + /** + * @return the disabled value. + */ + Boolean disabled(); + + /** + * @return the disabledReason value. + */ + Integer disabledReason(); + + /** + * @return the installedQfes value. + */ + Object installedQfes(); + + /** + * @return the lastDisabled value. + */ + DateTime lastDisabled(); + + /** + * @return the lastReboot value. + */ + DateTime lastReboot(); + + /** + * @return the lastServerReportedMonitoringLevelChange value. + */ + DateTime lastServerReportedMonitoringLevelChange(); + + /** + * @return the lastUpdated value. + */ + DateTime lastUpdated(); + + /** + * @return the machineId value. + */ + String machineId(); + + /** + * @return the machineName value. + */ + String machineName(); + + /** + * @return the monitoringConfigurationsComputed value. + */ + Object monitoringConfigurationsComputed(); + + /** + * @return the monitoringConfigurationsCustomized value. + */ + Object monitoringConfigurationsCustomized(); + + /** + * @return the osName value. + */ + String osName(); + + /** + * @return the osVersion value. + */ + String osVersion(); + + /** + * @return the properties value. + */ + Object properties(); + + /** + * @return the recommendedQfes value. + */ + Object recommendedQfes(); + + /** + * @return the resolvedAlerts value. + */ + Integer resolvedAlerts(); + + /** + * @return the role value. + */ + String role(); + + /** + * @return the serverReportedMonitoringLevel value. + */ + MonitoringLevel serverReportedMonitoringLevel(); + + /** + * @return the serviceId value. + */ + String serviceId(); + + /** + * @return the serviceMemberId value. + */ + String serviceMemberId(); + + /** + * @return the status value. + */ + String status(); + + /** + * @return the tenantId value. + */ + String tenantId(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceServiceMemberModel.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceServiceMemberModel.java new file mode 100644 index 0000000000000..055ecf4af76ca --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AddsserviceServiceMemberModel.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ServiceMemberInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import org.joda.time.DateTime; + +/** + * Type representing AddsserviceServiceMemberModel. + */ +public interface AddsserviceServiceMemberModel extends HasInner, HasManager { + /** + * @return the activeAlerts value. + */ + Integer activeAlerts(); + + /** + * @return the additionalInformation value. + */ + String additionalInformation(); + + /** + * @return the createdDate value. + */ + DateTime createdDate(); + + /** + * @return the dimensions value. + */ + Object dimensions(); + + /** + * @return the disabled value. + */ + Boolean disabled(); + + /** + * @return the disabledReason value. + */ + Integer disabledReason(); + + /** + * @return the installedQfes value. + */ + Object installedQfes(); + + /** + * @return the lastDisabled value. + */ + DateTime lastDisabled(); + + /** + * @return the lastReboot value. + */ + DateTime lastReboot(); + + /** + * @return the lastServerReportedMonitoringLevelChange value. + */ + DateTime lastServerReportedMonitoringLevelChange(); + + /** + * @return the lastUpdated value. + */ + DateTime lastUpdated(); + + /** + * @return the machineId value. + */ + String machineId(); + + /** + * @return the machineName value. + */ + String machineName(); + + /** + * @return the monitoringConfigurationsComputed value. + */ + Object monitoringConfigurationsComputed(); + + /** + * @return the monitoringConfigurationsCustomized value. + */ + Object monitoringConfigurationsCustomized(); + + /** + * @return the osName value. + */ + String osName(); + + /** + * @return the osVersion value. + */ + String osVersion(); + + /** + * @return the properties value. + */ + Object properties(); + + /** + * @return the recommendedQfes value. + */ + Object recommendedQfes(); + + /** + * @return the resolvedAlerts value. + */ + Integer resolvedAlerts(); + + /** + * @return the role value. + */ + String role(); + + /** + * @return the serverReportedMonitoringLevel value. + */ + MonitoringLevel serverReportedMonitoringLevel(); + + /** + * @return the serviceId value. + */ + String serviceId(); + + /** + * @return the serviceMemberId value. + */ + String serviceMemberId(); + + /** + * @return the status value. + */ + String status(); + + /** + * @return the tenantId value. + */ + String tenantId(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Agent.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Agent.java new file mode 100644 index 0000000000000..df3cb180fd8e6 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Agent.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The agent details. + */ +public class Agent { + /** + * The tenant Id. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /** + * The machine Id. + */ + @JsonProperty(value = "machineId") + private String machineId; + + /** + * The agent credential details. + */ + @JsonProperty(value = "credential") + private Object credential; + + /** + * The machine name. + */ + @JsonProperty(value = "machineName") + private String machineName; + + /** + * The agent version. + */ + @JsonProperty(value = "agentVersion") + private String agentVersion; + + /** + * The date and time, in UTC, when the agent was created. + */ + @JsonProperty(value = "createdDate") + private DateTime createdDate; + + /** + * The connector hash key. + */ + @JsonProperty(value = "key") + private String key; + + /** + * Get the tenant Id. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenant Id. + * + * @param tenantId the tenantId value to set + * @return the Agent object itself. + */ + public Agent withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the machine Id. + * + * @return the machineId value + */ + public String machineId() { + return this.machineId; + } + + /** + * Set the machine Id. + * + * @param machineId the machineId value to set + * @return the Agent object itself. + */ + public Agent withMachineId(String machineId) { + this.machineId = machineId; + return this; + } + + /** + * Get the agent credential details. + * + * @return the credential value + */ + public Object credential() { + return this.credential; + } + + /** + * Set the agent credential details. + * + * @param credential the credential value to set + * @return the Agent object itself. + */ + public Agent withCredential(Object credential) { + this.credential = credential; + return this; + } + + /** + * Get the machine name. + * + * @return the machineName value + */ + public String machineName() { + return this.machineName; + } + + /** + * Set the machine name. + * + * @param machineName the machineName value to set + * @return the Agent object itself. + */ + public Agent withMachineName(String machineName) { + this.machineName = machineName; + return this; + } + + /** + * Get the agent version. + * + * @return the agentVersion value + */ + public String agentVersion() { + return this.agentVersion; + } + + /** + * Set the agent version. + * + * @param agentVersion the agentVersion value to set + * @return the Agent object itself. + */ + public Agent withAgentVersion(String agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + /** + * Get the date and time, in UTC, when the agent was created. + * + * @return the createdDate value + */ + public DateTime createdDate() { + return this.createdDate; + } + + /** + * Set the date and time, in UTC, when the agent was created. + * + * @param createdDate the createdDate value to set + * @return the Agent object itself. + */ + public Agent withCreatedDate(DateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get the connector hash key. + * + * @return the key value + */ + public String key() { + return this.key; + } + + /** + * Set the connector hash key. + * + * @param key the key value to set + * @return the Agent object itself. + */ + public Agent withKey(String key) { + this.key = key; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AlertFeedback.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AlertFeedback.java new file mode 100644 index 0000000000000..9a27eee941a45 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AlertFeedback.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.AlertFeedbackInner; +import org.joda.time.DateTime; + +/** + * Type representing AlertFeedback. + */ +public interface AlertFeedback extends HasInner, HasManager { + /** + * @return the comment value. + */ + String comment(); + + /** + * @return the consentedToShare value. + */ + Boolean consentedToShare(); + + /** + * @return the createdDate value. + */ + DateTime createdDate(); + + /** + * @return the feedback value. + */ + String feedback(); + + /** + * @return the level value. + */ + String level(); + + /** + * @return the serviceMemberId value. + */ + String serviceMemberId(); + + /** + * @return the shortName value. + */ + String shortName(); + + /** + * @return the state value. + */ + String state(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Alerts.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Alerts.java new file mode 100644 index 0000000000000..e1756bd92f424 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Alerts.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.adhybridhealthservice.v2014_01_01; + +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.AlertsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Alerts. + */ +public interface Alerts extends HasInner { + /** + * Gets the alerts for a given Active Directory Domain Service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAddsAlertsAsync(final String serviceName); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AlgorithmStepType.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AlgorithmStepType.java new file mode 100644 index 0000000000000..e499540330e26 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AlgorithmStepType.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.adhybridhealthservice.v2014_01_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AlgorithmStepType. + */ +public final class AlgorithmStepType extends ExpandableStringEnum { + /** Static value Undefined for AlgorithmStepType. */ + public static final AlgorithmStepType UNDEFINED = fromString("Undefined"); + + /** Static value Staging for AlgorithmStepType. */ + public static final AlgorithmStepType STAGING = fromString("Staging"); + + /** Static value ConnectorFilter for AlgorithmStepType. */ + public static final AlgorithmStepType CONNECTOR_FILTER = fromString("ConnectorFilter"); + + /** Static value Join for AlgorithmStepType. */ + public static final AlgorithmStepType JOIN = fromString("Join"); + + /** Static value Projection for AlgorithmStepType. */ + public static final AlgorithmStepType PROJECTION = fromString("Projection"); + + /** Static value ImportFlow for AlgorithmStepType. */ + public static final AlgorithmStepType IMPORT_FLOW = fromString("ImportFlow"); + + /** Static value Provisioning for AlgorithmStepType. */ + public static final AlgorithmStepType PROVISIONING = fromString("Provisioning"); + + /** Static value ValidateConnectorFilter for AlgorithmStepType. */ + public static final AlgorithmStepType VALIDATE_CONNECTOR_FILTER = fromString("ValidateConnectorFilter"); + + /** Static value Deprovisioning for AlgorithmStepType. */ + public static final AlgorithmStepType DEPROVISIONING = fromString("Deprovisioning"); + + /** Static value ExportFlow for AlgorithmStepType. */ + public static final AlgorithmStepType EXPORT_FLOW = fromString("ExportFlow"); + + /** Static value MvDeletion for AlgorithmStepType. */ + public static final AlgorithmStepType MV_DELETION = fromString("MvDeletion"); + + /** Static value Recall for AlgorithmStepType. */ + public static final AlgorithmStepType RECALL = fromString("Recall"); + + /** Static value MvObjectTypeChange for AlgorithmStepType. */ + public static final AlgorithmStepType MV_OBJECT_TYPE_CHANGE = fromString("MvObjectTypeChange"); + + /** + * Creates or finds a AlgorithmStepType from its string representation. + * @param name a name to look for + * @return the corresponding AlgorithmStepType + */ + @JsonCreator + public static AlgorithmStepType fromString(String name) { + return fromString(name, AlgorithmStepType.class); + } + + /** + * @return known AlgorithmStepType values + */ + public static Collection values() { + return values(AlgorithmStepType.class); + } +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AssociatedObject.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AssociatedObject.java new file mode 100644 index 0000000000000..5a2d6a0913d40 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AssociatedObject.java @@ -0,0 +1,330 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Object that hold sync object details. + */ +public class AssociatedObject { + /** + * The display name of the object. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * The distinguished name of the object. + */ + @JsonProperty(value = "distinguishedName") + private String distinguishedName; + + /** + * The last dirSync time. + */ + @JsonProperty(value = "lastDirSyncTime") + private DateTime lastDirSyncTime; + + /** + * The email of the object. + */ + @JsonProperty(value = "mail") + private String mail; + + /** + * The object guid. + */ + @JsonProperty(value = "objectGuid") + private String objectGuid; + + /** + * The object type. + */ + @JsonProperty(value = "objectType") + private String objectType; + + /** + * The On-premises UPN. + */ + @JsonProperty(value = "onpremisesUserPrincipalName") + private String onpremisesUserPrincipalName; + + /** + * The proxy addresses. + */ + @JsonProperty(value = "proxyAddresses") + private String proxyAddresses; + + /** + * The source anchor. + */ + @JsonProperty(value = "sourceAnchor") + private String sourceAnchor; + + /** + * The source of authority. + */ + @JsonProperty(value = "sourceOfAuthority") + private String sourceOfAuthority; + + /** + * The time of the error. + */ + @JsonProperty(value = "timeOccurred") + private DateTime timeOccurred; + + /** + * The UPN. + */ + @JsonProperty(value = "userPrincipalName") + private String userPrincipalName; + + /** + * Get the display name of the object. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name of the object. + * + * @param displayName the displayName value to set + * @return the AssociatedObject object itself. + */ + public AssociatedObject withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the distinguished name of the object. + * + * @return the distinguishedName value + */ + public String distinguishedName() { + return this.distinguishedName; + } + + /** + * Set the distinguished name of the object. + * + * @param distinguishedName the distinguishedName value to set + * @return the AssociatedObject object itself. + */ + public AssociatedObject withDistinguishedName(String distinguishedName) { + this.distinguishedName = distinguishedName; + return this; + } + + /** + * Get the last dirSync time. + * + * @return the lastDirSyncTime value + */ + public DateTime lastDirSyncTime() { + return this.lastDirSyncTime; + } + + /** + * Set the last dirSync time. + * + * @param lastDirSyncTime the lastDirSyncTime value to set + * @return the AssociatedObject object itself. + */ + public AssociatedObject withLastDirSyncTime(DateTime lastDirSyncTime) { + this.lastDirSyncTime = lastDirSyncTime; + return this; + } + + /** + * Get the email of the object. + * + * @return the mail value + */ + public String mail() { + return this.mail; + } + + /** + * Set the email of the object. + * + * @param mail the mail value to set + * @return the AssociatedObject object itself. + */ + public AssociatedObject withMail(String mail) { + this.mail = mail; + return this; + } + + /** + * Get the object guid. + * + * @return the objectGuid value + */ + public String objectGuid() { + return this.objectGuid; + } + + /** + * Set the object guid. + * + * @param objectGuid the objectGuid value to set + * @return the AssociatedObject object itself. + */ + public AssociatedObject withObjectGuid(String objectGuid) { + this.objectGuid = objectGuid; + return this; + } + + /** + * Get the object type. + * + * @return the objectType value + */ + public String objectType() { + return this.objectType; + } + + /** + * Set the object type. + * + * @param objectType the objectType value to set + * @return the AssociatedObject object itself. + */ + public AssociatedObject withObjectType(String objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get the On-premises UPN. + * + * @return the onpremisesUserPrincipalName value + */ + public String onpremisesUserPrincipalName() { + return this.onpremisesUserPrincipalName; + } + + /** + * Set the On-premises UPN. + * + * @param onpremisesUserPrincipalName the onpremisesUserPrincipalName value to set + * @return the AssociatedObject object itself. + */ + public AssociatedObject withOnpremisesUserPrincipalName(String onpremisesUserPrincipalName) { + this.onpremisesUserPrincipalName = onpremisesUserPrincipalName; + return this; + } + + /** + * Get the proxy addresses. + * + * @return the proxyAddresses value + */ + public String proxyAddresses() { + return this.proxyAddresses; + } + + /** + * Set the proxy addresses. + * + * @param proxyAddresses the proxyAddresses value to set + * @return the AssociatedObject object itself. + */ + public AssociatedObject withProxyAddresses(String proxyAddresses) { + this.proxyAddresses = proxyAddresses; + return this; + } + + /** + * Get the source anchor. + * + * @return the sourceAnchor value + */ + public String sourceAnchor() { + return this.sourceAnchor; + } + + /** + * Set the source anchor. + * + * @param sourceAnchor the sourceAnchor value to set + * @return the AssociatedObject object itself. + */ + public AssociatedObject withSourceAnchor(String sourceAnchor) { + this.sourceAnchor = sourceAnchor; + return this; + } + + /** + * Get the source of authority. + * + * @return the sourceOfAuthority value + */ + public String sourceOfAuthority() { + return this.sourceOfAuthority; + } + + /** + * Set the source of authority. + * + * @param sourceOfAuthority the sourceOfAuthority value to set + * @return the AssociatedObject object itself. + */ + public AssociatedObject withSourceOfAuthority(String sourceOfAuthority) { + this.sourceOfAuthority = sourceOfAuthority; + return this; + } + + /** + * Get the time of the error. + * + * @return the timeOccurred value + */ + public DateTime timeOccurred() { + return this.timeOccurred; + } + + /** + * Set the time of the error. + * + * @param timeOccurred the timeOccurred value to set + * @return the AssociatedObject object itself. + */ + public AssociatedObject withTimeOccurred(DateTime timeOccurred) { + this.timeOccurred = timeOccurred; + return this; + } + + /** + * Get the UPN. + * + * @return the userPrincipalName value + */ + public String userPrincipalName() { + return this.userPrincipalName; + } + + /** + * Set the UPN. + * + * @param userPrincipalName the userPrincipalName value to set + * @return the AssociatedObject object itself. + */ + public AssociatedObject withUserPrincipalName(String userPrincipalName) { + this.userPrincipalName = userPrincipalName; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AttributeDelta.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AttributeDelta.java new file mode 100644 index 0000000000000..6dcceddcaa94e --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AttributeDelta.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.adhybridhealthservice.v2014_01_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The delta attributes. + */ +public class AttributeDelta { + /** + * The delta values. + */ + @JsonProperty(value = "values") + private List values; + + /** + * The name of the attribute delta. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The attribute delta operation type. Possible values include: + * 'Undefined', 'Add', 'Replace', 'Update', 'Delete'. + */ + @JsonProperty(value = "operationType") + private AttributeDeltaOperationType operationType; + + /** + * The value type. Possible values include: 'Undefined', 'Dn', 'Binary', + * 'String', 'Integer', 'Boolean'. + */ + @JsonProperty(value = "valueType") + private ValueType valueType; + + /** + * Indicates if the attribute delta is multivalued or not. + */ + @JsonProperty(value = "multiValued") + private Boolean multiValued; + + /** + * Get the delta values. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Set the delta values. + * + * @param values the values value to set + * @return the AttributeDelta object itself. + */ + public AttributeDelta withValues(List values) { + this.values = values; + return this; + } + + /** + * Get the name of the attribute delta. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the attribute delta. + * + * @param name the name value to set + * @return the AttributeDelta object itself. + */ + public AttributeDelta withName(String name) { + this.name = name; + return this; + } + + /** + * Get the attribute delta operation type. Possible values include: 'Undefined', 'Add', 'Replace', 'Update', 'Delete'. + * + * @return the operationType value + */ + public AttributeDeltaOperationType operationType() { + return this.operationType; + } + + /** + * Set the attribute delta operation type. Possible values include: 'Undefined', 'Add', 'Replace', 'Update', 'Delete'. + * + * @param operationType the operationType value to set + * @return the AttributeDelta object itself. + */ + public AttributeDelta withOperationType(AttributeDeltaOperationType operationType) { + this.operationType = operationType; + return this; + } + + /** + * Get the value type. Possible values include: 'Undefined', 'Dn', 'Binary', 'String', 'Integer', 'Boolean'. + * + * @return the valueType value + */ + public ValueType valueType() { + return this.valueType; + } + + /** + * Set the value type. Possible values include: 'Undefined', 'Dn', 'Binary', 'String', 'Integer', 'Boolean'. + * + * @param valueType the valueType value to set + * @return the AttributeDelta object itself. + */ + public AttributeDelta withValueType(ValueType valueType) { + this.valueType = valueType; + return this; + } + + /** + * Get indicates if the attribute delta is multivalued or not. + * + * @return the multiValued value + */ + public Boolean multiValued() { + return this.multiValued; + } + + /** + * Set indicates if the attribute delta is multivalued or not. + * + * @param multiValued the multiValued value to set + * @return the AttributeDelta object itself. + */ + public AttributeDelta withMultiValued(Boolean multiValued) { + this.multiValued = multiValued; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AttributeDeltaOperationType.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AttributeDeltaOperationType.java new file mode 100644 index 0000000000000..f816b7a46220a --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AttributeDeltaOperationType.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.adhybridhealthservice.v2014_01_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AttributeDeltaOperationType. + */ +public final class AttributeDeltaOperationType extends ExpandableStringEnum { + /** Static value Undefined for AttributeDeltaOperationType. */ + public static final AttributeDeltaOperationType UNDEFINED = fromString("Undefined"); + + /** Static value Add for AttributeDeltaOperationType. */ + public static final AttributeDeltaOperationType ADD = fromString("Add"); + + /** Static value Replace for AttributeDeltaOperationType. */ + public static final AttributeDeltaOperationType REPLACE = fromString("Replace"); + + /** Static value Update for AttributeDeltaOperationType. */ + public static final AttributeDeltaOperationType UPDATE = fromString("Update"); + + /** Static value Delete for AttributeDeltaOperationType. */ + public static final AttributeDeltaOperationType DELETE = fromString("Delete"); + + /** + * Creates or finds a AttributeDeltaOperationType from its string representation. + * @param name a name to look for + * @return the corresponding AttributeDeltaOperationType + */ + @JsonCreator + public static AttributeDeltaOperationType fromString(String name) { + return fromString(name, AttributeDeltaOperationType.class); + } + + /** + * @return known AttributeDeltaOperationType values + */ + public static Collection values() { + return values(AttributeDeltaOperationType.class); + } +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AttributeMapping.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AttributeMapping.java new file mode 100644 index 0000000000000..1d1f9858483e2 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AttributeMapping.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.adhybridhealthservice.v2014_01_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The attribute mapping details. + */ +public class AttributeMapping { + /** + * The mapping source. + */ + @JsonProperty(value = "mappingSource") + private AttributeMppingSource mappingSource; + + /** + * The attribute mapping type. Possible values include: 'Constant', + * 'Direct', 'DnPart', 'Script'. + */ + @JsonProperty(value = "type") + private AttributeMappingType type; + + /** + * The destination attribute. + */ + @JsonProperty(value = "destinationAttribute") + private String destinationAttribute; + + /** + * The context Id. + */ + @JsonProperty(value = "contextId") + private String contextId; + + /** + * Get the mapping source. + * + * @return the mappingSource value + */ + public AttributeMppingSource mappingSource() { + return this.mappingSource; + } + + /** + * Set the mapping source. + * + * @param mappingSource the mappingSource value to set + * @return the AttributeMapping object itself. + */ + public AttributeMapping withMappingSource(AttributeMppingSource mappingSource) { + this.mappingSource = mappingSource; + return this; + } + + /** + * Get the attribute mapping type. Possible values include: 'Constant', 'Direct', 'DnPart', 'Script'. + * + * @return the type value + */ + public AttributeMappingType type() { + return this.type; + } + + /** + * Set the attribute mapping type. Possible values include: 'Constant', 'Direct', 'DnPart', 'Script'. + * + * @param type the type value to set + * @return the AttributeMapping object itself. + */ + public AttributeMapping withType(AttributeMappingType type) { + this.type = type; + return this; + } + + /** + * Get the destination attribute. + * + * @return the destinationAttribute value + */ + public String destinationAttribute() { + return this.destinationAttribute; + } + + /** + * Set the destination attribute. + * + * @param destinationAttribute the destinationAttribute value to set + * @return the AttributeMapping object itself. + */ + public AttributeMapping withDestinationAttribute(String destinationAttribute) { + this.destinationAttribute = destinationAttribute; + return this; + } + + /** + * Get the context Id. + * + * @return the contextId value + */ + public String contextId() { + return this.contextId; + } + + /** + * Set the context Id. + * + * @param contextId the contextId value to set + * @return the AttributeMapping object itself. + */ + public AttributeMapping withContextId(String contextId) { + this.contextId = contextId; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AttributeMappingType.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AttributeMappingType.java new file mode 100644 index 0000000000000..72530a615724a --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AttributeMappingType.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.adhybridhealthservice.v2014_01_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AttributeMappingType. + */ +public final class AttributeMappingType extends ExpandableStringEnum { + /** Static value Constant for AttributeMappingType. */ + public static final AttributeMappingType CONSTANT = fromString("Constant"); + + /** Static value Direct for AttributeMappingType. */ + public static final AttributeMappingType DIRECT = fromString("Direct"); + + /** Static value DnPart for AttributeMappingType. */ + public static final AttributeMappingType DN_PART = fromString("DnPart"); + + /** Static value Script for AttributeMappingType. */ + public static final AttributeMappingType SCRIPT = fromString("Script"); + + /** + * Creates or finds a AttributeMappingType from its string representation. + * @param name a name to look for + * @return the corresponding AttributeMappingType + */ + @JsonCreator + public static AttributeMappingType fromString(String name) { + return fromString(name, AttributeMappingType.class); + } + + /** + * @return known AttributeMappingType values + */ + public static Collection values() { + return values(AttributeMappingType.class); + } +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AttributeMppingSource.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AttributeMppingSource.java new file mode 100644 index 0000000000000..f51142d9a4499 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/AttributeMppingSource.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.adhybridhealthservice.v2014_01_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The attribute mapping source. + */ +public class AttributeMppingSource { + /** + * The source attribute. + */ + @JsonProperty(value = "sourceAttribute") + private List sourceAttribute; + + /** + * The value for dn part. + */ + @JsonProperty(value = "dnPart") + private Integer dnPart; + + /** + * The script context. + */ + @JsonProperty(value = "scriptContext") + private String scriptContext; + + /** + * The constant value. + */ + @JsonProperty(value = "constantValue") + private String constantValue; + + /** + * Get the source attribute. + * + * @return the sourceAttribute value + */ + public List sourceAttribute() { + return this.sourceAttribute; + } + + /** + * Set the source attribute. + * + * @param sourceAttribute the sourceAttribute value to set + * @return the AttributeMppingSource object itself. + */ + public AttributeMppingSource withSourceAttribute(List sourceAttribute) { + this.sourceAttribute = sourceAttribute; + return this; + } + + /** + * Get the value for dn part. + * + * @return the dnPart value + */ + public Integer dnPart() { + return this.dnPart; + } + + /** + * Set the value for dn part. + * + * @param dnPart the dnPart value to set + * @return the AttributeMppingSource object itself. + */ + public AttributeMppingSource withDnPart(Integer dnPart) { + this.dnPart = dnPart; + return this; + } + + /** + * Get the script context. + * + * @return the scriptContext value + */ + public String scriptContext() { + return this.scriptContext; + } + + /** + * Set the script context. + * + * @param scriptContext the scriptContext value to set + * @return the AttributeMppingSource object itself. + */ + public AttributeMppingSource withScriptContext(String scriptContext) { + this.scriptContext = scriptContext; + return this; + } + + /** + * Get the constant value. + * + * @return the constantValue value + */ + public String constantValue() { + return this.constantValue; + } + + /** + * Set the constant value. + * + * @param constantValue the constantValue value to set + * @return the AttributeMppingSource object itself. + */ + public AttributeMppingSource withConstantValue(String constantValue) { + this.constantValue = constantValue; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ChangeNotReimported.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ChangeNotReimported.java new file mode 100644 index 0000000000000..4a4557aeead8c --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ChangeNotReimported.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.adhybridhealthservice.v2014_01_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The changes which are not re-imported. + */ +public class ChangeNotReimported { + /** + * The delta changes that is not re-imported. + */ + @JsonProperty(value = "delta") + private ChangeNotReimportedDelta delta; + + /** + * The object entry in a change that is not re-imported. + */ + @JsonProperty(value = "entry") + private ChangeNotReimportedEntry entry; + + /** + * Get the delta changes that is not re-imported. + * + * @return the delta value + */ + public ChangeNotReimportedDelta delta() { + return this.delta; + } + + /** + * Set the delta changes that is not re-imported. + * + * @param delta the delta value to set + * @return the ChangeNotReimported object itself. + */ + public ChangeNotReimported withDelta(ChangeNotReimportedDelta delta) { + this.delta = delta; + return this; + } + + /** + * Get the object entry in a change that is not re-imported. + * + * @return the entry value + */ + public ChangeNotReimportedEntry entry() { + return this.entry; + } + + /** + * Set the object entry in a change that is not re-imported. + * + * @param entry the entry value to set + * @return the ChangeNotReimported object itself. + */ + public ChangeNotReimported withEntry(ChangeNotReimportedEntry entry) { + this.entry = entry; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ChangeNotReimportedDelta.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ChangeNotReimportedDelta.java new file mode 100644 index 0000000000000..27dfef61209ca --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ChangeNotReimportedDelta.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.adhybridhealthservice.v2014_01_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The delta in a change that is not re-imported. + */ +public class ChangeNotReimportedDelta { + /** + * The anchor. + */ + @JsonProperty(value = "anchor") + private String anchor; + + /** + * The delta attributes for distinguished names. + */ + @JsonProperty(value = "dnAttributes") + private List dnAttributes; + + /** + * The attributes. + */ + @JsonProperty(value = "attributes") + private List attributes; + + /** + * The operation type. Possible values include: 'Undefined', 'None', 'Add', + * 'Replace', 'Update', 'Delete', 'Obsolete', 'DeleteAdd'. + */ + @JsonProperty(value = "operationType") + private DeltaOperationType operationType; + + /** + * Get the anchor. + * + * @return the anchor value + */ + public String anchor() { + return this.anchor; + } + + /** + * Set the anchor. + * + * @param anchor the anchor value to set + * @return the ChangeNotReimportedDelta object itself. + */ + public ChangeNotReimportedDelta withAnchor(String anchor) { + this.anchor = anchor; + return this; + } + + /** + * Get the delta attributes for distinguished names. + * + * @return the dnAttributes value + */ + public List dnAttributes() { + return this.dnAttributes; + } + + /** + * Set the delta attributes for distinguished names. + * + * @param dnAttributes the dnAttributes value to set + * @return the ChangeNotReimportedDelta object itself. + */ + public ChangeNotReimportedDelta withDnAttributes(List dnAttributes) { + this.dnAttributes = dnAttributes; + return this; + } + + /** + * Get the attributes. + * + * @return the attributes value + */ + public List attributes() { + return this.attributes; + } + + /** + * Set the attributes. + * + * @param attributes the attributes value to set + * @return the ChangeNotReimportedDelta object itself. + */ + public ChangeNotReimportedDelta withAttributes(List attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get the operation type. Possible values include: 'Undefined', 'None', 'Add', 'Replace', 'Update', 'Delete', 'Obsolete', 'DeleteAdd'. + * + * @return the operationType value + */ + public DeltaOperationType operationType() { + return this.operationType; + } + + /** + * Set the operation type. Possible values include: 'Undefined', 'None', 'Add', 'Replace', 'Update', 'Delete', 'Obsolete', 'DeleteAdd'. + * + * @param operationType the operationType value to set + * @return the ChangeNotReimportedDelta object itself. + */ + public ChangeNotReimportedDelta withOperationType(DeltaOperationType operationType) { + this.operationType = operationType; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ChangeNotReimportedEntry.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ChangeNotReimportedEntry.java new file mode 100644 index 0000000000000..5da820199093a --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ChangeNotReimportedEntry.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The object entry in a change that is not re-imported. + */ +public class ChangeNotReimportedEntry { + /** + * The anchor. + */ + @JsonProperty(value = "anchor") + private String anchor; + + /** + * The parent anchor. + */ + @JsonProperty(value = "parentAnchor") + private String parentAnchor; + + /** + * The primary object class. + */ + @JsonProperty(value = "primaryObjectClass") + private String primaryObjectClass; + + /** + * The list of object classes. + */ + @JsonProperty(value = "objectClasses") + private List objectClasses; + + /** + * The delta attributes for distinguished names. + */ + @JsonProperty(value = "dnAttributes") + private List dnAttributes; + + /** + * The attributes. + */ + @JsonProperty(value = "attributes") + private List attributes; + + /** + * The distinguished name. + */ + @JsonProperty(value = "dn") + private String dn; + + /** + * Get the anchor. + * + * @return the anchor value + */ + public String anchor() { + return this.anchor; + } + + /** + * Set the anchor. + * + * @param anchor the anchor value to set + * @return the ChangeNotReimportedEntry object itself. + */ + public ChangeNotReimportedEntry withAnchor(String anchor) { + this.anchor = anchor; + return this; + } + + /** + * Get the parent anchor. + * + * @return the parentAnchor value + */ + public String parentAnchor() { + return this.parentAnchor; + } + + /** + * Set the parent anchor. + * + * @param parentAnchor the parentAnchor value to set + * @return the ChangeNotReimportedEntry object itself. + */ + public ChangeNotReimportedEntry withParentAnchor(String parentAnchor) { + this.parentAnchor = parentAnchor; + return this; + } + + /** + * Get the primary object class. + * + * @return the primaryObjectClass value + */ + public String primaryObjectClass() { + return this.primaryObjectClass; + } + + /** + * Set the primary object class. + * + * @param primaryObjectClass the primaryObjectClass value to set + * @return the ChangeNotReimportedEntry object itself. + */ + public ChangeNotReimportedEntry withPrimaryObjectClass(String primaryObjectClass) { + this.primaryObjectClass = primaryObjectClass; + return this; + } + + /** + * Get the list of object classes. + * + * @return the objectClasses value + */ + public List objectClasses() { + return this.objectClasses; + } + + /** + * Set the list of object classes. + * + * @param objectClasses the objectClasses value to set + * @return the ChangeNotReimportedEntry object itself. + */ + public ChangeNotReimportedEntry withObjectClasses(List objectClasses) { + this.objectClasses = objectClasses; + return this; + } + + /** + * Get the delta attributes for distinguished names. + * + * @return the dnAttributes value + */ + public List dnAttributes() { + return this.dnAttributes; + } + + /** + * Set the delta attributes for distinguished names. + * + * @param dnAttributes the dnAttributes value to set + * @return the ChangeNotReimportedEntry object itself. + */ + public ChangeNotReimportedEntry withDnAttributes(List dnAttributes) { + this.dnAttributes = dnAttributes; + return this; + } + + /** + * Get the attributes. + * + * @return the attributes value + */ + public List attributes() { + return this.attributes; + } + + /** + * Set the attributes. + * + * @param attributes the attributes value to set + * @return the ChangeNotReimportedEntry object itself. + */ + public ChangeNotReimportedEntry withAttributes(List attributes) { + this.attributes = attributes; + return this; + } + + /** + * Get the distinguished name. + * + * @return the dn value + */ + public String dn() { + return this.dn; + } + + /** + * Set the distinguished name. + * + * @param dn the dn value to set + * @return the ChangeNotReimportedEntry object itself. + */ + public ChangeNotReimportedEntry withDn(String dn) { + this.dn = dn; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Configurations.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Configurations.java new file mode 100644 index 0000000000000..0e4cb9f3a1b1f --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Configurations.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.TenantInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ConfigurationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Configurations. + */ +public interface Configurations extends HasInner { + /** + * Gets the service configurations. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAddsConfigurationsAsync(final String serviceName); + + /** + * Onboards a tenant in Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable addAsync(); + + /** + * Gets the details of a tenant onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(); + + /** + * Updates tenant properties for tenants onboarded to Azure Active Directory Connect Health. + * + * @param tenant The tenant object with the properties set to the updated value. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable updateAsync(TenantInner tenant); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Connector.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Connector.java new file mode 100644 index 0000000000000..69f0ce5e4eaa9 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Connector.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ConnectorInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import java.util.List; +import org.joda.time.DateTime; + +/** + * Type representing Connector. + */ +public interface Connector extends HasInner, HasManager { + /** + * @return the attributesIncluded value. + */ + List attributesIncluded(); + + /** + * @return the classesIncluded value. + */ + List classesIncluded(); + + /** + * @return the connectorId value. + */ + String connectorId(); + + /** + * @return the description value. + */ + String description(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the partitions value. + */ + List partitions(); + + /** + * @return the passwordHashSyncConfiguration value. + */ + Object passwordHashSyncConfiguration(); + + /** + * @return the passwordManagementSettings value. + */ + Object passwordManagementSettings(); + + /** + * @return the runProfiles value. + */ + List runProfiles(); + + /** + * @return the schemaXml value. + */ + String schemaXml(); + + /** + * @return the timeCreated value. + */ + DateTime timeCreated(); + + /** + * @return the timeLastModified value. + */ + DateTime timeLastModified(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the version value. + */ + Integer version(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorConnectionError.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorConnectionError.java new file mode 100644 index 0000000000000..cc56c972256e3 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorConnectionError.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.adhybridhealthservice.v2014_01_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The connector connection error. + */ +public class ConnectorConnectionError { + /** + * The error Id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The run step result Id. + */ + @JsonProperty(value = "runStepResultId") + private String runStepResultId; + + /** + * The connector Id. + */ + @JsonProperty(value = "connectorId") + private String connectorId; + + /** + * The type of error. + */ + @JsonProperty(value = "type") + private String type; + + /** + * The error code. + */ + @JsonProperty(value = "errorCode") + private String errorCode; + + /** + * The message for the connection error. + */ + @JsonProperty(value = "message") + private String message; + + /** + * The time when the connection error occurred. + */ + @JsonProperty(value = "timeOccured") + private DateTime timeOccured; + + /** + * The server where the connection error happened. + */ + @JsonProperty(value = "server") + private String server; + + /** + * Get the error Id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the error Id. + * + * @param id the id value to set + * @return the ConnectorConnectionError object itself. + */ + public ConnectorConnectionError withId(String id) { + this.id = id; + return this; + } + + /** + * Get the run step result Id. + * + * @return the runStepResultId value + */ + public String runStepResultId() { + return this.runStepResultId; + } + + /** + * Set the run step result Id. + * + * @param runStepResultId the runStepResultId value to set + * @return the ConnectorConnectionError object itself. + */ + public ConnectorConnectionError withRunStepResultId(String runStepResultId) { + this.runStepResultId = runStepResultId; + return this; + } + + /** + * Get the connector Id. + * + * @return the connectorId value + */ + public String connectorId() { + return this.connectorId; + } + + /** + * Set the connector Id. + * + * @param connectorId the connectorId value to set + * @return the ConnectorConnectionError object itself. + */ + public ConnectorConnectionError withConnectorId(String connectorId) { + this.connectorId = connectorId; + return this; + } + + /** + * Get the type of error. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type of error. + * + * @param type the type value to set + * @return the ConnectorConnectionError object itself. + */ + public ConnectorConnectionError withType(String type) { + this.type = type; + return this; + } + + /** + * Get the error code. + * + * @return the errorCode value + */ + public String errorCode() { + return this.errorCode; + } + + /** + * Set the error code. + * + * @param errorCode the errorCode value to set + * @return the ConnectorConnectionError object itself. + */ + public ConnectorConnectionError withErrorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * Get the message for the connection error. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the message for the connection error. + * + * @param message the message value to set + * @return the ConnectorConnectionError object itself. + */ + public ConnectorConnectionError withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the time when the connection error occurred. + * + * @return the timeOccured value + */ + public DateTime timeOccured() { + return this.timeOccured; + } + + /** + * Set the time when the connection error occurred. + * + * @param timeOccured the timeOccured value to set + * @return the ConnectorConnectionError object itself. + */ + public ConnectorConnectionError withTimeOccured(DateTime timeOccured) { + this.timeOccured = timeOccured; + return this; + } + + /** + * Get the server where the connection error happened. + * + * @return the server value + */ + public String server() { + return this.server; + } + + /** + * Set the server where the connection error happened. + * + * @param server the server value to set + * @return the ConnectorConnectionError object itself. + */ + public ConnectorConnectionError withServer(String server) { + this.server = server; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorConnectionErrors.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorConnectionErrors.java new file mode 100644 index 0000000000000..2eaf4cad3a409 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorConnectionErrors.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.adhybridhealthservice.v2014_01_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of connector connection errors. + */ +public class ConnectorConnectionErrors { + /** + * The value returned by the operation. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value returned by the operation. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value returned by the operation. + * + * @param value the value value to set + * @return the ConnectorConnectionErrors object itself. + */ + public ConnectorConnectionErrors withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorMetadata.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorMetadata.java new file mode 100644 index 0000000000000..a870fd1ea7196 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorMetadata.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ConnectorMetadataInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import java.util.List; + +/** + * Type representing ConnectorMetadata. + */ +public interface ConnectorMetadata extends HasInner, HasManager { + /** + * @return the connectors value. + */ + List connectors(); + + /** + * @return the runProfileNames value. + */ + List runProfileNames(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorMetadataDetails.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorMetadataDetails.java new file mode 100644 index 0000000000000..53a8ed0074534 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorMetadataDetails.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.adhybridhealthservice.v2014_01_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of the connector. + */ +public class ConnectorMetadataDetails { + /** + * The Connector Id. + */ + @JsonProperty(value = "connectorId") + private String connectorId; + + /** + * The Connector Display Name. + */ + @JsonProperty(value = "connectorDisplayName") + private String connectorDisplayName; + + /** + * Get the Connector Id. + * + * @return the connectorId value + */ + public String connectorId() { + return this.connectorId; + } + + /** + * Set the Connector Id. + * + * @param connectorId the connectorId value to set + * @return the ConnectorMetadataDetails object itself. + */ + public ConnectorMetadataDetails withConnectorId(String connectorId) { + this.connectorId = connectorId; + return this; + } + + /** + * Get the Connector Display Name. + * + * @return the connectorDisplayName value + */ + public String connectorDisplayName() { + return this.connectorDisplayName; + } + + /** + * Set the Connector Display Name. + * + * @param connectorDisplayName the connectorDisplayName value to set + * @return the ConnectorMetadataDetails object itself. + */ + public ConnectorMetadataDetails withConnectorDisplayName(String connectorDisplayName) { + this.connectorDisplayName = connectorDisplayName; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorObjectError.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorObjectError.java new file mode 100644 index 0000000000000..30118f31c187a --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorObjectError.java @@ -0,0 +1,382 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The connector object error. + */ +public class ConnectorObjectError { + /** + * The error Id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The run step result Id. + */ + @JsonProperty(value = "runStepResultId") + private String runStepResultId; + + /** + * The connector Id. + */ + @JsonProperty(value = "connectorId") + private String connectorId; + + /** + * The type of error. + */ + @JsonProperty(value = "type") + private String type; + + /** + * The error code. + */ + @JsonProperty(value = "errorCode") + private String errorCode; + + /** + * The message for the object error. + */ + @JsonProperty(value = "message") + private String message; + + /** + * The entry number for object error occurred. + */ + @JsonProperty(value = "entryNumber") + private Integer entryNumber; + + /** + * The line number for the object error. + */ + @JsonProperty(value = "lineNumber") + private Integer lineNumber; + + /** + * The column number for the object error. + */ + @JsonProperty(value = "columnNumber") + private Integer columnNumber; + + /** + * The distinguished name of the object. + */ + @JsonProperty(value = "dn") + private String dn; + + /** + * The name for the anchor of the object. + */ + @JsonProperty(value = "anchor") + private String anchor; + + /** + * The attribute name of the object. + */ + @JsonProperty(value = "attributeName") + private String attributeName; + + /** + * The server side error details. + */ + @JsonProperty(value = "serverErrorDetail") + private String serverErrorDetail; + + /** + * The value corresponding to attribute name. + */ + @JsonProperty(value = "values") + private List values; + + /** + * Get the error Id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the error Id. + * + * @param id the id value to set + * @return the ConnectorObjectError object itself. + */ + public ConnectorObjectError withId(String id) { + this.id = id; + return this; + } + + /** + * Get the run step result Id. + * + * @return the runStepResultId value + */ + public String runStepResultId() { + return this.runStepResultId; + } + + /** + * Set the run step result Id. + * + * @param runStepResultId the runStepResultId value to set + * @return the ConnectorObjectError object itself. + */ + public ConnectorObjectError withRunStepResultId(String runStepResultId) { + this.runStepResultId = runStepResultId; + return this; + } + + /** + * Get the connector Id. + * + * @return the connectorId value + */ + public String connectorId() { + return this.connectorId; + } + + /** + * Set the connector Id. + * + * @param connectorId the connectorId value to set + * @return the ConnectorObjectError object itself. + */ + public ConnectorObjectError withConnectorId(String connectorId) { + this.connectorId = connectorId; + return this; + } + + /** + * Get the type of error. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type of error. + * + * @param type the type value to set + * @return the ConnectorObjectError object itself. + */ + public ConnectorObjectError withType(String type) { + this.type = type; + return this; + } + + /** + * Get the error code. + * + * @return the errorCode value + */ + public String errorCode() { + return this.errorCode; + } + + /** + * Set the error code. + * + * @param errorCode the errorCode value to set + * @return the ConnectorObjectError object itself. + */ + public ConnectorObjectError withErrorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * Get the message for the object error. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the message for the object error. + * + * @param message the message value to set + * @return the ConnectorObjectError object itself. + */ + public ConnectorObjectError withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the entry number for object error occurred. + * + * @return the entryNumber value + */ + public Integer entryNumber() { + return this.entryNumber; + } + + /** + * Set the entry number for object error occurred. + * + * @param entryNumber the entryNumber value to set + * @return the ConnectorObjectError object itself. + */ + public ConnectorObjectError withEntryNumber(Integer entryNumber) { + this.entryNumber = entryNumber; + return this; + } + + /** + * Get the line number for the object error. + * + * @return the lineNumber value + */ + public Integer lineNumber() { + return this.lineNumber; + } + + /** + * Set the line number for the object error. + * + * @param lineNumber the lineNumber value to set + * @return the ConnectorObjectError object itself. + */ + public ConnectorObjectError withLineNumber(Integer lineNumber) { + this.lineNumber = lineNumber; + return this; + } + + /** + * Get the column number for the object error. + * + * @return the columnNumber value + */ + public Integer columnNumber() { + return this.columnNumber; + } + + /** + * Set the column number for the object error. + * + * @param columnNumber the columnNumber value to set + * @return the ConnectorObjectError object itself. + */ + public ConnectorObjectError withColumnNumber(Integer columnNumber) { + this.columnNumber = columnNumber; + return this; + } + + /** + * Get the distinguished name of the object. + * + * @return the dn value + */ + public String dn() { + return this.dn; + } + + /** + * Set the distinguished name of the object. + * + * @param dn the dn value to set + * @return the ConnectorObjectError object itself. + */ + public ConnectorObjectError withDn(String dn) { + this.dn = dn; + return this; + } + + /** + * Get the name for the anchor of the object. + * + * @return the anchor value + */ + public String anchor() { + return this.anchor; + } + + /** + * Set the name for the anchor of the object. + * + * @param anchor the anchor value to set + * @return the ConnectorObjectError object itself. + */ + public ConnectorObjectError withAnchor(String anchor) { + this.anchor = anchor; + return this; + } + + /** + * Get the attribute name of the object. + * + * @return the attributeName value + */ + public String attributeName() { + return this.attributeName; + } + + /** + * Set the attribute name of the object. + * + * @param attributeName the attributeName value to set + * @return the ConnectorObjectError object itself. + */ + public ConnectorObjectError withAttributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * Get the server side error details. + * + * @return the serverErrorDetail value + */ + public String serverErrorDetail() { + return this.serverErrorDetail; + } + + /** + * Set the server side error details. + * + * @param serverErrorDetail the serverErrorDetail value to set + * @return the ConnectorObjectError object itself. + */ + public ConnectorObjectError withServerErrorDetail(String serverErrorDetail) { + this.serverErrorDetail = serverErrorDetail; + return this; + } + + /** + * Get the value corresponding to attribute name. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Set the value corresponding to attribute name. + * + * @param values the values value to set + * @return the ConnectorObjectError object itself. + */ + public ConnectorObjectError withValues(List values) { + this.values = values; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorObjectErrors.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorObjectErrors.java new file mode 100644 index 0000000000000..9a23734f65246 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ConnectorObjectErrors.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.adhybridhealthservice.v2014_01_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of connector object errors. + */ +public class ConnectorObjectErrors { + /** + * The value returned by the operation. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value returned by the operation. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value returned by the operation. + * + * @param value the value value to set + * @return the ConnectorObjectErrors object itself. + */ + public ConnectorObjectErrors withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/DeltaOperationType.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/DeltaOperationType.java new file mode 100644 index 0000000000000..4f02bdf29d7c6 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/DeltaOperationType.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.adhybridhealthservice.v2014_01_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for DeltaOperationType. + */ +public final class DeltaOperationType extends ExpandableStringEnum { + /** Static value Undefined for DeltaOperationType. */ + public static final DeltaOperationType UNDEFINED = fromString("Undefined"); + + /** Static value None for DeltaOperationType. */ + public static final DeltaOperationType NONE = fromString("None"); + + /** Static value Add for DeltaOperationType. */ + public static final DeltaOperationType ADD = fromString("Add"); + + /** Static value Replace for DeltaOperationType. */ + public static final DeltaOperationType REPLACE = fromString("Replace"); + + /** Static value Update for DeltaOperationType. */ + public static final DeltaOperationType UPDATE = fromString("Update"); + + /** Static value Delete for DeltaOperationType. */ + public static final DeltaOperationType DELETE = fromString("Delete"); + + /** Static value Obsolete for DeltaOperationType. */ + public static final DeltaOperationType OBSOLETE = fromString("Obsolete"); + + /** Static value DeleteAdd for DeltaOperationType. */ + public static final DeltaOperationType DELETE_ADD = fromString("DeleteAdd"); + + /** + * Creates or finds a DeltaOperationType from its string representation. + * @param name a name to look for + * @return the corresponding DeltaOperationType + */ + @JsonCreator + public static DeltaOperationType fromString(String name) { + return fromString(name, DeltaOperationType.class); + } + + /** + * @return known DeltaOperationType values + */ + public static Collection values() { + return values(DeltaOperationType.class); + } +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Dimension.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Dimension.java new file mode 100644 index 0000000000000..2cdb317c1417d --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Dimension.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.DimensionInner; +import org.joda.time.DateTime; + +/** + * Type representing Dimension. + */ +public interface Dimension extends HasInner, HasManager { + /** + * @return the activeAlerts value. + */ + Integer activeAlerts(); + + /** + * @return the additionalInformation value. + */ + String additionalInformation(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the health value. + */ + HealthStatus health(); + + /** + * @return the lastUpdated value. + */ + DateTime lastUpdated(); + + /** + * @return the resolvedAlerts value. + */ + Integer resolvedAlerts(); + + /** + * @return the signature value. + */ + String signature(); + + /** + * @return the simpleProperties value. + */ + Object simpleProperties(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Dimensions.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Dimensions.java new file mode 100644 index 0000000000000..9fc9717322965 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Dimensions.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.DimensionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Dimensions. + */ +public interface Dimensions extends HasInner { + /** + * Gets the dimensions for a given dimension type in a server. + * + * @param serviceName The name of the service. + * @param dimension The dimension type. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAddsDimensionsAsync(final String serviceName, final String dimension); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Display.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Display.java new file mode 100644 index 0000000000000..7321f9fdb22ec --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Display.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.adhybridhealthservice.v2014_01_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Displays the details related to operations supported by Azure Active + * Directory Connect Health. + */ +public class Display { + /** + * The description for the operation. + */ + @JsonProperty(value = "description") + private String description; + + /** + * The details of the operation. + */ + @JsonProperty(value = "operation") + private String operation; + + /** + * The provider name. + */ + @JsonProperty(value = "provider") + private String provider; + + /** + * Get the description for the operation. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the description for the operation. + * + * @param description the description value to set + * @return the Display object itself. + */ + public Display withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the details of the operation. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set the details of the operation. + * + * @param operation the operation value to set + * @return the Display object itself. + */ + public Display withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the provider name. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set the provider name. + * + * @param provider the provider value to set + * @return the Display object itself. + */ + public Display withProvider(String provider) { + this.provider = provider; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ErrorCount.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ErrorCount.java new file mode 100644 index 0000000000000..459e0a04b52d4 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ErrorCount.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ErrorCountInner; + +/** + * Type representing ErrorCount. + */ +public interface ErrorCount extends HasInner, HasManager { + /** + * @return the count value. + */ + Integer count(); + + /** + * @return the errorBucket value. + */ + String errorBucket(); + + /** + * @return the truncated value. + */ + Boolean truncated(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ErrorDetail.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ErrorDetail.java new file mode 100644 index 0000000000000..27c0a46f672fa --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ErrorDetail.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.MergedExportErrorInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The error details. + */ +public class ErrorDetail { + /** + * The error description. + */ + @JsonProperty(value = "description") + private String description; + + /** + * The knowledge base article url which contains more information about the + * error. + */ + @JsonProperty(value = "kbUrl") + private String kbUrl; + + /** + * Additional details related to the error. + */ + @JsonProperty(value = "detail") + private String detail; + + /** + * The list of objects with sync errors. + */ + @JsonProperty(value = "objectsWithSyncError") + private ObjectWithSyncError objectsWithSyncError; + + /** + * The object with sync error. + */ + @JsonProperty(value = "objectWithSyncError") + private MergedExportErrorInner objectWithSyncError; + + /** + * Get the error description. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the error description. + * + * @param description the description value to set + * @return the ErrorDetail object itself. + */ + public ErrorDetail withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the knowledge base article url which contains more information about the error. + * + * @return the kbUrl value + */ + public String kbUrl() { + return this.kbUrl; + } + + /** + * Set the knowledge base article url which contains more information about the error. + * + * @param kbUrl the kbUrl value to set + * @return the ErrorDetail object itself. + */ + public ErrorDetail withKbUrl(String kbUrl) { + this.kbUrl = kbUrl; + return this; + } + + /** + * Get additional details related to the error. + * + * @return the detail value + */ + public String detail() { + return this.detail; + } + + /** + * Set additional details related to the error. + * + * @param detail the detail value to set + * @return the ErrorDetail object itself. + */ + public ErrorDetail withDetail(String detail) { + this.detail = detail; + return this; + } + + /** + * Get the list of objects with sync errors. + * + * @return the objectsWithSyncError value + */ + public ObjectWithSyncError objectsWithSyncError() { + return this.objectsWithSyncError; + } + + /** + * Set the list of objects with sync errors. + * + * @param objectsWithSyncError the objectsWithSyncError value to set + * @return the ErrorDetail object itself. + */ + public ErrorDetail withObjectsWithSyncError(ObjectWithSyncError objectsWithSyncError) { + this.objectsWithSyncError = objectsWithSyncError; + return this; + } + + /** + * Get the object with sync error. + * + * @return the objectWithSyncError value + */ + public MergedExportErrorInner objectWithSyncError() { + return this.objectWithSyncError; + } + + /** + * Set the object with sync error. + * + * @param objectWithSyncError the objectWithSyncError value to set + * @return the ErrorDetail object itself. + */ + public ErrorDetail withObjectWithSyncError(MergedExportErrorInner objectWithSyncError) { + this.objectWithSyncError = objectWithSyncError; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ErrorReportUsersEntry.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ErrorReportUsersEntry.java new file mode 100644 index 0000000000000..752d0ae875d4c --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ErrorReportUsersEntry.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ErrorReportUsersEntryInner; +import org.joda.time.DateTime; + +/** + * Type representing ErrorReportUsersEntry. + */ +public interface ErrorReportUsersEntry extends HasInner, HasManager { + /** + * @return the ipAddress value. + */ + String ipAddress(); + + /** + * @return the lastUpdated value. + */ + DateTime lastUpdated(); + + /** + * @return the totalErrorAttempts value. + */ + Integer totalErrorAttempts(); + + /** + * @return the uniqueIpAddresses value. + */ + String uniqueIpAddresses(); + + /** + * @return the userId value. + */ + String userId(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ExportError.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ExportError.java new file mode 100644 index 0000000000000..2e33a031d7ea0 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ExportError.java @@ -0,0 +1,980 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The export error details. + */ +public class ExportError { + /** + * The error Id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The run step result Id. + */ + @JsonProperty(value = "runStepResultId") + private String runStepResultId; + + /** + * The connector Id. + */ + @JsonProperty(value = "connectorId") + private String connectorId; + + /** + * The type of error. + */ + @JsonProperty(value = "type") + private String type; + + /** + * The error code. + */ + @JsonProperty(value = "errorCode") + private String errorCode; + + /** + * The export error message. + */ + @JsonProperty(value = "message") + private String message; + + /** + * The server error detail. + */ + @JsonProperty(value = "serverErrorDetail") + private String serverErrorDetail; + + /** + * The date and time when the export error first occurred. + */ + @JsonProperty(value = "timeFirstOccured") + private DateTime timeFirstOccured; + + /** + * The retry count. + */ + @JsonProperty(value = "retryCount") + private Integer retryCount; + + /** + * The cloud object Id. + */ + @JsonProperty(value = "csObjectId") + private String csObjectId; + + /** + * The distinguished name. + */ + @JsonProperty(value = "dn") + private String dn; + + /** + * The minimum limit. + */ + @JsonProperty(value = "minLimit") + private String minLimit; + + /** + * The maximum limit. + */ + @JsonProperty(value = "maxLimit") + private String maxLimit; + + /** + * The name of the cloud anchor. + */ + @JsonProperty(value = "cloudAnchor") + private String cloudAnchor; + + /** + * The attribute name. + */ + @JsonProperty(value = "attributeName") + private String attributeName; + + /** + * The attribute value. + */ + @JsonProperty(value = "attributeValue") + private String attributeValue; + + /** + * Indicates if the attribute is multi valued or not. + */ + @JsonProperty(value = "attributeMultiValue") + private Boolean attributeMultiValue; + + /** + * The object Id with which there was an attribute conflict. + */ + @JsonProperty(value = "objectIdConflict") + private String objectIdConflict; + + /** + * The SAM account name. + */ + @JsonProperty(value = "samAccountName") + private String samAccountName; + + /** + * The AD object type. + */ + @JsonProperty(value = "adObjectType") + private String adObjectType; + + /** + * The AD object guid. + */ + @JsonProperty(value = "adObjectGuid") + private String adObjectGuid; + + /** + * The display name for the AD object. + */ + @JsonProperty(value = "adDisplayName") + private String adDisplayName; + + /** + * The source of authority for the AD object. + */ + @JsonProperty(value = "adSourceOfAuthority") + private String adSourceOfAuthority; + + /** + * The AD source anchor. + */ + @JsonProperty(value = "adSourceAnchor") + private String adSourceAnchor; + + /** + * The user principal name for the AD object. + */ + @JsonProperty(value = "adUserPrincipalName") + private String adUserPrincipalName; + + /** + * The distinguished name for the AD object. + */ + @JsonProperty(value = "adDistinguishedName") + private String adDistinguishedName; + + /** + * The email for the AD object. + */ + @JsonProperty(value = "adMail") + private String adMail; + + /** + * The date and time of occurrence. + */ + @JsonProperty(value = "timeOccured") + private DateTime timeOccured; + + /** + * The AAD side object type. + */ + @JsonProperty(value = "aadObjectType") + private String aadObjectType; + + /** + * The AAD side object guid. + */ + @JsonProperty(value = "aadObjectGuid") + private String aadObjectGuid; + + /** + * The AAD side display name. + */ + @JsonProperty(value = "aadDisplayName") + private String aadDisplayName; + + /** + * The AAD side source of authority for the object. + */ + @JsonProperty(value = "aadSourceOfAuthority") + private String aadSourceOfAuthority; + + /** + * The AAD side user principal name. + */ + @JsonProperty(value = "aadUserPrincipalName") + private String aadUserPrincipalName; + + /** + * The AAD side distinguished name for the object. + */ + @JsonProperty(value = "aadDistinguishedName") + private String aadDistinguishedName; + + /** + * The AAD side email for the object. + */ + @JsonProperty(value = "aadMail") + private String aadMail; + + /** + * The date and time of last sync run. + */ + @JsonProperty(value = "lastDirSyncTime") + private DateTime lastDirSyncTime; + + /** + * The modified attribute value. + */ + @JsonProperty(value = "modifiedAttributeValue") + private String modifiedAttributeValue; + + /** + * Get the error Id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the error Id. + * + * @param id the id value to set + * @return the ExportError object itself. + */ + public ExportError withId(String id) { + this.id = id; + return this; + } + + /** + * Get the run step result Id. + * + * @return the runStepResultId value + */ + public String runStepResultId() { + return this.runStepResultId; + } + + /** + * Set the run step result Id. + * + * @param runStepResultId the runStepResultId value to set + * @return the ExportError object itself. + */ + public ExportError withRunStepResultId(String runStepResultId) { + this.runStepResultId = runStepResultId; + return this; + } + + /** + * Get the connector Id. + * + * @return the connectorId value + */ + public String connectorId() { + return this.connectorId; + } + + /** + * Set the connector Id. + * + * @param connectorId the connectorId value to set + * @return the ExportError object itself. + */ + public ExportError withConnectorId(String connectorId) { + this.connectorId = connectorId; + return this; + } + + /** + * Get the type of error. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type of error. + * + * @param type the type value to set + * @return the ExportError object itself. + */ + public ExportError withType(String type) { + this.type = type; + return this; + } + + /** + * Get the error code. + * + * @return the errorCode value + */ + public String errorCode() { + return this.errorCode; + } + + /** + * Set the error code. + * + * @param errorCode the errorCode value to set + * @return the ExportError object itself. + */ + public ExportError withErrorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * Get the export error message. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the export error message. + * + * @param message the message value to set + * @return the ExportError object itself. + */ + public ExportError withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the server error detail. + * + * @return the serverErrorDetail value + */ + public String serverErrorDetail() { + return this.serverErrorDetail; + } + + /** + * Set the server error detail. + * + * @param serverErrorDetail the serverErrorDetail value to set + * @return the ExportError object itself. + */ + public ExportError withServerErrorDetail(String serverErrorDetail) { + this.serverErrorDetail = serverErrorDetail; + return this; + } + + /** + * Get the date and time when the export error first occurred. + * + * @return the timeFirstOccured value + */ + public DateTime timeFirstOccured() { + return this.timeFirstOccured; + } + + /** + * Set the date and time when the export error first occurred. + * + * @param timeFirstOccured the timeFirstOccured value to set + * @return the ExportError object itself. + */ + public ExportError withTimeFirstOccured(DateTime timeFirstOccured) { + this.timeFirstOccured = timeFirstOccured; + return this; + } + + /** + * Get the retry count. + * + * @return the retryCount value + */ + public Integer retryCount() { + return this.retryCount; + } + + /** + * Set the retry count. + * + * @param retryCount the retryCount value to set + * @return the ExportError object itself. + */ + public ExportError withRetryCount(Integer retryCount) { + this.retryCount = retryCount; + return this; + } + + /** + * Get the cloud object Id. + * + * @return the csObjectId value + */ + public String csObjectId() { + return this.csObjectId; + } + + /** + * Set the cloud object Id. + * + * @param csObjectId the csObjectId value to set + * @return the ExportError object itself. + */ + public ExportError withCsObjectId(String csObjectId) { + this.csObjectId = csObjectId; + return this; + } + + /** + * Get the distinguished name. + * + * @return the dn value + */ + public String dn() { + return this.dn; + } + + /** + * Set the distinguished name. + * + * @param dn the dn value to set + * @return the ExportError object itself. + */ + public ExportError withDn(String dn) { + this.dn = dn; + return this; + } + + /** + * Get the minimum limit. + * + * @return the minLimit value + */ + public String minLimit() { + return this.minLimit; + } + + /** + * Set the minimum limit. + * + * @param minLimit the minLimit value to set + * @return the ExportError object itself. + */ + public ExportError withMinLimit(String minLimit) { + this.minLimit = minLimit; + return this; + } + + /** + * Get the maximum limit. + * + * @return the maxLimit value + */ + public String maxLimit() { + return this.maxLimit; + } + + /** + * Set the maximum limit. + * + * @param maxLimit the maxLimit value to set + * @return the ExportError object itself. + */ + public ExportError withMaxLimit(String maxLimit) { + this.maxLimit = maxLimit; + return this; + } + + /** + * Get the name of the cloud anchor. + * + * @return the cloudAnchor value + */ + public String cloudAnchor() { + return this.cloudAnchor; + } + + /** + * Set the name of the cloud anchor. + * + * @param cloudAnchor the cloudAnchor value to set + * @return the ExportError object itself. + */ + public ExportError withCloudAnchor(String cloudAnchor) { + this.cloudAnchor = cloudAnchor; + return this; + } + + /** + * Get the attribute name. + * + * @return the attributeName value + */ + public String attributeName() { + return this.attributeName; + } + + /** + * Set the attribute name. + * + * @param attributeName the attributeName value to set + * @return the ExportError object itself. + */ + public ExportError withAttributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * Get the attribute value. + * + * @return the attributeValue value + */ + public String attributeValue() { + return this.attributeValue; + } + + /** + * Set the attribute value. + * + * @param attributeValue the attributeValue value to set + * @return the ExportError object itself. + */ + public ExportError withAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * Get indicates if the attribute is multi valued or not. + * + * @return the attributeMultiValue value + */ + public Boolean attributeMultiValue() { + return this.attributeMultiValue; + } + + /** + * Set indicates if the attribute is multi valued or not. + * + * @param attributeMultiValue the attributeMultiValue value to set + * @return the ExportError object itself. + */ + public ExportError withAttributeMultiValue(Boolean attributeMultiValue) { + this.attributeMultiValue = attributeMultiValue; + return this; + } + + /** + * Get the object Id with which there was an attribute conflict. + * + * @return the objectIdConflict value + */ + public String objectIdConflict() { + return this.objectIdConflict; + } + + /** + * Set the object Id with which there was an attribute conflict. + * + * @param objectIdConflict the objectIdConflict value to set + * @return the ExportError object itself. + */ + public ExportError withObjectIdConflict(String objectIdConflict) { + this.objectIdConflict = objectIdConflict; + return this; + } + + /** + * Get the SAM account name. + * + * @return the samAccountName value + */ + public String samAccountName() { + return this.samAccountName; + } + + /** + * Set the SAM account name. + * + * @param samAccountName the samAccountName value to set + * @return the ExportError object itself. + */ + public ExportError withSamAccountName(String samAccountName) { + this.samAccountName = samAccountName; + return this; + } + + /** + * Get the AD object type. + * + * @return the adObjectType value + */ + public String adObjectType() { + return this.adObjectType; + } + + /** + * Set the AD object type. + * + * @param adObjectType the adObjectType value to set + * @return the ExportError object itself. + */ + public ExportError withAdObjectType(String adObjectType) { + this.adObjectType = adObjectType; + return this; + } + + /** + * Get the AD object guid. + * + * @return the adObjectGuid value + */ + public String adObjectGuid() { + return this.adObjectGuid; + } + + /** + * Set the AD object guid. + * + * @param adObjectGuid the adObjectGuid value to set + * @return the ExportError object itself. + */ + public ExportError withAdObjectGuid(String adObjectGuid) { + this.adObjectGuid = adObjectGuid; + return this; + } + + /** + * Get the display name for the AD object. + * + * @return the adDisplayName value + */ + public String adDisplayName() { + return this.adDisplayName; + } + + /** + * Set the display name for the AD object. + * + * @param adDisplayName the adDisplayName value to set + * @return the ExportError object itself. + */ + public ExportError withAdDisplayName(String adDisplayName) { + this.adDisplayName = adDisplayName; + return this; + } + + /** + * Get the source of authority for the AD object. + * + * @return the adSourceOfAuthority value + */ + public String adSourceOfAuthority() { + return this.adSourceOfAuthority; + } + + /** + * Set the source of authority for the AD object. + * + * @param adSourceOfAuthority the adSourceOfAuthority value to set + * @return the ExportError object itself. + */ + public ExportError withAdSourceOfAuthority(String adSourceOfAuthority) { + this.adSourceOfAuthority = adSourceOfAuthority; + return this; + } + + /** + * Get the AD source anchor. + * + * @return the adSourceAnchor value + */ + public String adSourceAnchor() { + return this.adSourceAnchor; + } + + /** + * Set the AD source anchor. + * + * @param adSourceAnchor the adSourceAnchor value to set + * @return the ExportError object itself. + */ + public ExportError withAdSourceAnchor(String adSourceAnchor) { + this.adSourceAnchor = adSourceAnchor; + return this; + } + + /** + * Get the user principal name for the AD object. + * + * @return the adUserPrincipalName value + */ + public String adUserPrincipalName() { + return this.adUserPrincipalName; + } + + /** + * Set the user principal name for the AD object. + * + * @param adUserPrincipalName the adUserPrincipalName value to set + * @return the ExportError object itself. + */ + public ExportError withAdUserPrincipalName(String adUserPrincipalName) { + this.adUserPrincipalName = adUserPrincipalName; + return this; + } + + /** + * Get the distinguished name for the AD object. + * + * @return the adDistinguishedName value + */ + public String adDistinguishedName() { + return this.adDistinguishedName; + } + + /** + * Set the distinguished name for the AD object. + * + * @param adDistinguishedName the adDistinguishedName value to set + * @return the ExportError object itself. + */ + public ExportError withAdDistinguishedName(String adDistinguishedName) { + this.adDistinguishedName = adDistinguishedName; + return this; + } + + /** + * Get the email for the AD object. + * + * @return the adMail value + */ + public String adMail() { + return this.adMail; + } + + /** + * Set the email for the AD object. + * + * @param adMail the adMail value to set + * @return the ExportError object itself. + */ + public ExportError withAdMail(String adMail) { + this.adMail = adMail; + return this; + } + + /** + * Get the date and time of occurrence. + * + * @return the timeOccured value + */ + public DateTime timeOccured() { + return this.timeOccured; + } + + /** + * Set the date and time of occurrence. + * + * @param timeOccured the timeOccured value to set + * @return the ExportError object itself. + */ + public ExportError withTimeOccured(DateTime timeOccured) { + this.timeOccured = timeOccured; + return this; + } + + /** + * Get the AAD side object type. + * + * @return the aadObjectType value + */ + public String aadObjectType() { + return this.aadObjectType; + } + + /** + * Set the AAD side object type. + * + * @param aadObjectType the aadObjectType value to set + * @return the ExportError object itself. + */ + public ExportError withAadObjectType(String aadObjectType) { + this.aadObjectType = aadObjectType; + return this; + } + + /** + * Get the AAD side object guid. + * + * @return the aadObjectGuid value + */ + public String aadObjectGuid() { + return this.aadObjectGuid; + } + + /** + * Set the AAD side object guid. + * + * @param aadObjectGuid the aadObjectGuid value to set + * @return the ExportError object itself. + */ + public ExportError withAadObjectGuid(String aadObjectGuid) { + this.aadObjectGuid = aadObjectGuid; + return this; + } + + /** + * Get the AAD side display name. + * + * @return the aadDisplayName value + */ + public String aadDisplayName() { + return this.aadDisplayName; + } + + /** + * Set the AAD side display name. + * + * @param aadDisplayName the aadDisplayName value to set + * @return the ExportError object itself. + */ + public ExportError withAadDisplayName(String aadDisplayName) { + this.aadDisplayName = aadDisplayName; + return this; + } + + /** + * Get the AAD side source of authority for the object. + * + * @return the aadSourceOfAuthority value + */ + public String aadSourceOfAuthority() { + return this.aadSourceOfAuthority; + } + + /** + * Set the AAD side source of authority for the object. + * + * @param aadSourceOfAuthority the aadSourceOfAuthority value to set + * @return the ExportError object itself. + */ + public ExportError withAadSourceOfAuthority(String aadSourceOfAuthority) { + this.aadSourceOfAuthority = aadSourceOfAuthority; + return this; + } + + /** + * Get the AAD side user principal name. + * + * @return the aadUserPrincipalName value + */ + public String aadUserPrincipalName() { + return this.aadUserPrincipalName; + } + + /** + * Set the AAD side user principal name. + * + * @param aadUserPrincipalName the aadUserPrincipalName value to set + * @return the ExportError object itself. + */ + public ExportError withAadUserPrincipalName(String aadUserPrincipalName) { + this.aadUserPrincipalName = aadUserPrincipalName; + return this; + } + + /** + * Get the AAD side distinguished name for the object. + * + * @return the aadDistinguishedName value + */ + public String aadDistinguishedName() { + return this.aadDistinguishedName; + } + + /** + * Set the AAD side distinguished name for the object. + * + * @param aadDistinguishedName the aadDistinguishedName value to set + * @return the ExportError object itself. + */ + public ExportError withAadDistinguishedName(String aadDistinguishedName) { + this.aadDistinguishedName = aadDistinguishedName; + return this; + } + + /** + * Get the AAD side email for the object. + * + * @return the aadMail value + */ + public String aadMail() { + return this.aadMail; + } + + /** + * Set the AAD side email for the object. + * + * @param aadMail the aadMail value to set + * @return the ExportError object itself. + */ + public ExportError withAadMail(String aadMail) { + this.aadMail = aadMail; + return this; + } + + /** + * Get the date and time of last sync run. + * + * @return the lastDirSyncTime value + */ + public DateTime lastDirSyncTime() { + return this.lastDirSyncTime; + } + + /** + * Set the date and time of last sync run. + * + * @param lastDirSyncTime the lastDirSyncTime value to set + * @return the ExportError object itself. + */ + public ExportError withLastDirSyncTime(DateTime lastDirSyncTime) { + this.lastDirSyncTime = lastDirSyncTime; + return this; + } + + /** + * Get the modified attribute value. + * + * @return the modifiedAttributeValue value + */ + public String modifiedAttributeValue() { + return this.modifiedAttributeValue; + } + + /** + * Set the modified attribute value. + * + * @param modifiedAttributeValue the modifiedAttributeValue value to set + * @return the ExportError object itself. + */ + public ExportError withModifiedAttributeValue(String modifiedAttributeValue) { + this.modifiedAttributeValue = modifiedAttributeValue; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ExportErrors.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ExportErrors.java new file mode 100644 index 0000000000000..7884f1b56bbe6 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ExportErrors.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.adhybridhealthservice.v2014_01_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of export errors. + */ +public class ExportErrors { + /** + * The value returned by the operation. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value returned by the operation. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value returned by the operation. + * + * @param value the value value to set + * @return the ExportErrors object itself. + */ + public ExportErrors withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ExtensionErrorInfo.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ExtensionErrorInfo.java new file mode 100644 index 0000000000000..397b151d58aa9 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ExtensionErrorInfo.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.adhybridhealthservice.v2014_01_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The extension error details. + */ +public class ExtensionErrorInfo { + /** + * The extension name. + */ + @JsonProperty(value = "extensionName") + private String extensionName; + + /** + * The extension context. + */ + @JsonProperty(value = "extensionContext") + private String extensionContext; + + /** + * The call stack for the error. + */ + @JsonProperty(value = "callStack") + private String callStack; + + /** + * Get the extension name. + * + * @return the extensionName value + */ + public String extensionName() { + return this.extensionName; + } + + /** + * Set the extension name. + * + * @param extensionName the extensionName value to set + * @return the ExtensionErrorInfo object itself. + */ + public ExtensionErrorInfo withExtensionName(String extensionName) { + this.extensionName = extensionName; + return this; + } + + /** + * Get the extension context. + * + * @return the extensionContext value + */ + public String extensionContext() { + return this.extensionContext; + } + + /** + * Set the extension context. + * + * @param extensionContext the extensionContext value to set + * @return the ExtensionErrorInfo object itself. + */ + public ExtensionErrorInfo withExtensionContext(String extensionContext) { + this.extensionContext = extensionContext; + return this; + } + + /** + * Get the call stack for the error. + * + * @return the callStack value + */ + public String callStack() { + return this.callStack; + } + + /** + * Set the call stack for the error. + * + * @param callStack the callStack value to set + * @return the ExtensionErrorInfo object itself. + */ + public ExtensionErrorInfo withCallStack(String callStack) { + this.callStack = callStack; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ForestSummary.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ForestSummary.java new file mode 100644 index 0000000000000..d779a96cda4bf --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ForestSummary.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ForestSummaryInner; +import java.util.List; + +/** + * Type representing ForestSummary. + */ +public interface ForestSummary extends HasInner, HasManager { + /** + * @return the domainCount value. + */ + Integer domainCount(); + + /** + * @return the domains value. + */ + List domains(); + + /** + * @return the forestName value. + */ + String forestName(); + + /** + * @return the monitoredDcCount value. + */ + Integer monitoredDcCount(); + + /** + * @return the siteCount value. + */ + Integer siteCount(); + + /** + * @return the sites value. + */ + List sites(); + + /** + * @return the totalDcCount value. + */ + Integer totalDcCount(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/GlobalConfiguration.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/GlobalConfiguration.java new file mode 100644 index 0000000000000..8f1bcd1f6213a --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/GlobalConfiguration.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.GlobalConfigurationInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ItemInner; +import java.util.List; + +/** + * Type representing GlobalConfiguration. + */ +public interface GlobalConfiguration extends HasInner, HasManager { + /** + * @return the featureSet value. + */ + List featureSet(); + + /** + * @return the numSavedPwdEvent value. + */ + Integer numSavedPwdEvent(); + + /** + * @return the passwordSyncEnabled value. + */ + Boolean passwordSyncEnabled(); + + /** + * @return the schemaXml value. + */ + String schemaXml(); + + /** + * @return the version value. + */ + Integer version(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/HealthStatus.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/HealthStatus.java new file mode 100644 index 0000000000000..a25dfcd0e2725 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/HealthStatus.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.adhybridhealthservice.v2014_01_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for HealthStatus. + */ +public final class HealthStatus extends ExpandableStringEnum { + /** Static value Healthy for HealthStatus. */ + public static final HealthStatus HEALTHY = fromString("Healthy"); + + /** Static value Warning for HealthStatus. */ + public static final HealthStatus WARNING = fromString("Warning"); + + /** Static value Error for HealthStatus. */ + public static final HealthStatus ERROR = fromString("Error"); + + /** Static value NotMonitored for HealthStatus. */ + public static final HealthStatus NOT_MONITORED = fromString("NotMonitored"); + + /** Static value Missing for HealthStatus. */ + public static final HealthStatus MISSING = fromString("Missing"); + + /** + * Creates or finds a HealthStatus from its string representation. + * @param name a name to look for + * @return the corresponding HealthStatus + */ + @JsonCreator + public static HealthStatus fromString(String name) { + return fromString(name, HealthStatus.class); + } + + /** + * @return known HealthStatus values + */ + public static Collection values() { + return values(HealthStatus.class); + } +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/HelpLink.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/HelpLink.java new file mode 100644 index 0000000000000..c54b86c3136a4 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/HelpLink.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.adhybridhealthservice.v2014_01_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The help link which contains more information related to an alert. + */ +public class HelpLink { + /** + * The title for the link. + */ + @JsonProperty(value = "title") + private String title; + + /** + * The url for the help document. + */ + @JsonProperty(value = "url") + private String url; + + /** + * Get the title for the link. + * + * @return the title value + */ + public String title() { + return this.title; + } + + /** + * Set the title for the link. + * + * @param title the title value to set + * @return the HelpLink object itself. + */ + public HelpLink withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the url for the help document. + * + * @return the url value + */ + public String url() { + return this.url; + } + + /** + * Set the url for the help document. + * + * @param url the url value to set + * @return the HelpLink object itself. + */ + public HelpLink withUrl(String url) { + this.url = url; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Hotfix.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Hotfix.java new file mode 100644 index 0000000000000..4ca1c364373ae --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Hotfix.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.adhybridhealthservice.v2014_01_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The details of the hotfix installed in the server. + */ +public class Hotfix { + /** + * The name of the hotfix KB. + */ + @JsonProperty(value = "kbName") + private String kbName; + + /** + * The link to the KB Article. + */ + @JsonProperty(value = "link") + private String link; + + /** + * The date and time, in UTC, when the KB was installed in the server. + */ + @JsonProperty(value = "installedDate") + private DateTime installedDate; + + /** + * Get the name of the hotfix KB. + * + * @return the kbName value + */ + public String kbName() { + return this.kbName; + } + + /** + * Set the name of the hotfix KB. + * + * @param kbName the kbName value to set + * @return the Hotfix object itself. + */ + public Hotfix withKbName(String kbName) { + this.kbName = kbName; + return this; + } + + /** + * Get the link to the KB Article. + * + * @return the link value + */ + public String link() { + return this.link; + } + + /** + * Set the link to the KB Article. + * + * @param link the link value to set + * @return the Hotfix object itself. + */ + public Hotfix withLink(String link) { + this.link = link; + return this; + } + + /** + * Get the date and time, in UTC, when the KB was installed in the server. + * + * @return the installedDate value + */ + public DateTime installedDate() { + return this.installedDate; + } + + /** + * Set the date and time, in UTC, when the KB was installed in the server. + * + * @param installedDate the installedDate value to set + * @return the Hotfix object itself. + */ + public Hotfix withInstalledDate(DateTime installedDate) { + this.installedDate = installedDate; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Hotfixes.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Hotfixes.java new file mode 100644 index 0000000000000..e7320015567fd --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Hotfixes.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.adhybridhealthservice.v2014_01_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of hotfixes installed in the server. + */ +public class Hotfixes { + /** + * The value returned by the operation. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value returned by the operation. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value returned by the operation. + * + * @param value the value value to set + * @return the Hotfixes object itself. + */ + public Hotfixes withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/IPAddressAggregate.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/IPAddressAggregate.java new file mode 100644 index 0000000000000..57e04f87a5a73 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/IPAddressAggregate.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.IPAddressAggregateInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; + +/** + * Type representing IPAddressAggregate. + */ +public interface IPAddressAggregate extends HasInner, HasManager { + /** + * @return the attemptCountThresholdIsExceeded value. + */ + Boolean attemptCountThresholdIsExceeded(); + + /** + * @return the attemptCountThresholdOnTrigger value. + */ + Integer attemptCountThresholdOnTrigger(); + + /** + * @return the attemptThresholdTypeOnTrigger value. + */ + String attemptThresholdTypeOnTrigger(); + + /** + * @return the badPasswordErrorCount value. + */ + Integer badPasswordErrorCount(); + + /** + * @return the extranetLockoutErrorCount value. + */ + Integer extranetLockoutErrorCount(); + + /** + * @return the firstAuditTimestamp value. + */ + String firstAuditTimestamp(); + + /** + * @return the geographicLocation value. + */ + String geographicLocation(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the ipAddress value. + */ + String ipAddress(); + + /** + * @return the isWhitelistedIpAddress value. + */ + Boolean isWhitelistedIpAddress(); + + /** + * @return the lastAuditTimestamp value. + */ + String lastAuditTimestamp(); + + /** + * @return the networkLocation value. + */ + String networkLocation(); + + /** + * @return the serviceId value. + */ + String serviceId(); + + /** + * @return the tenantId value. + */ + String tenantId(); + + /** + * @return the timeSpan value. + */ + String timeSpan(); + + /** + * @return the timestamp value. + */ + String timestamp(); + + /** + * @return the uniqueUsernamesAttemptedCount value. + */ + Integer uniqueUsernamesAttemptedCount(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/IPAddressAggregateSetting.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/IPAddressAggregateSetting.java new file mode 100644 index 0000000000000..f2a7120bb4c3e --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/IPAddressAggregateSetting.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.IPAddressAggregateSettingInner; + +/** + * Type representing IPAddressAggregateSetting. + */ +public interface IPAddressAggregateSetting extends HasInner, HasManager { + /** + * @return the badPasswordAndExtranetLockoutCombinedDailyThreshold value. + */ + Integer badPasswordAndExtranetLockoutCombinedDailyThreshold(); + + /** + * @return the badPasswordAndExtranetLockoutCombinedHourlyThreshold value. + */ + Integer badPasswordAndExtranetLockoutCombinedHourlyThreshold(); + + /** + * @return the emailNotificationEnabled value. + */ + Boolean emailNotificationEnabled(); + + /** + * @return the extranetLockoutDailyThreshold value. + */ + Integer extranetLockoutDailyThreshold(); + + /** + * @return the extranetLockoutHourlyThreshold value. + */ + Integer extranetLockoutHourlyThreshold(); + + /** + * @return the id value. + */ + String id(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ImportError.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ImportError.java new file mode 100644 index 0000000000000..3a2b4d64838ed --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ImportError.java @@ -0,0 +1,360 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The import error details. + */ +public class ImportError { + /** + * The error Id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The run step result Id. + */ + @JsonProperty(value = "runStepResultId") + private String runStepResultId; + + /** + * The connector Id. + */ + @JsonProperty(value = "connectorId") + private String connectorId; + + /** + * The type of error. + */ + @JsonProperty(value = "type") + private String type; + + /** + * The time when the import error occurred. + */ + @JsonProperty(value = "timeOccurred") + private DateTime timeOccurred; + + /** + * The time when the import error first occurred. + */ + @JsonProperty(value = "timeFirstOccurred") + private DateTime timeFirstOccurred; + + /** + * The retry count. + */ + @JsonProperty(value = "retryCount") + private Integer retryCount; + + /** + * The operation type specific to error reporting. Possible values + * include: 'Undefined', 'Staging', 'ConnectorFilter', 'Join', + * 'Projection', 'ImportFlow', 'Provisioning', 'ValidateConnectorFilter', + * 'Deprovisioning', 'ExportFlow', 'MvDeletion', 'Recall', + * 'MvObjectTypeChange'. + */ + @JsonProperty(value = "algorithmStepType") + private AlgorithmStepType algorithmStepType; + + /** + * The change details that is not re-imported. + */ + @JsonProperty(value = "changeNotReimported") + private ChangeNotReimported changeNotReimported; + + /** + * The extension error information. + */ + @JsonProperty(value = "extensionErrorInfo") + private ExtensionErrorInfo extensionErrorInfo; + + /** + * The error details in legacy rule processing. + */ + @JsonProperty(value = "ruleErrorInfo") + private RuleErrorInfo ruleErrorInfo; + + /** + * The object Id. + */ + @JsonProperty(value = "csObjectId") + private String csObjectId; + + /** + * The distinguished name. + */ + @JsonProperty(value = "dn") + private String dn; + + /** + * Get the error Id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the error Id. + * + * @param id the id value to set + * @return the ImportError object itself. + */ + public ImportError withId(String id) { + this.id = id; + return this; + } + + /** + * Get the run step result Id. + * + * @return the runStepResultId value + */ + public String runStepResultId() { + return this.runStepResultId; + } + + /** + * Set the run step result Id. + * + * @param runStepResultId the runStepResultId value to set + * @return the ImportError object itself. + */ + public ImportError withRunStepResultId(String runStepResultId) { + this.runStepResultId = runStepResultId; + return this; + } + + /** + * Get the connector Id. + * + * @return the connectorId value + */ + public String connectorId() { + return this.connectorId; + } + + /** + * Set the connector Id. + * + * @param connectorId the connectorId value to set + * @return the ImportError object itself. + */ + public ImportError withConnectorId(String connectorId) { + this.connectorId = connectorId; + return this; + } + + /** + * Get the type of error. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type of error. + * + * @param type the type value to set + * @return the ImportError object itself. + */ + public ImportError withType(String type) { + this.type = type; + return this; + } + + /** + * Get the time when the import error occurred. + * + * @return the timeOccurred value + */ + public DateTime timeOccurred() { + return this.timeOccurred; + } + + /** + * Set the time when the import error occurred. + * + * @param timeOccurred the timeOccurred value to set + * @return the ImportError object itself. + */ + public ImportError withTimeOccurred(DateTime timeOccurred) { + this.timeOccurred = timeOccurred; + return this; + } + + /** + * Get the time when the import error first occurred. + * + * @return the timeFirstOccurred value + */ + public DateTime timeFirstOccurred() { + return this.timeFirstOccurred; + } + + /** + * Set the time when the import error first occurred. + * + * @param timeFirstOccurred the timeFirstOccurred value to set + * @return the ImportError object itself. + */ + public ImportError withTimeFirstOccurred(DateTime timeFirstOccurred) { + this.timeFirstOccurred = timeFirstOccurred; + return this; + } + + /** + * Get the retry count. + * + * @return the retryCount value + */ + public Integer retryCount() { + return this.retryCount; + } + + /** + * Set the retry count. + * + * @param retryCount the retryCount value to set + * @return the ImportError object itself. + */ + public ImportError withRetryCount(Integer retryCount) { + this.retryCount = retryCount; + return this; + } + + /** + * Get the operation type specific to error reporting. Possible values include: 'Undefined', 'Staging', 'ConnectorFilter', 'Join', 'Projection', 'ImportFlow', 'Provisioning', 'ValidateConnectorFilter', 'Deprovisioning', 'ExportFlow', 'MvDeletion', 'Recall', 'MvObjectTypeChange'. + * + * @return the algorithmStepType value + */ + public AlgorithmStepType algorithmStepType() { + return this.algorithmStepType; + } + + /** + * Set the operation type specific to error reporting. Possible values include: 'Undefined', 'Staging', 'ConnectorFilter', 'Join', 'Projection', 'ImportFlow', 'Provisioning', 'ValidateConnectorFilter', 'Deprovisioning', 'ExportFlow', 'MvDeletion', 'Recall', 'MvObjectTypeChange'. + * + * @param algorithmStepType the algorithmStepType value to set + * @return the ImportError object itself. + */ + public ImportError withAlgorithmStepType(AlgorithmStepType algorithmStepType) { + this.algorithmStepType = algorithmStepType; + return this; + } + + /** + * Get the change details that is not re-imported. + * + * @return the changeNotReimported value + */ + public ChangeNotReimported changeNotReimported() { + return this.changeNotReimported; + } + + /** + * Set the change details that is not re-imported. + * + * @param changeNotReimported the changeNotReimported value to set + * @return the ImportError object itself. + */ + public ImportError withChangeNotReimported(ChangeNotReimported changeNotReimported) { + this.changeNotReimported = changeNotReimported; + return this; + } + + /** + * Get the extension error information. + * + * @return the extensionErrorInfo value + */ + public ExtensionErrorInfo extensionErrorInfo() { + return this.extensionErrorInfo; + } + + /** + * Set the extension error information. + * + * @param extensionErrorInfo the extensionErrorInfo value to set + * @return the ImportError object itself. + */ + public ImportError withExtensionErrorInfo(ExtensionErrorInfo extensionErrorInfo) { + this.extensionErrorInfo = extensionErrorInfo; + return this; + } + + /** + * Get the error details in legacy rule processing. + * + * @return the ruleErrorInfo value + */ + public RuleErrorInfo ruleErrorInfo() { + return this.ruleErrorInfo; + } + + /** + * Set the error details in legacy rule processing. + * + * @param ruleErrorInfo the ruleErrorInfo value to set + * @return the ImportError object itself. + */ + public ImportError withRuleErrorInfo(RuleErrorInfo ruleErrorInfo) { + this.ruleErrorInfo = ruleErrorInfo; + return this; + } + + /** + * Get the object Id. + * + * @return the csObjectId value + */ + public String csObjectId() { + return this.csObjectId; + } + + /** + * Set the object Id. + * + * @param csObjectId the csObjectId value to set + * @return the ImportError object itself. + */ + public ImportError withCsObjectId(String csObjectId) { + this.csObjectId = csObjectId; + return this; + } + + /** + * Get the distinguished name. + * + * @return the dn value + */ + public String dn() { + return this.dn; + } + + /** + * Set the distinguished name. + * + * @param dn the dn value to set + * @return the ImportError object itself. + */ + public ImportError withDn(String dn) { + this.dn = dn; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ImportErrors.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ImportErrors.java new file mode 100644 index 0000000000000..c1f220d3f7719 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ImportErrors.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.adhybridhealthservice.v2014_01_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of import errors. + */ +public class ImportErrors { + /** + * The value returned by the operation. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value returned by the operation. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value returned by the operation. + * + * @param value the value value to set + * @return the ImportErrors object itself. + */ + public ImportErrors withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/InboundReplicationNeighbor.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/InboundReplicationNeighbor.java new file mode 100644 index 0000000000000..cf653f8938f58 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/InboundReplicationNeighbor.java @@ -0,0 +1,356 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The replication summary for the domain controller inbound neighbor. + */ +public class InboundReplicationNeighbor { + /** + * The name of the source domain controller. + */ + @JsonProperty(value = "sourceDomainController") + private String sourceDomainController; + + /** + * The number of consecutive failure counts. + */ + @JsonProperty(value = "consecutiveFailureCount") + private Integer consecutiveFailureCount; + + /** + * The naming context. + */ + @JsonProperty(value = "namingContext") + private String namingContext; + + /** + * The health status for the domain controller. + */ + @JsonProperty(value = "status") + private Integer status; + + /** + * The last time a sync was attempted on the domain controller. + */ + @JsonProperty(value = "lastAttemptedSync") + private DateTime lastAttemptedSync; + + /** + * The last time when a successful sync happened. + */ + @JsonProperty(value = "lastSuccessfulSync") + private DateTime lastSuccessfulSync; + + /** + * The last error code. + */ + @JsonProperty(value = "lastErrorCode") + private Integer lastErrorCode; + + /** + * The error message of the last error. + */ + @JsonProperty(value = "lastErrorMessage") + private String lastErrorMessage; + + /** + * The error title. + */ + @JsonProperty(value = "errorTitle") + private String errorTitle; + + /** + * The error description. + */ + @JsonProperty(value = "errorDescription") + private String errorDescription; + + /** + * The link for the fix of the error. + */ + @JsonProperty(value = "fixLink") + private String fixLink; + + /** + * The details of the fix. + */ + @JsonProperty(value = "fixDetails") + private String fixDetails; + + /** + * The additional details. + */ + @JsonProperty(value = "additionalInfo") + private String additionalInfo; + + /** + * Get the name of the source domain controller. + * + * @return the sourceDomainController value + */ + public String sourceDomainController() { + return this.sourceDomainController; + } + + /** + * Set the name of the source domain controller. + * + * @param sourceDomainController the sourceDomainController value to set + * @return the InboundReplicationNeighbor object itself. + */ + public InboundReplicationNeighbor withSourceDomainController(String sourceDomainController) { + this.sourceDomainController = sourceDomainController; + return this; + } + + /** + * Get the number of consecutive failure counts. + * + * @return the consecutiveFailureCount value + */ + public Integer consecutiveFailureCount() { + return this.consecutiveFailureCount; + } + + /** + * Set the number of consecutive failure counts. + * + * @param consecutiveFailureCount the consecutiveFailureCount value to set + * @return the InboundReplicationNeighbor object itself. + */ + public InboundReplicationNeighbor withConsecutiveFailureCount(Integer consecutiveFailureCount) { + this.consecutiveFailureCount = consecutiveFailureCount; + return this; + } + + /** + * Get the naming context. + * + * @return the namingContext value + */ + public String namingContext() { + return this.namingContext; + } + + /** + * Set the naming context. + * + * @param namingContext the namingContext value to set + * @return the InboundReplicationNeighbor object itself. + */ + public InboundReplicationNeighbor withNamingContext(String namingContext) { + this.namingContext = namingContext; + return this; + } + + /** + * Get the health status for the domain controller. + * + * @return the status value + */ + public Integer status() { + return this.status; + } + + /** + * Set the health status for the domain controller. + * + * @param status the status value to set + * @return the InboundReplicationNeighbor object itself. + */ + public InboundReplicationNeighbor withStatus(Integer status) { + this.status = status; + return this; + } + + /** + * Get the last time a sync was attempted on the domain controller. + * + * @return the lastAttemptedSync value + */ + public DateTime lastAttemptedSync() { + return this.lastAttemptedSync; + } + + /** + * Set the last time a sync was attempted on the domain controller. + * + * @param lastAttemptedSync the lastAttemptedSync value to set + * @return the InboundReplicationNeighbor object itself. + */ + public InboundReplicationNeighbor withLastAttemptedSync(DateTime lastAttemptedSync) { + this.lastAttemptedSync = lastAttemptedSync; + return this; + } + + /** + * Get the last time when a successful sync happened. + * + * @return the lastSuccessfulSync value + */ + public DateTime lastSuccessfulSync() { + return this.lastSuccessfulSync; + } + + /** + * Set the last time when a successful sync happened. + * + * @param lastSuccessfulSync the lastSuccessfulSync value to set + * @return the InboundReplicationNeighbor object itself. + */ + public InboundReplicationNeighbor withLastSuccessfulSync(DateTime lastSuccessfulSync) { + this.lastSuccessfulSync = lastSuccessfulSync; + return this; + } + + /** + * Get the last error code. + * + * @return the lastErrorCode value + */ + public Integer lastErrorCode() { + return this.lastErrorCode; + } + + /** + * Set the last error code. + * + * @param lastErrorCode the lastErrorCode value to set + * @return the InboundReplicationNeighbor object itself. + */ + public InboundReplicationNeighbor withLastErrorCode(Integer lastErrorCode) { + this.lastErrorCode = lastErrorCode; + return this; + } + + /** + * Get the error message of the last error. + * + * @return the lastErrorMessage value + */ + public String lastErrorMessage() { + return this.lastErrorMessage; + } + + /** + * Set the error message of the last error. + * + * @param lastErrorMessage the lastErrorMessage value to set + * @return the InboundReplicationNeighbor object itself. + */ + public InboundReplicationNeighbor withLastErrorMessage(String lastErrorMessage) { + this.lastErrorMessage = lastErrorMessage; + return this; + } + + /** + * Get the error title. + * + * @return the errorTitle value + */ + public String errorTitle() { + return this.errorTitle; + } + + /** + * Set the error title. + * + * @param errorTitle the errorTitle value to set + * @return the InboundReplicationNeighbor object itself. + */ + public InboundReplicationNeighbor withErrorTitle(String errorTitle) { + this.errorTitle = errorTitle; + return this; + } + + /** + * Get the error description. + * + * @return the errorDescription value + */ + public String errorDescription() { + return this.errorDescription; + } + + /** + * Set the error description. + * + * @param errorDescription the errorDescription value to set + * @return the InboundReplicationNeighbor object itself. + */ + public InboundReplicationNeighbor withErrorDescription(String errorDescription) { + this.errorDescription = errorDescription; + return this; + } + + /** + * Get the link for the fix of the error. + * + * @return the fixLink value + */ + public String fixLink() { + return this.fixLink; + } + + /** + * Set the link for the fix of the error. + * + * @param fixLink the fixLink value to set + * @return the InboundReplicationNeighbor object itself. + */ + public InboundReplicationNeighbor withFixLink(String fixLink) { + this.fixLink = fixLink; + return this; + } + + /** + * Get the details of the fix. + * + * @return the fixDetails value + */ + public String fixDetails() { + return this.fixDetails; + } + + /** + * Set the details of the fix. + * + * @param fixDetails the fixDetails value to set + * @return the InboundReplicationNeighbor object itself. + */ + public InboundReplicationNeighbor withFixDetails(String fixDetails) { + this.fixDetails = fixDetails; + return this; + } + + /** + * Get the additional details. + * + * @return the additionalInfo value + */ + public String additionalInfo() { + return this.additionalInfo; + } + + /** + * Set the additional details. + * + * @param additionalInfo the additionalInfo value to set + * @return the InboundReplicationNeighbor object itself. + */ + public InboundReplicationNeighbor withAdditionalInfo(String additionalInfo) { + this.additionalInfo = additionalInfo; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/InboundReplicationNeighbors.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/InboundReplicationNeighbors.java new file mode 100644 index 0000000000000..98f6626c5db7b --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/InboundReplicationNeighbors.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.adhybridhealthservice.v2014_01_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of replication summary for the domain controller inbound neighbor. + */ +public class InboundReplicationNeighbors { + /** + * The details of inbound replication neighbors. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the details of inbound replication neighbors. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the details of inbound replication neighbors. + * + * @param value the value value to set + * @return the InboundReplicationNeighbors object itself. + */ + public InboundReplicationNeighbors withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Level.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Level.java new file mode 100644 index 0000000000000..c683b360e08fd --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Level.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.adhybridhealthservice.v2014_01_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for Level. + */ +public final class Level extends ExpandableStringEnum { + /** Static value Warning for Level. */ + public static final Level WARNING = fromString("Warning"); + + /** Static value Error for Level. */ + public static final Level ERROR = fromString("Error"); + + /** Static value PreWarning for Level. */ + public static final Level PRE_WARNING = fromString("PreWarning"); + + /** + * Creates or finds a Level from its string representation. + * @param name a name to look for + * @return the corresponding Level + */ + @JsonCreator + public static Level fromString(String name) { + return fromString(name, Level.class); + } + + /** + * @return known Level values + */ + public static Collection values() { + return values(Level.class); + } +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Lists.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Lists.java new file mode 100644 index 0000000000000..ed437d01fae03 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Lists.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.adhybridhealthservice.v2014_01_01; + +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.IPAddressAggregate; + +/** + * Type representing Lists. + */ +public interface Lists { + /** + * Gets the IP address aggregates for a given service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable iPAddressAggregatesByServiceAsync(final String serviceName); + + /** + * Gets the IP address aggregate settings. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable iPAddressAggregateSettingsAsync(String serviceName); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MergedExportError.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MergedExportError.java new file mode 100644 index 0000000000000..8e84f91d222c3 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MergedExportError.java @@ -0,0 +1,132 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.MergedExportErrorInner; +import org.joda.time.DateTime; +import java.util.UUID; + +/** + * Type representing MergedExportError. + */ +public interface MergedExportError extends HasInner, HasManager { + /** + * @return the attributeName value. + */ + String attributeName(); + + /** + * @return the attributeValue value. + */ + String attributeValue(); + + /** + * @return the createdDate value. + */ + DateTime createdDate(); + + /** + * @return the csObjectId value. + */ + String csObjectId(); + + /** + * @return the dn value. + */ + String dn(); + + /** + * @return the existingObject value. + */ + AssociatedObject existingObject(); + + /** + * @return the exportErrorStatus value. + */ + Integer exportErrorStatus(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the incomingObject value. + */ + AssociatedObject incomingObject(); + + /** + * @return the incomingObjectDisplayName value. + */ + String incomingObjectDisplayName(); + + /** + * @return the incomingObjectType value. + */ + String incomingObjectType(); + + /** + * @return the mergedEntityId value. + */ + UUID mergedEntityId(); + + /** + * @return the modifiedOrRemovedAttributeValue value. + */ + String modifiedOrRemovedAttributeValue(); + + /** + * @return the runStepResultId value. + */ + UUID runStepResultId(); + + /** + * @return the samAccountName value. + */ + String samAccountName(); + + /** + * @return the serverErrorDetail value. + */ + String serverErrorDetail(); + + /** + * @return the serviceId value. + */ + UUID serviceId(); + + /** + * @return the serviceMemberId value. + */ + UUID serviceMemberId(); + + /** + * @return the timeFirstOccurred value. + */ + DateTime timeFirstOccurred(); + + /** + * @return the timeOccurred value. + */ + DateTime timeOccurred(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the userPrincipalName value. + */ + String userPrincipalName(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MetricGroup.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MetricGroup.java new file mode 100644 index 0000000000000..12a68ad6e9355 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MetricGroup.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.adhybridhealthservice.v2014_01_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The metric group details. + */ +public class MetricGroup { + /** + * The key for the group. + */ + @JsonProperty(value = "key") + private String key; + + /** + * The display name for the group. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * indicates if the metric group is displayed in Azure Active Directory + * Connect Health UI. + */ + @JsonProperty(value = "invisibleForUi") + private Boolean invisibleForUi; + + /** + * Get the key for the group. + * + * @return the key value + */ + public String key() { + return this.key; + } + + /** + * Set the key for the group. + * + * @param key the key value to set + * @return the MetricGroup object itself. + */ + public MetricGroup withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the display name for the group. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name for the group. + * + * @param displayName the displayName value to set + * @return the MetricGroup object itself. + */ + public MetricGroup withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get indicates if the metric group is displayed in Azure Active Directory Connect Health UI. + * + * @return the invisibleForUi value + */ + public Boolean invisibleForUi() { + return this.invisibleForUi; + } + + /** + * Set indicates if the metric group is displayed in Azure Active Directory Connect Health UI. + * + * @param invisibleForUi the invisibleForUi value to set + * @return the MetricGroup object itself. + */ + public MetricGroup withInvisibleForUi(Boolean invisibleForUi) { + this.invisibleForUi = invisibleForUi; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MetricMetadata.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MetricMetadata.java new file mode 100644 index 0000000000000..8da3d8cb6df25 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MetricMetadata.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.MetricMetadataInner; +import java.util.List; + +/** + * Type representing MetricMetadata. + */ +public interface MetricMetadata extends HasInner, HasManager { + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the groupings value. + */ + List groupings(); + + /** + * @return the isDefault value. + */ + Boolean isDefault(); + + /** + * @return the isDevOps value. + */ + Boolean isDevOps(); + + /** + * @return the isPerfCounter value. + */ + Boolean isPerfCounter(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the maxValue value. + */ + Integer maxValue(); + + /** + * @return the metricName value. + */ + String metricName(); + + /** + * @return the metricsProcessorClassName value. + */ + String metricsProcessorClassName(); + + /** + * @return the minValue value. + */ + Integer minValue(); + + /** + * @return the valueKind value. + */ + String valueKind(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MetricServiceMetricSets.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MetricServiceMetricSets.java new file mode 100644 index 0000000000000..444bd2ff53085 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MetricServiceMetricSets.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.MetricSetsInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import java.util.List; +import org.joda.time.DateTime; + +/** + * Type representing MetricServiceMetricSets. + */ +public interface MetricServiceMetricSets extends HasInner, HasManager { + /** + * @return the sets value. + */ + List sets(); + + /** + * @return the timeStamps value. + */ + List timeStamps(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MetricSet.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MetricSet.java new file mode 100644 index 0000000000000..6c7e091c979d2 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MetricSet.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.adhybridhealthservice.v2014_01_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The set of metric values. Example of a MetricSet are Values of token + * requests for a Server1 or RelyingParty1. + */ +public class MetricSet { + /** + * The name of the set. + */ + @JsonProperty(value = "setName") + private String setName; + + /** + * The list of the metric values. + */ + @JsonProperty(value = "values") + private List values; + + /** + * Get the name of the set. + * + * @return the setName value + */ + public String setName() { + return this.setName; + } + + /** + * Set the name of the set. + * + * @param setName the setName value to set + * @return the MetricSet object itself. + */ + public MetricSet withSetName(String setName) { + this.setName = setName; + return this; + } + + /** + * Get the list of the metric values. + * + * @return the values value + */ + public List values() { + return this.values; + } + + /** + * Set the list of the metric values. + * + * @param values the values value to set + * @return the MetricSet object itself. + */ + public MetricSet withValues(List values) { + this.values = values; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ModuleConfiguration.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ModuleConfiguration.java new file mode 100644 index 0000000000000..756cba5e6a9ee --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ModuleConfiguration.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.adhybridhealthservice.v2014_01_01; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The module configuration as required by the Agent service. + */ +public class ModuleConfiguration { + /** + * The name of agent service. + */ + @JsonProperty(value = "agentService") + private String agentService; + + /** + * The name of the module for which the configuration is applicable. + */ + @JsonProperty(value = "moduleName") + private String moduleName; + + /** + * The key value pairs of properties required for configuration. + */ + @JsonProperty(value = "properties") + private Map properties; + + /** + * Get the name of agent service. + * + * @return the agentService value + */ + public String agentService() { + return this.agentService; + } + + /** + * Set the name of agent service. + * + * @param agentService the agentService value to set + * @return the ModuleConfiguration object itself. + */ + public ModuleConfiguration withAgentService(String agentService) { + this.agentService = agentService; + return this; + } + + /** + * Get the name of the module for which the configuration is applicable. + * + * @return the moduleName value + */ + public String moduleName() { + return this.moduleName; + } + + /** + * Set the name of the module for which the configuration is applicable. + * + * @param moduleName the moduleName value to set + * @return the ModuleConfiguration object itself. + */ + public ModuleConfiguration withModuleName(String moduleName) { + this.moduleName = moduleName; + return this; + } + + /** + * Get the key value pairs of properties required for configuration. + * + * @return the properties value + */ + public Map properties() { + return this.properties; + } + + /** + * Set the key value pairs of properties required for configuration. + * + * @param properties the properties value to set + * @return the ModuleConfiguration object itself. + */ + public ModuleConfiguration withProperties(Map properties) { + this.properties = properties; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ModuleConfigurations.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ModuleConfigurations.java new file mode 100644 index 0000000000000..c479216894415 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ModuleConfigurations.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.adhybridhealthservice.v2014_01_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of module configurations. + */ +public class ModuleConfigurations { + /** + * The value returned by the operation. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value returned by the operation. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value returned by the operation. + * + * @param value the value value to set + * @return the ModuleConfigurations object itself. + */ + public ModuleConfigurations withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MonitoringLevel.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MonitoringLevel.java new file mode 100644 index 0000000000000..dd6a14e6e3262 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/MonitoringLevel.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.adhybridhealthservice.v2014_01_01; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for MonitoringLevel. + */ +public enum MonitoringLevel { + /** Enum value Partial. */ + PARTIAL("Partial"), + + /** Enum value Full. */ + FULL("Full"), + + /** Enum value Off. */ + OFF("Off"); + + /** The actual serialized value for a MonitoringLevel instance. */ + private String value; + + MonitoringLevel(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a MonitoringLevel instance. + * + * @param value the serialized value to parse. + * @return the parsed MonitoringLevel object, or null if unable to parse. + */ + @JsonCreator + public static MonitoringLevel fromString(String value) { + MonitoringLevel[] items = MonitoringLevel.values(); + for (MonitoringLevel item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ObjectWithSyncError.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ObjectWithSyncError.java new file mode 100644 index 0000000000000..61d74ba51e474 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ObjectWithSyncError.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.adhybridhealthservice.v2014_01_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The objects with sync errors. + */ +public class ObjectWithSyncError { + /** + * The source of authority. + */ + @JsonProperty(value = "sourceOfAuthority") + private String sourceOfAuthority; + + /** + * The display name. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * The object type. + */ + @JsonProperty(value = "objectType") + private String objectType; + + /** + * The attribute name. + */ + @JsonProperty(value = "attributeName") + private String attributeName; + + /** + * The attribute value. + */ + @JsonProperty(value = "attributeValue") + private String attributeValue; + + /** + * The modified value. + */ + @JsonProperty(value = "modififedValue") + private String modififedValue; + + /** + * The user principal name. + */ + @JsonProperty(value = "userPrincipalName") + private String userPrincipalName; + + /** + * The object guid. + */ + @JsonProperty(value = "objectGuid") + private String objectGuid; + + /** + * Indicates if the attribute is multi-valued or not. + */ + @JsonProperty(value = "attributeMultiValues") + private Boolean attributeMultiValues; + + /** + * The minimum limit. + */ + @JsonProperty(value = "minLimit") + private String minLimit; + + /** + * The maximum limit. + */ + @JsonProperty(value = "maxLimit") + private String maxLimit; + + /** + * The distinguished name. + */ + @JsonProperty(value = "distinguishedName") + private String distinguishedName; + + /** + * The email. + */ + @JsonProperty(value = "mail") + private String mail; + + /** + * The date and time of occurrence. + */ + @JsonProperty(value = "timeOccured") + private DateTime timeOccured; + + /** + * The error type. + */ + @JsonProperty(value = "errorType") + private String errorType; + + /** + * The source anchor. + */ + @JsonProperty(value = "sourceAnchor") + private String sourceAnchor; + + /** + * Get the source of authority. + * + * @return the sourceOfAuthority value + */ + public String sourceOfAuthority() { + return this.sourceOfAuthority; + } + + /** + * Set the source of authority. + * + * @param sourceOfAuthority the sourceOfAuthority value to set + * @return the ObjectWithSyncError object itself. + */ + public ObjectWithSyncError withSourceOfAuthority(String sourceOfAuthority) { + this.sourceOfAuthority = sourceOfAuthority; + return this; + } + + /** + * Get the display name. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name. + * + * @param displayName the displayName value to set + * @return the ObjectWithSyncError object itself. + */ + public ObjectWithSyncError withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the object type. + * + * @return the objectType value + */ + public String objectType() { + return this.objectType; + } + + /** + * Set the object type. + * + * @param objectType the objectType value to set + * @return the ObjectWithSyncError object itself. + */ + public ObjectWithSyncError withObjectType(String objectType) { + this.objectType = objectType; + return this; + } + + /** + * Get the attribute name. + * + * @return the attributeName value + */ + public String attributeName() { + return this.attributeName; + } + + /** + * Set the attribute name. + * + * @param attributeName the attributeName value to set + * @return the ObjectWithSyncError object itself. + */ + public ObjectWithSyncError withAttributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * Get the attribute value. + * + * @return the attributeValue value + */ + public String attributeValue() { + return this.attributeValue; + } + + /** + * Set the attribute value. + * + * @param attributeValue the attributeValue value to set + * @return the ObjectWithSyncError object itself. + */ + public ObjectWithSyncError withAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * Get the modified value. + * + * @return the modififedValue value + */ + public String modififedValue() { + return this.modififedValue; + } + + /** + * Set the modified value. + * + * @param modififedValue the modififedValue value to set + * @return the ObjectWithSyncError object itself. + */ + public ObjectWithSyncError withModififedValue(String modififedValue) { + this.modififedValue = modififedValue; + return this; + } + + /** + * Get the user principal name. + * + * @return the userPrincipalName value + */ + public String userPrincipalName() { + return this.userPrincipalName; + } + + /** + * Set the user principal name. + * + * @param userPrincipalName the userPrincipalName value to set + * @return the ObjectWithSyncError object itself. + */ + public ObjectWithSyncError withUserPrincipalName(String userPrincipalName) { + this.userPrincipalName = userPrincipalName; + return this; + } + + /** + * Get the object guid. + * + * @return the objectGuid value + */ + public String objectGuid() { + return this.objectGuid; + } + + /** + * Set the object guid. + * + * @param objectGuid the objectGuid value to set + * @return the ObjectWithSyncError object itself. + */ + public ObjectWithSyncError withObjectGuid(String objectGuid) { + this.objectGuid = objectGuid; + return this; + } + + /** + * Get indicates if the attribute is multi-valued or not. + * + * @return the attributeMultiValues value + */ + public Boolean attributeMultiValues() { + return this.attributeMultiValues; + } + + /** + * Set indicates if the attribute is multi-valued or not. + * + * @param attributeMultiValues the attributeMultiValues value to set + * @return the ObjectWithSyncError object itself. + */ + public ObjectWithSyncError withAttributeMultiValues(Boolean attributeMultiValues) { + this.attributeMultiValues = attributeMultiValues; + return this; + } + + /** + * Get the minimum limit. + * + * @return the minLimit value + */ + public String minLimit() { + return this.minLimit; + } + + /** + * Set the minimum limit. + * + * @param minLimit the minLimit value to set + * @return the ObjectWithSyncError object itself. + */ + public ObjectWithSyncError withMinLimit(String minLimit) { + this.minLimit = minLimit; + return this; + } + + /** + * Get the maximum limit. + * + * @return the maxLimit value + */ + public String maxLimit() { + return this.maxLimit; + } + + /** + * Set the maximum limit. + * + * @param maxLimit the maxLimit value to set + * @return the ObjectWithSyncError object itself. + */ + public ObjectWithSyncError withMaxLimit(String maxLimit) { + this.maxLimit = maxLimit; + return this; + } + + /** + * Get the distinguished name. + * + * @return the distinguishedName value + */ + public String distinguishedName() { + return this.distinguishedName; + } + + /** + * Set the distinguished name. + * + * @param distinguishedName the distinguishedName value to set + * @return the ObjectWithSyncError object itself. + */ + public ObjectWithSyncError withDistinguishedName(String distinguishedName) { + this.distinguishedName = distinguishedName; + return this; + } + + /** + * Get the email. + * + * @return the mail value + */ + public String mail() { + return this.mail; + } + + /** + * Set the email. + * + * @param mail the mail value to set + * @return the ObjectWithSyncError object itself. + */ + public ObjectWithSyncError withMail(String mail) { + this.mail = mail; + return this; + } + + /** + * Get the date and time of occurrence. + * + * @return the timeOccured value + */ + public DateTime timeOccured() { + return this.timeOccured; + } + + /** + * Set the date and time of occurrence. + * + * @param timeOccured the timeOccured value to set + * @return the ObjectWithSyncError object itself. + */ + public ObjectWithSyncError withTimeOccured(DateTime timeOccured) { + this.timeOccured = timeOccured; + return this; + } + + /** + * Get the error type. + * + * @return the errorType value + */ + public String errorType() { + return this.errorType; + } + + /** + * Set the error type. + * + * @param errorType the errorType value to set + * @return the ObjectWithSyncError object itself. + */ + public ObjectWithSyncError withErrorType(String errorType) { + this.errorType = errorType; + return this; + } + + /** + * Get the source anchor. + * + * @return the sourceAnchor value + */ + public String sourceAnchor() { + return this.sourceAnchor; + } + + /** + * Set the source anchor. + * + * @param sourceAnchor the sourceAnchor value to set + * @return the ObjectWithSyncError object itself. + */ + public ObjectWithSyncError withSourceAnchor(String sourceAnchor) { + this.sourceAnchor = sourceAnchor; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Operation.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Operation.java new file mode 100644 index 0000000000000..de0a2f6d334cf --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Operation.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.OperationInner; + +/** + * Type representing Operation. + */ +public interface Operation extends HasInner, HasManager { + /** + * @return the display value. + */ + Object display(); + + /** + * @return the name value. + */ + String name(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Operations.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Operations.java new file mode 100644 index 0000000000000..198c2e1de3da0 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Operations.java @@ -0,0 +1,27 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * Lists the available Azure Data Factory API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Partition.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Partition.java new file mode 100644 index 0000000000000..2fcc8d75de148 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Partition.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.adhybridhealthservice.v2014_01_01; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the partition in Synchronization service. + */ +public class Partition { + /** + * The partition Id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The distinguished name for the partition. + */ + @JsonProperty(value = "dn") + private String dn; + + /** + * Indicates if the partition object is selected or not. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * The date and time when the partition is created. + */ + @JsonProperty(value = "timeCreated") + private DateTime timeCreated; + + /** + * The time and date when the partition was last modified. + */ + @JsonProperty(value = "timeLastModified") + private DateTime timeLastModified; + + /** + * The scope of the partition. + */ + @JsonProperty(value = "partitionScope") + private PartitionScope partitionScope; + + /** + * The name of the partition. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Indicates if the partition is a domain or not. + */ + @JsonProperty(value = "isDomain") + private Boolean isDomain; + + /** + * The partition type. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the partition Id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the partition Id. + * + * @param id the id value to set + * @return the Partition object itself. + */ + public Partition withId(String id) { + this.id = id; + return this; + } + + /** + * Get the distinguished name for the partition. + * + * @return the dn value + */ + public String dn() { + return this.dn; + } + + /** + * Set the distinguished name for the partition. + * + * @param dn the dn value to set + * @return the Partition object itself. + */ + public Partition withDn(String dn) { + this.dn = dn; + return this; + } + + /** + * Get indicates if the partition object is selected or not. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set indicates if the partition object is selected or not. + * + * @param enabled the enabled value to set + * @return the Partition object itself. + */ + public Partition withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the date and time when the partition is created. + * + * @return the timeCreated value + */ + public DateTime timeCreated() { + return this.timeCreated; + } + + /** + * Set the date and time when the partition is created. + * + * @param timeCreated the timeCreated value to set + * @return the Partition object itself. + */ + public Partition withTimeCreated(DateTime timeCreated) { + this.timeCreated = timeCreated; + return this; + } + + /** + * Get the time and date when the partition was last modified. + * + * @return the timeLastModified value + */ + public DateTime timeLastModified() { + return this.timeLastModified; + } + + /** + * Set the time and date when the partition was last modified. + * + * @param timeLastModified the timeLastModified value to set + * @return the Partition object itself. + */ + public Partition withTimeLastModified(DateTime timeLastModified) { + this.timeLastModified = timeLastModified; + return this; + } + + /** + * Get the scope of the partition. + * + * @return the partitionScope value + */ + public PartitionScope partitionScope() { + return this.partitionScope; + } + + /** + * Set the scope of the partition. + * + * @param partitionScope the partitionScope value to set + * @return the Partition object itself. + */ + public Partition withPartitionScope(PartitionScope partitionScope) { + this.partitionScope = partitionScope; + return this; + } + + /** + * Get the name of the partition. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the partition. + * + * @param name the name value to set + * @return the Partition object itself. + */ + public Partition withName(String name) { + this.name = name; + return this; + } + + /** + * Get indicates if the partition is a domain or not. + * + * @return the isDomain value + */ + public Boolean isDomain() { + return this.isDomain; + } + + /** + * Set indicates if the partition is a domain or not. + * + * @param isDomain the isDomain value to set + * @return the Partition object itself. + */ + public Partition withIsDomain(Boolean isDomain) { + this.isDomain = isDomain; + return this; + } + + /** + * Get the partition type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the partition type. + * + * @param type the type value to set + * @return the Partition object itself. + */ + public Partition withType(String type) { + this.type = type; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/PartitionScope.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/PartitionScope.java new file mode 100644 index 0000000000000..1cd2b16a87b82 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/PartitionScope.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.adhybridhealthservice.v2014_01_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The connector partition scope. + */ +public class PartitionScope { + /** + * Indicates if the partition scope is default or not. + */ + @JsonProperty(value = "isDefault") + private Boolean isDefault; + + /** + * The in-scope object classes. + */ + @JsonProperty(value = "objectClasses") + private List objectClasses; + + /** + * The list of containers included. + */ + @JsonProperty(value = "containersIncluded") + private List containersIncluded; + + /** + * The list of containers excluded. + */ + @JsonProperty(value = "containersExcluded") + private List containersExcluded; + + /** + * Get indicates if the partition scope is default or not. + * + * @return the isDefault value + */ + public Boolean isDefault() { + return this.isDefault; + } + + /** + * Set indicates if the partition scope is default or not. + * + * @param isDefault the isDefault value to set + * @return the PartitionScope object itself. + */ + public PartitionScope withIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get the in-scope object classes. + * + * @return the objectClasses value + */ + public List objectClasses() { + return this.objectClasses; + } + + /** + * Set the in-scope object classes. + * + * @param objectClasses the objectClasses value to set + * @return the PartitionScope object itself. + */ + public PartitionScope withObjectClasses(List objectClasses) { + this.objectClasses = objectClasses; + return this; + } + + /** + * Get the list of containers included. + * + * @return the containersIncluded value + */ + public List containersIncluded() { + return this.containersIncluded; + } + + /** + * Set the list of containers included. + * + * @param containersIncluded the containersIncluded value to set + * @return the PartitionScope object itself. + */ + public PartitionScope withContainersIncluded(List containersIncluded) { + this.containersIncluded = containersIncluded; + return this; + } + + /** + * Get the list of containers excluded. + * + * @return the containersExcluded value + */ + public List containersExcluded() { + return this.containersExcluded; + } + + /** + * Set the list of containers excluded. + * + * @param containersExcluded the containersExcluded value to set + * @return the PartitionScope object itself. + */ + public PartitionScope withContainersExcluded(List containersExcluded) { + this.containersExcluded = containersExcluded; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/PasswordHashSyncConfiguration.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/PasswordHashSyncConfiguration.java new file mode 100644 index 0000000000000..b7c19f3654c62 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/PasswordHashSyncConfiguration.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.adhybridhealthservice.v2014_01_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The password has synchronization configuration settings. + */ +public class PasswordHashSyncConfiguration { + /** + * Indicates if the password hash synchronization configuration settings is + * enabled. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * The target. + */ + @JsonProperty(value = "target") + private String target; + + /** + * Get indicates if the password hash synchronization configuration settings is enabled. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set indicates if the password hash synchronization configuration settings is enabled. + * + * @param enabled the enabled value to set + * @return the PasswordHashSyncConfiguration object itself. + */ + public PasswordHashSyncConfiguration withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the target. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Set the target. + * + * @param target the target value to set + * @return the PasswordHashSyncConfiguration object itself. + */ + public PasswordHashSyncConfiguration withTarget(String target) { + this.target = target; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/PasswordManagementSettings.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/PasswordManagementSettings.java new file mode 100644 index 0000000000000..bf7bda6b4a6bd --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/PasswordManagementSettings.java @@ -0,0 +1,278 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The password management settings. + */ +public class PasswordManagementSettings { + /** + * Indicates if the password extension is enabled. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * The file path of the password management extension. + */ + @JsonProperty(value = "extensionFilePath") + private String extensionFilePath; + + /** + * Connection point of password management. + */ + @JsonProperty(value = "connectTo") + private String connectTo; + + /** + * Connection timeout for password extension. + */ + @JsonProperty(value = "connectionTimeout") + private Integer connectionTimeout; + + /** + * User to execute password extension. + */ + @JsonProperty(value = "user") + private String user; + + /** + * The supported password operations. Possible values include: 'Undefined', + * 'Set', 'Change'. + */ + @JsonProperty(value = "supportedPasswordOperations") + private PasswordOperationTypes supportedPasswordOperations; + + /** + * The maximum number of retries. + */ + @JsonProperty(value = "maximumRetryCount") + private Integer maximumRetryCount; + + /** + * The time between retries. + */ + @JsonProperty(value = "retryIntervalInSeconds") + private Integer retryIntervalInSeconds; + + /** + * Indicates if a secure connection is required for password management. + */ + @JsonProperty(value = "requiresSecureConnection") + private Boolean requiresSecureConnection; + + /** + * Indicates if accounts should be unlocked when resetting password. + */ + @JsonProperty(value = "unlockAccount") + private Boolean unlockAccount; + + /** + * Get indicates if the password extension is enabled. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set indicates if the password extension is enabled. + * + * @param enabled the enabled value to set + * @return the PasswordManagementSettings object itself. + */ + public PasswordManagementSettings withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the file path of the password management extension. + * + * @return the extensionFilePath value + */ + public String extensionFilePath() { + return this.extensionFilePath; + } + + /** + * Set the file path of the password management extension. + * + * @param extensionFilePath the extensionFilePath value to set + * @return the PasswordManagementSettings object itself. + */ + public PasswordManagementSettings withExtensionFilePath(String extensionFilePath) { + this.extensionFilePath = extensionFilePath; + return this; + } + + /** + * Get connection point of password management. + * + * @return the connectTo value + */ + public String connectTo() { + return this.connectTo; + } + + /** + * Set connection point of password management. + * + * @param connectTo the connectTo value to set + * @return the PasswordManagementSettings object itself. + */ + public PasswordManagementSettings withConnectTo(String connectTo) { + this.connectTo = connectTo; + return this; + } + + /** + * Get connection timeout for password extension. + * + * @return the connectionTimeout value + */ + public Integer connectionTimeout() { + return this.connectionTimeout; + } + + /** + * Set connection timeout for password extension. + * + * @param connectionTimeout the connectionTimeout value to set + * @return the PasswordManagementSettings object itself. + */ + public PasswordManagementSettings withConnectionTimeout(Integer connectionTimeout) { + this.connectionTimeout = connectionTimeout; + return this; + } + + /** + * Get user to execute password extension. + * + * @return the user value + */ + public String user() { + return this.user; + } + + /** + * Set user to execute password extension. + * + * @param user the user value to set + * @return the PasswordManagementSettings object itself. + */ + public PasswordManagementSettings withUser(String user) { + this.user = user; + return this; + } + + /** + * Get the supported password operations. Possible values include: 'Undefined', 'Set', 'Change'. + * + * @return the supportedPasswordOperations value + */ + public PasswordOperationTypes supportedPasswordOperations() { + return this.supportedPasswordOperations; + } + + /** + * Set the supported password operations. Possible values include: 'Undefined', 'Set', 'Change'. + * + * @param supportedPasswordOperations the supportedPasswordOperations value to set + * @return the PasswordManagementSettings object itself. + */ + public PasswordManagementSettings withSupportedPasswordOperations(PasswordOperationTypes supportedPasswordOperations) { + this.supportedPasswordOperations = supportedPasswordOperations; + return this; + } + + /** + * Get the maximum number of retries. + * + * @return the maximumRetryCount value + */ + public Integer maximumRetryCount() { + return this.maximumRetryCount; + } + + /** + * Set the maximum number of retries. + * + * @param maximumRetryCount the maximumRetryCount value to set + * @return the PasswordManagementSettings object itself. + */ + public PasswordManagementSettings withMaximumRetryCount(Integer maximumRetryCount) { + this.maximumRetryCount = maximumRetryCount; + return this; + } + + /** + * Get the time between retries. + * + * @return the retryIntervalInSeconds value + */ + public Integer retryIntervalInSeconds() { + return this.retryIntervalInSeconds; + } + + /** + * Set the time between retries. + * + * @param retryIntervalInSeconds the retryIntervalInSeconds value to set + * @return the PasswordManagementSettings object itself. + */ + public PasswordManagementSettings withRetryIntervalInSeconds(Integer retryIntervalInSeconds) { + this.retryIntervalInSeconds = retryIntervalInSeconds; + return this; + } + + /** + * Get indicates if a secure connection is required for password management. + * + * @return the requiresSecureConnection value + */ + public Boolean requiresSecureConnection() { + return this.requiresSecureConnection; + } + + /** + * Set indicates if a secure connection is required for password management. + * + * @param requiresSecureConnection the requiresSecureConnection value to set + * @return the PasswordManagementSettings object itself. + */ + public PasswordManagementSettings withRequiresSecureConnection(Boolean requiresSecureConnection) { + this.requiresSecureConnection = requiresSecureConnection; + return this; + } + + /** + * Get indicates if accounts should be unlocked when resetting password. + * + * @return the unlockAccount value + */ + public Boolean unlockAccount() { + return this.unlockAccount; + } + + /** + * Set indicates if accounts should be unlocked when resetting password. + * + * @param unlockAccount the unlockAccount value to set + * @return the PasswordManagementSettings object itself. + */ + public PasswordManagementSettings withUnlockAccount(Boolean unlockAccount) { + this.unlockAccount = unlockAccount; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/PasswordOperationTypes.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/PasswordOperationTypes.java new file mode 100644 index 0000000000000..1aa1d64616259 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/PasswordOperationTypes.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.adhybridhealthservice.v2014_01_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PasswordOperationTypes. + */ +public final class PasswordOperationTypes extends ExpandableStringEnum { + /** Static value Undefined for PasswordOperationTypes. */ + public static final PasswordOperationTypes UNDEFINED = fromString("Undefined"); + + /** Static value Set for PasswordOperationTypes. */ + public static final PasswordOperationTypes SET = fromString("Set"); + + /** Static value Change for PasswordOperationTypes. */ + public static final PasswordOperationTypes CHANGE = fromString("Change"); + + /** + * Creates or finds a PasswordOperationTypes from its string representation. + * @param name a name to look for + * @return the corresponding PasswordOperationTypes + */ + @JsonCreator + public static PasswordOperationTypes fromString(String name) { + return fromString(name, PasswordOperationTypes.class); + } + + /** + * @return known PasswordOperationTypes values + */ + public static Collection values() { + return values(PasswordOperationTypes.class); + } +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ReplicationStatus.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ReplicationStatus.java new file mode 100644 index 0000000000000..05848b8ee3a61 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ReplicationStatus.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ReplicationStatusInner; + +/** + * Type representing ReplicationStatus. + */ +public interface ReplicationStatus extends HasInner, HasManager { + /** + * @return the errorDcCount value. + */ + Integer errorDcCount(); + + /** + * @return the forestName value. + */ + String forestName(); + + /** + * @return the totalDcCount value. + */ + Integer totalDcCount(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ReplicationSummary.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ReplicationSummary.java new file mode 100644 index 0000000000000..26e7976683910 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ReplicationSummary.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ReplicationSummaryInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import java.util.List; +import org.joda.time.DateTime; + +/** + * Type representing ReplicationSummary. + */ +public interface ReplicationSummary extends HasInner, HasManager { + /** + * @return the domain value. + */ + String domain(); + + /** + * @return the inboundNeighborCollection value. + */ + List inboundNeighborCollection(); + + /** + * @return the lastAttemptedSync value. + */ + DateTime lastAttemptedSync(); + + /** + * @return the lastSuccessfulSync value. + */ + DateTime lastSuccessfulSync(); + + /** + * @return the site value. + */ + String site(); + + /** + * @return the status value. + */ + Integer status(); + + /** + * @return the targetServer value. + */ + String targetServer(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Reports.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Reports.java new file mode 100644 index 0000000000000..46338fe7be1a1 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Reports.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.adhybridhealthservice.v2014_01_01; + +import rx.Observable; + +/** + * Type representing Reports. + */ +public interface Reports { + /** + * Checks if the user is enabled for Dev Ops access. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getDevOpsAsync(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Result.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Result.java new file mode 100644 index 0000000000000..94231870b821b --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Result.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ResultInner; + +/** + * Type representing Result. + */ +public interface Result extends HasInner, HasManager { + /** + * @return the value value. + */ + Boolean value(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/RiskyIPBlobUri.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/RiskyIPBlobUri.java new file mode 100644 index 0000000000000..df9ce30fbbb79 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/RiskyIPBlobUri.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.RiskyIPBlobUriInner; +import org.joda.time.DateTime; + +/** + * Type representing RiskyIPBlobUri. + */ +public interface RiskyIPBlobUri extends HasInner, HasManager { + /** + * @return the blobCreateDateTime value. + */ + DateTime blobCreateDateTime(); + + /** + * @return the jobCompletionTime value. + */ + DateTime jobCompletionTime(); + + /** + * @return the resultSasUri value. + */ + String resultSasUri(); + + /** + * @return the serviceId value. + */ + String serviceId(); + + /** + * @return the status value. + */ + String status(); + + /** + * @return the tenantId value. + */ + String tenantId(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/RuleErrorInfo.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/RuleErrorInfo.java new file mode 100644 index 0000000000000..88577168d7502 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/RuleErrorInfo.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.adhybridhealthservice.v2014_01_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The error details in legacy rule processing. + */ +public class RuleErrorInfo { + /** + * The attribute mapping details. + */ + @JsonProperty(value = "attributeMapping") + private AttributeMapping attributeMapping; + + /** + * The connector Id. + */ + @JsonProperty(value = "connectorId") + private String connectorId; + + /** + * The connector name. + */ + @JsonProperty(value = "connectorName") + private String connectorName; + + /** + * The object Id. + */ + @JsonProperty(value = "csObjectId") + private String csObjectId; + + /** + * The distinguished name. + */ + @JsonProperty(value = "dn") + private String dn; + + /** + * Get the attribute mapping details. + * + * @return the attributeMapping value + */ + public AttributeMapping attributeMapping() { + return this.attributeMapping; + } + + /** + * Set the attribute mapping details. + * + * @param attributeMapping the attributeMapping value to set + * @return the RuleErrorInfo object itself. + */ + public RuleErrorInfo withAttributeMapping(AttributeMapping attributeMapping) { + this.attributeMapping = attributeMapping; + return this; + } + + /** + * Get the connector Id. + * + * @return the connectorId value + */ + public String connectorId() { + return this.connectorId; + } + + /** + * Set the connector Id. + * + * @param connectorId the connectorId value to set + * @return the RuleErrorInfo object itself. + */ + public RuleErrorInfo withConnectorId(String connectorId) { + this.connectorId = connectorId; + return this; + } + + /** + * Get the connector name. + * + * @return the connectorName value + */ + public String connectorName() { + return this.connectorName; + } + + /** + * Set the connector name. + * + * @param connectorName the connectorName value to set + * @return the RuleErrorInfo object itself. + */ + public RuleErrorInfo withConnectorName(String connectorName) { + this.connectorName = connectorName; + return this; + } + + /** + * Get the object Id. + * + * @return the csObjectId value + */ + public String csObjectId() { + return this.csObjectId; + } + + /** + * Set the object Id. + * + * @param csObjectId the csObjectId value to set + * @return the RuleErrorInfo object itself. + */ + public RuleErrorInfo withCsObjectId(String csObjectId) { + this.csObjectId = csObjectId; + return this; + } + + /** + * Get the distinguished name. + * + * @return the dn value + */ + public String dn() { + return this.dn; + } + + /** + * Set the distinguished name. + * + * @param dn the dn value to set + * @return the RuleErrorInfo object itself. + */ + public RuleErrorInfo withDn(String dn) { + this.dn = dn; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/RunProfile.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/RunProfile.java new file mode 100644 index 0000000000000..c76d416b57452 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/RunProfile.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.adhybridhealthservice.v2014_01_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the run profile. + */ +public class RunProfile { + /** + * The run profile Id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The run profile name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The run steps of the run profile. + */ + @JsonProperty(value = "runSteps") + private List runSteps; + + /** + * Get the run profile Id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the run profile Id. + * + * @param id the id value to set + * @return the RunProfile object itself. + */ + public RunProfile withId(String id) { + this.id = id; + return this; + } + + /** + * Get the run profile name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the run profile name. + * + * @param name the name value to set + * @return the RunProfile object itself. + */ + public RunProfile withName(String name) { + this.name = name; + return this; + } + + /** + * Get the run steps of the run profile. + * + * @return the runSteps value + */ + public List runSteps() { + return this.runSteps; + } + + /** + * Set the run steps of the run profile. + * + * @param runSteps the runSteps value to set + * @return the RunProfile object itself. + */ + public RunProfile withRunSteps(List runSteps) { + this.runSteps = runSteps; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/RunProfiles.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/RunProfiles.java new file mode 100644 index 0000000000000..1fb2157cffb61 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/RunProfiles.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.adhybridhealthservice.v2014_01_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of run profiles. + */ +public class RunProfiles { + /** + * The value returned by the operation. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value returned by the operation. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value returned by the operation. + * + * @param value the value value to set + * @return the RunProfiles object itself. + */ + public RunProfiles withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/RunStep.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/RunStep.java new file mode 100644 index 0000000000000..5fb865eaad137 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/RunStep.java @@ -0,0 +1,199 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The run step for a run profile. + */ +public class RunStep { + /** + * The batch size used by the run step. + */ + @JsonProperty(value = "batchSize") + private Integer batchSize; + + /** + * The object processing limit. + */ + @JsonProperty(value = "objectProcessLimit") + private Integer objectProcessLimit; + + /** + * The object deletion limit. + */ + @JsonProperty(value = "objectDeleteLimit") + private Integer objectDeleteLimit; + + /** + * The page size of the run step. + */ + @JsonProperty(value = "pageSize") + private Integer pageSize; + + /** + * The Id of the partition that a current run step operation is executing. + */ + @JsonProperty(value = "partitionId") + private String partitionId; + + /** + * The run step operation types. + */ + @JsonProperty(value = "operationType") + private Integer operationType; + + /** + * The operation timeout. + */ + @JsonProperty(value = "timeout") + private Integer timeout; + + /** + * Get the batch size used by the run step. + * + * @return the batchSize value + */ + public Integer batchSize() { + return this.batchSize; + } + + /** + * Set the batch size used by the run step. + * + * @param batchSize the batchSize value to set + * @return the RunStep object itself. + */ + public RunStep withBatchSize(Integer batchSize) { + this.batchSize = batchSize; + return this; + } + + /** + * Get the object processing limit. + * + * @return the objectProcessLimit value + */ + public Integer objectProcessLimit() { + return this.objectProcessLimit; + } + + /** + * Set the object processing limit. + * + * @param objectProcessLimit the objectProcessLimit value to set + * @return the RunStep object itself. + */ + public RunStep withObjectProcessLimit(Integer objectProcessLimit) { + this.objectProcessLimit = objectProcessLimit; + return this; + } + + /** + * Get the object deletion limit. + * + * @return the objectDeleteLimit value + */ + public Integer objectDeleteLimit() { + return this.objectDeleteLimit; + } + + /** + * Set the object deletion limit. + * + * @param objectDeleteLimit the objectDeleteLimit value to set + * @return the RunStep object itself. + */ + public RunStep withObjectDeleteLimit(Integer objectDeleteLimit) { + this.objectDeleteLimit = objectDeleteLimit; + return this; + } + + /** + * Get the page size of the run step. + * + * @return the pageSize value + */ + public Integer pageSize() { + return this.pageSize; + } + + /** + * Set the page size of the run step. + * + * @param pageSize the pageSize value to set + * @return the RunStep object itself. + */ + public RunStep withPageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Get the Id of the partition that a current run step operation is executing. + * + * @return the partitionId value + */ + public String partitionId() { + return this.partitionId; + } + + /** + * Set the Id of the partition that a current run step operation is executing. + * + * @param partitionId the partitionId value to set + * @return the RunStep object itself. + */ + public RunStep withPartitionId(String partitionId) { + this.partitionId = partitionId; + return this; + } + + /** + * Get the run step operation types. + * + * @return the operationType value + */ + public Integer operationType() { + return this.operationType; + } + + /** + * Set the run step operation types. + * + * @param operationType the operationType value to set + * @return the RunStep object itself. + */ + public RunStep withOperationType(Integer operationType) { + this.operationType = operationType; + return this; + } + + /** + * Get the operation timeout. + * + * @return the timeout value + */ + public Integer timeout() { + return this.timeout; + } + + /** + * Set the operation timeout. + * + * @param timeout the timeout value to set + * @return the RunStep object itself. + */ + public RunStep withTimeout(Integer timeout) { + this.timeout = timeout; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceAlert.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceAlert.java new file mode 100644 index 0000000000000..f807de30cb83e --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceAlert.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.AlertInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import java.util.List; +import java.util.UUID; +import org.joda.time.DateTime; + +/** + * Type representing ServiceAlert. + */ +public interface ServiceAlert extends HasInner, HasManager { + /** + * @return the activeAlertProperties value. + */ + List activeAlertProperties(); + + /** + * @return the additionalInformation value. + */ + List additionalInformation(); + + /** + * @return the alertId value. + */ + UUID alertId(); + + /** + * @return the createdDate value. + */ + DateTime createdDate(); + + /** + * @return the description value. + */ + String description(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the lastUpdated value. + */ + DateTime lastUpdated(); + + /** + * @return the level value. + */ + Level level(); + + /** + * @return the monitorRoleType value. + */ + String monitorRoleType(); + + /** + * @return the relatedLinks value. + */ + List relatedLinks(); + + /** + * @return the remediation value. + */ + String remediation(); + + /** + * @return the resolvedAlertProperties value. + */ + List resolvedAlertProperties(); + + /** + * @return the resolvedDate value. + */ + DateTime resolvedDate(); + + /** + * @return the scope value. + */ + String scope(); + + /** + * @return the serviceId value. + */ + UUID serviceId(); + + /** + * @return the serviceMemberId value. + */ + UUID serviceMemberId(); + + /** + * @return the shortName value. + */ + String shortName(); + + /** + * @return the state value. + */ + State state(); + + /** + * @return the tenantId value. + */ + UUID tenantId(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceConfiguration.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceConfiguration.java new file mode 100644 index 0000000000000..dc94ddb173e72 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceConfiguration.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ServiceConfigurationInner; + +/** + * Type representing ServiceConfiguration. + */ +public interface ServiceConfiguration extends HasInner, HasManager { + /** + * @return the serviceAccount value. + */ + String serviceAccount(); + + /** + * @return the serviceType value. + */ + Integer serviceType(); + + /** + * @return the sqlDatabaseName value. + */ + String sqlDatabaseName(); + + /** + * @return the sqlDatabaseSize value. + */ + Integer sqlDatabaseSize(); + + /** + * @return the sqlEdition value. + */ + String sqlEdition(); + + /** + * @return the sqlInstance value. + */ + String sqlInstance(); + + /** + * @return the sqlServer value. + */ + String sqlServer(); + + /** + * @return the sqlVersion value. + */ + String sqlVersion(); + + /** + * @return the version value. + */ + String version(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceCredential.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceCredential.java new file mode 100644 index 0000000000000..d272c50ce71cb --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceCredential.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.CredentialInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import java.util.List; + +/** + * Type representing ServiceCredential. + */ +public interface ServiceCredential extends HasInner, HasManager { + /** + * @return the credentialData value. + */ + List credentialData(); + + /** + * @return the identifier value. + */ + String identifier(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceExportStatus.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceExportStatus.java new file mode 100644 index 0000000000000..2bd21b4f6bf96 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceExportStatus.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ExportStatusInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import org.joda.time.DateTime; +import java.util.UUID; + +/** + * Type representing ServiceExportStatus. + */ +public interface ServiceExportStatus extends HasInner, HasManager { + /** + * @return the endTime value. + */ + DateTime endTime(); + + /** + * @return the runStepResultId value. + */ + String runStepResultId(); + + /** + * @return the serviceId value. + */ + UUID serviceId(); + + /** + * @return the serviceMemberId value. + */ + UUID serviceMemberId(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceItem.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceItem.java new file mode 100644 index 0000000000000..ebddbe3583e25 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceItem.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ItemInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; + +/** + * Type representing ServiceItem. + */ +public interface ServiceItem extends HasInner, HasManager { + /** + * @return the key value. + */ + String keyVal(); + + /** + * @return the value value. + */ + String value(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceMembers.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceMembers.java new file mode 100644 index 0000000000000..40dd742ac6a42 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceMembers.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.adhybridhealthservice.v2014_01_01; + +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceServiceMember; +import rx.Completable; +import java.util.UUID; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ServiceMemberInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServicememberServiceAlert; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Connector; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceCredential; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServicememberServiceItem; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServicememberServiceExportStatus; + +/** + * Type representing ServiceMembers. + */ +public interface ServiceMembers { + /** + * Gets the details of a server, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String serviceName, UUID serviceMemberId); + + /** + * Gets the details of the servers, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String serviceName); + + /** + * Deletes a server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String serviceName, UUID serviceMemberId); + + /** + * Deletes the data uploaded by the server to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteDataAsync(String serviceName, UUID serviceMemberId); + + /** + * Gets the global configuration. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listGlobalConfigurationAsync(String serviceName, String serviceMemberId); + + /** + * Gets the service configuration. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getServiceConfigurationAsync(String serviceName, String serviceMemberId); + + /** + * Onboards a server, for a given service, to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service under which the server is to be onboarded. + * @param serviceMember The server object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable addAsync(String serviceName, ServiceMemberInner serviceMember); + + /** + * Gets the details of an alert for a given service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAlertsAsync(final UUID serviceMemberId, final String serviceName); + + /** + * Gets the connector details for a service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listConnectorsAsync(String serviceName, UUID serviceMemberId); + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listCredentialsAsync(String serviceName, UUID serviceMemberId); + + /** + * Gets the last time when the server uploaded data to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listDataFreshnessAsync(String serviceName, UUID serviceMemberId); + + /** + * Gets the export status. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listExportStatusAsync(final String serviceName, final UUID serviceMemberId); + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param serviceMemberId The server id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getMetricsAsync(String serviceName, String metricName, String groupName, UUID serviceMemberId); + + /** + * Gets the list of connectors and run profile names. + * + * @param serviceName The name of the service. + * @param serviceMemberId The service member id. + * @param metricName The name of the metric. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getConnectorMetadataAsync(String serviceName, UUID serviceMemberId, String metricName); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceProperties.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceProperties.java new file mode 100644 index 0000000000000..64db591c0bca2 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceProperties.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ServicePropertiesInner; +import org.joda.time.DateTime; +import java.util.List; + +/** + * Type representing ServiceProperties. + */ +public interface ServiceProperties extends HasInner, HasManager { + /** + * @return the activeAlerts value. + */ + Integer activeAlerts(); + + /** + * @return the additionalInformation value. + */ + String additionalInformation(); + + /** + * @return the createdDate value. + */ + DateTime createdDate(); + + /** + * @return the customNotificationEmails value. + */ + List customNotificationEmails(); + + /** + * @return the disabled value. + */ + Boolean disabled(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the health value. + */ + String health(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the lastDisabled value. + */ + DateTime lastDisabled(); + + /** + * @return the lastUpdated value. + */ + DateTime lastUpdated(); + + /** + * @return the monitoringConfigurationsComputed value. + */ + Object monitoringConfigurationsComputed(); + + /** + * @return the monitoringConfigurationsCustomized value. + */ + Object monitoringConfigurationsCustomized(); + + /** + * @return the notificationEmailEnabled value. + */ + Boolean notificationEmailEnabled(); + + /** + * @return the notificationEmailEnabledForGlobalAdmins value. + */ + Boolean notificationEmailEnabledForGlobalAdmins(); + + /** + * @return the notificationEmails value. + */ + List notificationEmails(); + + /** + * @return the notificationEmailsEnabledForGlobalAdmins value. + */ + Boolean notificationEmailsEnabledForGlobalAdmins(); + + /** + * @return the originalDisabledState value. + */ + Boolean originalDisabledState(); + + /** + * @return the resolvedAlerts value. + */ + Integer resolvedAlerts(); + + /** + * @return the serviceId value. + */ + String serviceId(); + + /** + * @return the serviceName value. + */ + String serviceName(); + + /** + * @return the signature value. + */ + String signature(); + + /** + * @return the simpleProperties value. + */ + Object simpleProperties(); + + /** + * @return the tenantId value. + */ + String tenantId(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceServiceMember.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceServiceMember.java new file mode 100644 index 0000000000000..99a71e046282e --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServiceServiceMember.java @@ -0,0 +1,151 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ServiceMemberInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import org.joda.time.DateTime; + +/** + * Type representing ServiceServiceMember. + */ +public interface ServiceServiceMember extends HasInner, HasManager { + /** + * @return the activeAlerts value. + */ + Integer activeAlerts(); + + /** + * @return the additionalInformation value. + */ + String additionalInformation(); + + /** + * @return the createdDate value. + */ + DateTime createdDate(); + + /** + * @return the dimensions value. + */ + Object dimensions(); + + /** + * @return the disabled value. + */ + Boolean disabled(); + + /** + * @return the disabledReason value. + */ + Integer disabledReason(); + + /** + * @return the installedQfes value. + */ + Object installedQfes(); + + /** + * @return the lastDisabled value. + */ + DateTime lastDisabled(); + + /** + * @return the lastReboot value. + */ + DateTime lastReboot(); + + /** + * @return the lastServerReportedMonitoringLevelChange value. + */ + DateTime lastServerReportedMonitoringLevelChange(); + + /** + * @return the lastUpdated value. + */ + DateTime lastUpdated(); + + /** + * @return the machineId value. + */ + String machineId(); + + /** + * @return the machineName value. + */ + String machineName(); + + /** + * @return the monitoringConfigurationsComputed value. + */ + Object monitoringConfigurationsComputed(); + + /** + * @return the monitoringConfigurationsCustomized value. + */ + Object monitoringConfigurationsCustomized(); + + /** + * @return the osName value. + */ + String osName(); + + /** + * @return the osVersion value. + */ + String osVersion(); + + /** + * @return the properties value. + */ + Object properties(); + + /** + * @return the recommendedQfes value. + */ + Object recommendedQfes(); + + /** + * @return the resolvedAlerts value. + */ + Integer resolvedAlerts(); + + /** + * @return the role value. + */ + String role(); + + /** + * @return the serverReportedMonitoringLevel value. + */ + MonitoringLevel serverReportedMonitoringLevel(); + + /** + * @return the serviceId value. + */ + String serviceId(); + + /** + * @return the serviceMemberId value. + */ + String serviceMemberId(); + + /** + * @return the status value. + */ + String status(); + + /** + * @return the tenantId value. + */ + String tenantId(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServicememberAddsserviceAlert.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServicememberAddsserviceAlert.java new file mode 100644 index 0000000000000..e4b7d1036baec --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServicememberAddsserviceAlert.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.AlertInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import java.util.List; +import java.util.UUID; +import org.joda.time.DateTime; + +/** + * Type representing ServicememberAddsserviceAlert. + */ +public interface ServicememberAddsserviceAlert extends HasInner, HasManager { + /** + * @return the activeAlertProperties value. + */ + List activeAlertProperties(); + + /** + * @return the additionalInformation value. + */ + List additionalInformation(); + + /** + * @return the alertId value. + */ + UUID alertId(); + + /** + * @return the createdDate value. + */ + DateTime createdDate(); + + /** + * @return the description value. + */ + String description(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the lastUpdated value. + */ + DateTime lastUpdated(); + + /** + * @return the level value. + */ + Level level(); + + /** + * @return the monitorRoleType value. + */ + String monitorRoleType(); + + /** + * @return the relatedLinks value. + */ + List relatedLinks(); + + /** + * @return the remediation value. + */ + String remediation(); + + /** + * @return the resolvedAlertProperties value. + */ + List resolvedAlertProperties(); + + /** + * @return the resolvedDate value. + */ + DateTime resolvedDate(); + + /** + * @return the scope value. + */ + String scope(); + + /** + * @return the serviceId value. + */ + UUID serviceId(); + + /** + * @return the serviceMemberId value. + */ + UUID serviceMemberId(); + + /** + * @return the shortName value. + */ + String shortName(); + + /** + * @return the state value. + */ + State state(); + + /** + * @return the tenantId value. + */ + UUID tenantId(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServicememberServiceAlert.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServicememberServiceAlert.java new file mode 100644 index 0000000000000..8df963c6280f0 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServicememberServiceAlert.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.AlertInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import java.util.List; +import java.util.UUID; +import org.joda.time.DateTime; + +/** + * Type representing ServicememberServiceAlert. + */ +public interface ServicememberServiceAlert extends HasInner, HasManager { + /** + * @return the activeAlertProperties value. + */ + List activeAlertProperties(); + + /** + * @return the additionalInformation value. + */ + List additionalInformation(); + + /** + * @return the alertId value. + */ + UUID alertId(); + + /** + * @return the createdDate value. + */ + DateTime createdDate(); + + /** + * @return the description value. + */ + String description(); + + /** + * @return the displayName value. + */ + String displayName(); + + /** + * @return the lastUpdated value. + */ + DateTime lastUpdated(); + + /** + * @return the level value. + */ + Level level(); + + /** + * @return the monitorRoleType value. + */ + String monitorRoleType(); + + /** + * @return the relatedLinks value. + */ + List relatedLinks(); + + /** + * @return the remediation value. + */ + String remediation(); + + /** + * @return the resolvedAlertProperties value. + */ + List resolvedAlertProperties(); + + /** + * @return the resolvedDate value. + */ + DateTime resolvedDate(); + + /** + * @return the scope value. + */ + String scope(); + + /** + * @return the serviceId value. + */ + UUID serviceId(); + + /** + * @return the serviceMemberId value. + */ + UUID serviceMemberId(); + + /** + * @return the shortName value. + */ + String shortName(); + + /** + * @return the state value. + */ + State state(); + + /** + * @return the tenantId value. + */ + UUID tenantId(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServicememberServiceExportStatus.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServicememberServiceExportStatus.java new file mode 100644 index 0000000000000..5f6386b96a68b --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServicememberServiceExportStatus.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ExportStatusInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import org.joda.time.DateTime; +import java.util.UUID; + +/** + * Type representing ServicememberServiceExportStatus. + */ +public interface ServicememberServiceExportStatus extends HasInner, HasManager { + /** + * @return the endTime value. + */ + DateTime endTime(); + + /** + * @return the runStepResultId value. + */ + String runStepResultId(); + + /** + * @return the serviceId value. + */ + UUID serviceId(); + + /** + * @return the serviceMemberId value. + */ + UUID serviceMemberId(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServicememberServiceItem.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServicememberServiceItem.java new file mode 100644 index 0000000000000..16682cd755d0a --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServicememberServiceItem.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ItemInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; + +/** + * Type representing ServicememberServiceItem. + */ +public interface ServicememberServiceItem extends HasInner, HasManager { + /** + * @return the key value. + */ + String keyVal(); + + /** + * @return the value value. + */ + String value(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServicememberServiceMetricSets.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServicememberServiceMetricSets.java new file mode 100644 index 0000000000000..8f5380ce90ec3 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ServicememberServiceMetricSets.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.MetricSetsInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import java.util.List; +import org.joda.time.DateTime; + +/** + * Type representing ServicememberServiceMetricSets. + */ +public interface ServicememberServiceMetricSets extends HasInner, HasManager { + /** + * @return the sets value. + */ + List sets(); + + /** + * @return the timeStamps value. + */ + List timeStamps(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Services.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Services.java new file mode 100644 index 0000000000000..701deca34e3cf --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Services.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.adhybridhealthservice.v2014_01_01; + +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceItem; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceExportStatus; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceAlert; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.AlertFeedbackInner; +import rx.Completable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ServicePropertiesInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ItemInner; + +/** + * Type representing Services. + */ +public interface Services { + /** + * Gets the service level monitoring configurations. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listMonitoringConfigurationsAsync(String serviceName); + + /** + * Gets the export status. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listExportStatusAsync(final String serviceName); + + /** + * Gets the alerts for a given service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAlertsAsync(final String serviceName); + + /** + * Adds an alert feedback submitted by customer. + * + * @param serviceName The name of the service. + * @param alertFeedback The alert feedback. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable addAlertFeedbackAsync(String serviceName, AlertFeedbackInner alertFeedback); + + /** + * Gets a list of all alert feedback for a given tenant and alert type. + * + * @param serviceName The name of the service. + * @param shortName The name of the alert. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAlertFeedbackAsync(String serviceName, String shortName); + + /** + * Gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listPremiumAsync(); + + /** + * Gets the details of a service for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String serviceName); + + /** + * Deletes a service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String serviceName); + + /** + * Updates the service properties of an onboarded service. + * + * @param serviceName The name of the service which needs to be deleted. + * @param service The service object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable updateAsync(String serviceName, ServicePropertiesInner service); + + /** + * Checks if the service has all the pre-requisites met to use a feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getFeatureAvailibilityAsync(String serviceName, String featureName); + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listMetricMetadataAsync(final String serviceName); + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getMetricMetadataAsync(String serviceName, String metricName); + + /** + * Updates the service level monitoring configuration. + * + * @param serviceName The name of the service. + * @param configurationSetting The monitoring configuration to update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable updateMonitoringConfigurationAsync(String serviceName, ItemInner configurationSetting); + + /** + * Checks if the tenant, to which a service is registered, is whitelisted to use a feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getTenantWhitelistingAsync(String serviceName, String featureName); + + /** + * Gets the details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + + /** + * Onboards a service for a given tenant in Azure Active Directory Connect Health. + * + * @param service The service object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable addAsync(ServicePropertiesInner service); + + /** + * Gets the count of latest AAD export errors. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listExportErrorsAsync(String serviceName); + + /** + * Gets the categorized export errors. + * + * @param serviceName The name of the service. + * @param errorBucket The error category to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listExportErrorsV2Async(String serviceName, String errorBucket); + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getMetricsAsync(String serviceName, String metricName, String groupName); + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listMetricsAverageAsync(final String serviceName, final String metricName, final String groupName); + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listMetricsSumAsync(final String serviceName, final String metricName, final String groupName); + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getMetricMetadataForGroupAsync(String serviceName, String metricName, String groupName); + + /** + * Gets the bad password login attempt report for an user. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listUserBadPasswordReportAsync(String serviceName); + + /** + * Gets all Risky IP report URIs for the last 7 days. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAllRiskyIpDownloadReportAsync(String serviceName); + + /** + * Initiate the generation of a new Risky IP report. Returns the URI for the new one. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listCurrentRiskyIpDownloadReportAsync(String serviceName); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/State.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/State.java new file mode 100644 index 0000000000000..2348cb47a7730 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/State.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.adhybridhealthservice.v2014_01_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for State. + */ +public final class State extends ExpandableStringEnum { + /** Static value Active for State. */ + public static final State ACTIVE = fromString("Active"); + + /** Static value ResolvedByPositiveResult for State. */ + public static final State RESOLVED_BY_POSITIVE_RESULT = fromString("ResolvedByPositiveResult"); + + /** Static value ResolvedManually for State. */ + public static final State RESOLVED_MANUALLY = fromString("ResolvedManually"); + + /** Static value ResolvedByTimer for State. */ + public static final State RESOLVED_BY_TIMER = fromString("ResolvedByTimer"); + + /** Static value ResolvedByStateChange for State. */ + public static final State RESOLVED_BY_STATE_CHANGE = fromString("ResolvedByStateChange"); + + /** + * Creates or finds a State from its string representation. + * @param name a name to look for + * @return the corresponding State + */ + @JsonCreator + public static State fromString(String name) { + return fromString(name, State.class); + } + + /** + * @return known State values + */ + public static Collection values() { + return values(State.class); + } +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/TabularExportError.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/TabularExportError.java new file mode 100644 index 0000000000000..dedea8c3b22b4 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/TabularExportError.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.adhybridhealthservice.v2014_01_01; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The details for export error. + */ +public class TabularExportError { + /** + * The service Id. + */ + @JsonProperty(value = "serviceId") + private UUID serviceId; + + /** + * The server Id. + */ + @JsonProperty(value = "serviceMemberId") + private UUID serviceMemberId; + + /** + * The merged entity Id. + */ + @JsonProperty(value = "mergedEntityId") + private UUID mergedEntityId; + + /** + * The export error data. + */ + @JsonProperty(value = "tabularExportErrorData") + private String tabularExportErrorData; + + /** + * Get the service Id. + * + * @return the serviceId value + */ + public UUID serviceId() { + return this.serviceId; + } + + /** + * Set the service Id. + * + * @param serviceId the serviceId value to set + * @return the TabularExportError object itself. + */ + public TabularExportError withServiceId(UUID serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * Get the server Id. + * + * @return the serviceMemberId value + */ + public UUID serviceMemberId() { + return this.serviceMemberId; + } + + /** + * Set the server Id. + * + * @param serviceMemberId the serviceMemberId value to set + * @return the TabularExportError object itself. + */ + public TabularExportError withServiceMemberId(UUID serviceMemberId) { + this.serviceMemberId = serviceMemberId; + return this; + } + + /** + * Get the merged entity Id. + * + * @return the mergedEntityId value + */ + public UUID mergedEntityId() { + return this.mergedEntityId; + } + + /** + * Set the merged entity Id. + * + * @param mergedEntityId the mergedEntityId value to set + * @return the TabularExportError object itself. + */ + public TabularExportError withMergedEntityId(UUID mergedEntityId) { + this.mergedEntityId = mergedEntityId; + return this; + } + + /** + * Get the export error data. + * + * @return the tabularExportErrorData value + */ + public String tabularExportErrorData() { + return this.tabularExportErrorData; + } + + /** + * Set the export error data. + * + * @param tabularExportErrorData the tabularExportErrorData value to set + * @return the TabularExportError object itself. + */ + public TabularExportError withTabularExportErrorData(String tabularExportErrorData) { + this.tabularExportErrorData = tabularExportErrorData; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Tenant.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Tenant.java new file mode 100644 index 0000000000000..99487866cce3b --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Tenant.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.TenantInner; +import org.joda.time.DateTime; +import java.util.List; + +/** + * Type representing Tenant. + */ +public interface Tenant extends HasInner, HasManager { + /** + * @return the aadLicense value. + */ + String aadLicense(); + + /** + * @return the aadPremium value. + */ + Boolean aadPremium(); + + /** + * @return the agentAutoUpdate value. + */ + Boolean agentAutoUpdate(); + + /** + * @return the alertSuppressionTimeInMins value. + */ + Integer alertSuppressionTimeInMins(); + + /** + * @return the consentedToMicrosoftDevOps value. + */ + Boolean consentedToMicrosoftDevOps(); + + /** + * @return the countryLetterCode value. + */ + String countryLetterCode(); + + /** + * @return the createdDate value. + */ + DateTime createdDate(); + + /** + * @return the devOpsTtl value. + */ + DateTime devOpsTtl(); + + /** + * @return the disabled value. + */ + Boolean disabled(); + + /** + * @return the disabledReason value. + */ + Integer disabledReason(); + + /** + * @return the globalAdminsEmail value. + */ + List globalAdminsEmail(); + + /** + * @return the initialDomain value. + */ + String initialDomain(); + + /** + * @return the lastDisabled value. + */ + DateTime lastDisabled(); + + /** + * @return the lastVerified value. + */ + DateTime lastVerified(); + + /** + * @return the onboarded value. + */ + Boolean onboarded(); + + /** + * @return the onboardingAllowed value. + */ + Boolean onboardingAllowed(); + + /** + * @return the pksCertificate value. + */ + Object pksCertificate(); + + /** + * @return the privatePreviewTenant value. + */ + Boolean privatePreviewTenant(); + + /** + * @return the tenantId value. + */ + String tenantId(); + + /** + * @return the tenantInQuarantine value. + */ + Boolean tenantInQuarantine(); + + /** + * @return the tenantName value. + */ + String tenantName(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/TenantOnboardingDetails.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/TenantOnboardingDetails.java new file mode 100644 index 0000000000000..513ad1bf6c932 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/TenantOnboardingDetails.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.adhybridhealthservice.v2014_01_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The tenant onboarding details. + */ +public class TenantOnboardingDetails { + /** + * Indicates if the tenant is onboarded to Azure Active Directory Connect + * Health or not. + */ + @JsonProperty(value = "tenantOnboarded") + private Boolean tenantOnboarded; + + /** + * The display url, to help tenant navigate or onboard to Azure Active + * Directory Connect Health blade, based on tenant onboarding status. + */ + @JsonProperty(value = "onboardingDisplayUrl") + private String onboardingDisplayUrl; + + /** + * Get indicates if the tenant is onboarded to Azure Active Directory Connect Health or not. + * + * @return the tenantOnboarded value + */ + public Boolean tenantOnboarded() { + return this.tenantOnboarded; + } + + /** + * Set indicates if the tenant is onboarded to Azure Active Directory Connect Health or not. + * + * @param tenantOnboarded the tenantOnboarded value to set + * @return the TenantOnboardingDetails object itself. + */ + public TenantOnboardingDetails withTenantOnboarded(Boolean tenantOnboarded) { + this.tenantOnboarded = tenantOnboarded; + return this; + } + + /** + * Get the display url, to help tenant navigate or onboard to Azure Active Directory Connect Health blade, based on tenant onboarding status. + * + * @return the onboardingDisplayUrl value + */ + public String onboardingDisplayUrl() { + return this.onboardingDisplayUrl; + } + + /** + * Set the display url, to help tenant navigate or onboard to Azure Active Directory Connect Health blade, based on tenant onboarding status. + * + * @param onboardingDisplayUrl the onboardingDisplayUrl value to set + * @return the TenantOnboardingDetails object itself. + */ + public TenantOnboardingDetails withOnboardingDisplayUrl(String onboardingDisplayUrl) { + this.onboardingDisplayUrl = onboardingDisplayUrl; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Updates.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Updates.java new file mode 100644 index 0000000000000..c2a60e5590c59 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/Updates.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.adhybridhealthservice.v2014_01_01; + +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.IPAddressAggregateSettingInner; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.UpdatesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Updates. + */ +public interface Updates extends HasInner { + /** + * Updates the IP address aggregate settings alert thresholds. + * + * @param serviceName The name of the service. + * @param iPAddressAggregateSetting The IP address aggregate setting object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable iPAddressAggregateSettingsAsync(String serviceName, IPAddressAggregateSettingInner iPAddressAggregateSetting); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/UserPreference.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/UserPreference.java new file mode 100644 index 0000000000000..4787d743ea067 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/UserPreference.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.adhybridhealthservice.v2014_01_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.ADHybridHealthServiceManager; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation.UserPreferenceInner; +import java.util.List; + +/** + * Type representing UserPreference. + */ +public interface UserPreference extends HasInner, HasManager { + /** + * @return the metricNames value. + */ + List metricNames(); + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ValueDelta.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ValueDelta.java new file mode 100644 index 0000000000000..ac94b41ed3157 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ValueDelta.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.adhybridhealthservice.v2014_01_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The value of the delta. + */ +public class ValueDelta { + /** + * The operation type. Possible values include: 'Undefined', 'Add', + * 'Update', 'Delete'. + */ + @JsonProperty(value = "operationType") + private ValueDeltaOperationType operationType; + + /** + * The value of the delta. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the operation type. Possible values include: 'Undefined', 'Add', 'Update', 'Delete'. + * + * @return the operationType value + */ + public ValueDeltaOperationType operationType() { + return this.operationType; + } + + /** + * Set the operation type. Possible values include: 'Undefined', 'Add', 'Update', 'Delete'. + * + * @param operationType the operationType value to set + * @return the ValueDelta object itself. + */ + public ValueDelta withOperationType(ValueDeltaOperationType operationType) { + this.operationType = operationType; + return this; + } + + /** + * Get the value of the delta. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the value of the delta. + * + * @param value the value value to set + * @return the ValueDelta object itself. + */ + public ValueDelta withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ValueDeltaOperationType.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ValueDeltaOperationType.java new file mode 100644 index 0000000000000..8fa8834ad667e --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ValueDeltaOperationType.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.adhybridhealthservice.v2014_01_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ValueDeltaOperationType. + */ +public final class ValueDeltaOperationType extends ExpandableStringEnum { + /** Static value Undefined for ValueDeltaOperationType. */ + public static final ValueDeltaOperationType UNDEFINED = fromString("Undefined"); + + /** Static value Add for ValueDeltaOperationType. */ + public static final ValueDeltaOperationType ADD = fromString("Add"); + + /** Static value Update for ValueDeltaOperationType. */ + public static final ValueDeltaOperationType UPDATE = fromString("Update"); + + /** Static value Delete for ValueDeltaOperationType. */ + public static final ValueDeltaOperationType DELETE = fromString("Delete"); + + /** + * Creates or finds a ValueDeltaOperationType from its string representation. + * @param name a name to look for + * @return the corresponding ValueDeltaOperationType + */ + @JsonCreator + public static ValueDeltaOperationType fromString(String name) { + return fromString(name, ValueDeltaOperationType.class); + } + + /** + * @return known ValueDeltaOperationType values + */ + public static Collection values() { + return values(ValueDeltaOperationType.class); + } +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ValueType.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ValueType.java new file mode 100644 index 0000000000000..6bea3c2049b90 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/ValueType.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.adhybridhealthservice.v2014_01_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ValueType. + */ +public final class ValueType extends ExpandableStringEnum { + /** Static value Undefined for ValueType. */ + public static final ValueType UNDEFINED = fromString("Undefined"); + + /** Static value Dn for ValueType. */ + public static final ValueType DN = fromString("Dn"); + + /** Static value Binary for ValueType. */ + public static final ValueType BINARY = fromString("Binary"); + + /** Static value String for ValueType. */ + public static final ValueType STRING = fromString("String"); + + /** Static value Integer for ValueType. */ + public static final ValueType INTEGER = fromString("Integer"); + + /** Static value Boolean for ValueType. */ + public static final ValueType BOOLEAN = fromString("Boolean"); + + /** + * Creates or finds a ValueType from its string representation. + * @param name a name to look for + * @return the corresponding ValueType + */ + @JsonCreator + public static ValueType fromString(String name) { + return fromString(name, ValueType.class); + } + + /** + * @return known ValueType values + */ + public static Collection values() { + return values(ValueType.class); + } +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ADHybridHealthServiceImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ADHybridHealthServiceImpl.java new file mode 100644 index 0000000000000..8a74f90438784 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ADHybridHealthServiceImpl.java @@ -0,0 +1,369 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the ADHybridHealthServiceImpl class. + */ +public class ADHybridHealthServiceImpl extends AzureServiceClient { + /** 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; + } + + /** The version of the API to be used with the client request. */ + private String apiVersion; + + /** + * Gets The version of the API to be used with the client request. + * + * @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 ADHybridHealthServiceImpl 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 ADHybridHealthServiceImpl 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 ADHybridHealthServiceImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The AddsServicesInner object to access its operations. + */ + private AddsServicesInner addsServices; + + /** + * Gets the AddsServicesInner object to access its operations. + * @return the AddsServicesInner object. + */ + public AddsServicesInner addsServices() { + return this.addsServices; + } + + /** + * The AlertsInner object to access its operations. + */ + private AlertsInner alerts; + + /** + * Gets the AlertsInner object to access its operations. + * @return the AlertsInner object. + */ + public AlertsInner alerts() { + return this.alerts; + } + + /** + * The ConfigurationsInner object to access its operations. + */ + private ConfigurationsInner configurations; + + /** + * Gets the ConfigurationsInner object to access its operations. + * @return the ConfigurationsInner object. + */ + public ConfigurationsInner configurations() { + return this.configurations; + } + + /** + * The DimensionsInner object to access its operations. + */ + private DimensionsInner dimensions; + + /** + * Gets the DimensionsInner object to access its operations. + * @return the DimensionsInner object. + */ + public DimensionsInner dimensions() { + return this.dimensions; + } + + /** + * The AddsServiceMembersInner object to access its operations. + */ + private AddsServiceMembersInner addsServiceMembers; + + /** + * Gets the AddsServiceMembersInner object to access its operations. + * @return the AddsServiceMembersInner object. + */ + public AddsServiceMembersInner addsServiceMembers() { + return this.addsServiceMembers; + } + + /** + * The AdDomainServiceMembersInner object to access its operations. + */ + private AdDomainServiceMembersInner adDomainServiceMembers; + + /** + * Gets the AdDomainServiceMembersInner object to access its operations. + * @return the AdDomainServiceMembersInner object. + */ + public AdDomainServiceMembersInner adDomainServiceMembers() { + return this.adDomainServiceMembers; + } + + /** + * The AddsServicesUserPreferencesInner object to access its operations. + */ + private AddsServicesUserPreferencesInner addsServicesUserPreferences; + + /** + * Gets the AddsServicesUserPreferencesInner object to access its operations. + * @return the AddsServicesUserPreferencesInner object. + */ + public AddsServicesUserPreferencesInner addsServicesUserPreferences() { + return this.addsServicesUserPreferences; + } + + /** + * The AddsServicesReplicationStatusInner object to access its operations. + */ + private AddsServicesReplicationStatusInner addsServicesReplicationStatus; + + /** + * Gets the AddsServicesReplicationStatusInner object to access its operations. + * @return the AddsServicesReplicationStatusInner object. + */ + public AddsServicesReplicationStatusInner addsServicesReplicationStatus() { + return this.addsServicesReplicationStatus; + } + + /** + * The AddsServicesServiceMembersInner object to access its operations. + */ + private AddsServicesServiceMembersInner addsServicesServiceMembers; + + /** + * Gets the AddsServicesServiceMembersInner object to access its operations. + * @return the AddsServicesServiceMembersInner object. + */ + public AddsServicesServiceMembersInner addsServicesServiceMembers() { + return this.addsServicesServiceMembers; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + + /** + * The ReportsInner object to access its operations. + */ + private ReportsInner reports; + + /** + * Gets the ReportsInner object to access its operations. + * @return the ReportsInner object. + */ + public ReportsInner reports() { + return this.reports; + } + + /** + * The ServicesInner object to access its operations. + */ + private ServicesInner services; + + /** + * Gets the ServicesInner object to access its operations. + * @return the ServicesInner object. + */ + public ServicesInner services() { + return this.services; + } + + /** + * The ServiceMembersInner object to access its operations. + */ + private ServiceMembersInner serviceMembers; + + /** + * Gets the ServiceMembersInner object to access its operations. + * @return the ServiceMembersInner object. + */ + public ServiceMembersInner serviceMembers() { + return this.serviceMembers; + } + + /** + * The ListsInner object to access its operations. + */ + private ListsInner lists; + + /** + * Gets the ListsInner object to access its operations. + * @return the ListsInner object. + */ + public ListsInner lists() { + return this.lists; + } + + /** + * The UpdatesInner object to access its operations. + */ + private UpdatesInner updates; + + /** + * Gets the UpdatesInner object to access its operations. + * @return the UpdatesInner object. + */ + public UpdatesInner updates() { + return this.updates; + } + + /** + * Initializes an instance of ADHybridHealthService client. + * + * @param credentials the management credentials for Azure + */ + public ADHybridHealthServiceImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of ADHybridHealthService client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public ADHybridHealthServiceImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of ADHybridHealthService client. + * + * @param restClient the REST client to connect to Azure. + */ + public ADHybridHealthServiceImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2014-01-01"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.addsServices = new AddsServicesInner(restClient().retrofit(), this); + this.alerts = new AlertsInner(restClient().retrofit(), this); + this.configurations = new ConfigurationsInner(restClient().retrofit(), this); + this.dimensions = new DimensionsInner(restClient().retrofit(), this); + this.addsServiceMembers = new AddsServiceMembersInner(restClient().retrofit(), this); + this.adDomainServiceMembers = new AdDomainServiceMembersInner(restClient().retrofit(), this); + this.addsServicesUserPreferences = new AddsServicesUserPreferencesInner(restClient().retrofit(), this); + this.addsServicesReplicationStatus = new AddsServicesReplicationStatusInner(restClient().retrofit(), this); + this.addsServicesServiceMembers = new AddsServicesServiceMembersInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.reports = new ReportsInner(restClient().retrofit(), this); + this.services = new ServicesInner(restClient().retrofit(), this); + this.serviceMembers = new ServiceMembersInner(restClient().retrofit(), this); + this.lists = new ListsInner(restClient().retrofit(), this); + this.updates = new UpdatesInner(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + } + + /** + * 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(), "ADHybridHealthService", "2014-01-01"); + } +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ADHybridHealthServiceManager.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ADHybridHealthServiceManager.java new file mode 100644 index 0000000000000..70541ac73954f --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ADHybridHealthServiceManager.java @@ -0,0 +1,264 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_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.adhybridhealthservice.v2014_01_01.AddsServices; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Alerts; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Configurations; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Dimensions; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServiceMembers; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AdDomainServiceMembers; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServicesUserPreferences; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServicesReplicationStatus; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServicesServiceMembers; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Operations; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Reports; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Lists; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Updates; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure ADHybridHealthService resource management. + */ +public final class ADHybridHealthServiceManager extends ManagerCore { + private AddsServices addsServices; + private Alerts alerts; + private Configurations configurations; + private Dimensions dimensions; + private AddsServiceMembers addsServiceMembers; + private AdDomainServiceMembers adDomainServiceMembers; + private AddsServicesUserPreferences addsServicesUserPreferences; + private AddsServicesReplicationStatus addsServicesReplicationStatus; + private AddsServicesServiceMembers addsServicesServiceMembers; + private Operations operations; + private Reports reports; + private Services services; + private ServiceMembers serviceMembers; + private Lists lists; + private Updates updates; + /** + * Get a Configurable instance that can be used to create ADHybridHealthServiceManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new ADHybridHealthServiceManager.ConfigurableImpl(); + } + /** + * Creates an instance of ADHybridHealthServiceManager that exposes ADHybridHealthService resource management API entry points. + * + * @param credentials the credentials to use + * @return the ADHybridHealthServiceManager + */ + public static ADHybridHealthServiceManager authenticate(AzureTokenCredentials credentials) { + return new ADHybridHealthServiceManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build()); + } + /** + * Creates an instance of ADHybridHealthServiceManager that exposes ADHybridHealthService resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @return the ADHybridHealthServiceManager + */ + public static ADHybridHealthServiceManager authenticate(RestClient restClient) { + return new ADHybridHealthServiceManager(restClient); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of ADHybridHealthServiceManager that exposes ADHybridHealthService management API entry points. + * + * @param credentials the credentials to use + * @return the interface exposing ADHybridHealthService management API entry points that work across subscriptions + */ + ADHybridHealthServiceManager authenticate(AzureTokenCredentials credentials); + } + + /** + * @return Entry point to manage AddsServices. + */ + public AddsServices addsServices() { + if (this.addsServices == null) { + this.addsServices = new AddsServicesImpl(this); + } + return this.addsServices; + } + + /** + * @return Entry point to manage Alerts. + */ + public Alerts alerts() { + if (this.alerts == null) { + this.alerts = new AlertsImpl(this); + } + return this.alerts; + } + + /** + * @return Entry point to manage Configurations. + */ + public Configurations configurations() { + if (this.configurations == null) { + this.configurations = new ConfigurationsImpl(this); + } + return this.configurations; + } + + /** + * @return Entry point to manage Dimensions. + */ + public Dimensions dimensions() { + if (this.dimensions == null) { + this.dimensions = new DimensionsImpl(this); + } + return this.dimensions; + } + + /** + * @return Entry point to manage AddsServiceMembers. + */ + public AddsServiceMembers addsServiceMembers() { + if (this.addsServiceMembers == null) { + this.addsServiceMembers = new AddsServiceMembersImpl(this); + } + return this.addsServiceMembers; + } + + /** + * @return Entry point to manage AdDomainServiceMembers. + */ + public AdDomainServiceMembers adDomainServiceMembers() { + if (this.adDomainServiceMembers == null) { + this.adDomainServiceMembers = new AdDomainServiceMembersImpl(this); + } + return this.adDomainServiceMembers; + } + + /** + * @return Entry point to manage AddsServicesUserPreferences. + */ + public AddsServicesUserPreferences addsServicesUserPreferences() { + if (this.addsServicesUserPreferences == null) { + this.addsServicesUserPreferences = new AddsServicesUserPreferencesImpl(this); + } + return this.addsServicesUserPreferences; + } + + /** + * @return Entry point to manage AddsServicesReplicationStatus. + */ + public AddsServicesReplicationStatus addsServicesReplicationStatus() { + if (this.addsServicesReplicationStatus == null) { + this.addsServicesReplicationStatus = new AddsServicesReplicationStatusImpl(this); + } + return this.addsServicesReplicationStatus; + } + + /** + * @return Entry point to manage AddsServicesServiceMembers. + */ + public AddsServicesServiceMembers addsServicesServiceMembers() { + if (this.addsServicesServiceMembers == null) { + this.addsServicesServiceMembers = new AddsServicesServiceMembersImpl(this); + } + return this.addsServicesServiceMembers; + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * @return Entry point to manage Reports. + */ + public Reports reports() { + if (this.reports == null) { + this.reports = new ReportsImpl(this); + } + return this.reports; + } + + /** + * @return Entry point to manage Services. + */ + public Services services() { + if (this.services == null) { + this.services = new ServicesImpl(this); + } + return this.services; + } + + /** + * @return Entry point to manage ServiceMembers. + */ + public ServiceMembers serviceMembers() { + if (this.serviceMembers == null) { + this.serviceMembers = new ServiceMembersImpl(this); + } + return this.serviceMembers; + } + + /** + * @return Entry point to manage Lists. + */ + public Lists lists() { + if (this.lists == null) { + this.lists = new ListsImpl(this); + } + return this.lists; + } + + /** + * @return Entry point to manage Updates. + */ + public Updates updates() { + if (this.updates == null) { + this.updates = new UpdatesImpl(this); + } + return this.updates; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public ADHybridHealthServiceManager authenticate(AzureTokenCredentials credentials) { + return ADHybridHealthServiceManager.authenticate(buildRestClient(credentials)); + } + } + private ADHybridHealthServiceManager(RestClient restClient) { + super( + restClient, + null, + new ADHybridHealthServiceImpl(restClient)); + } +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AdDomainServiceMembersImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AdDomainServiceMembersImpl.java new file mode 100644 index 0000000000000..b31bdb84d6ced --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AdDomainServiceMembersImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AdDomainServiceMembers; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceAddsServiceMemberModel; + +class AdDomainServiceMembersImpl extends WrapperImpl implements AdDomainServiceMembers { + private final ADHybridHealthServiceManager manager; + + AdDomainServiceMembersImpl(ADHybridHealthServiceManager manager) { + super(manager.inner().adDomainServiceMembers()); + this.manager = manager; + } + + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + private AddsserviceAddsServiceMemberModelImpl wrapModel(AddsServiceMemberInner inner) { + return new AddsserviceAddsServiceMemberModelImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String serviceName, final boolean isGroupbySite) { + AdDomainServiceMembersInner client = this.inner(); + return client.listAsync(serviceName, isGroupbySite) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AddsserviceAddsServiceMemberModel call(AddsServiceMemberInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AdDomainServiceMembersInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AdDomainServiceMembersInner.java new file mode 100644 index 0000000000000..ffea5459d2222 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AdDomainServiceMembersInner.java @@ -0,0 +1,429 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in AdDomainServiceMembers. + */ +public class AdDomainServiceMembersInner { + /** The Retrofit service to perform REST calls. */ + private AdDomainServiceMembersService service; + /** The service client containing this operation class. */ + private ADHybridHealthServiceImpl client; + + /** + * Initializes an instance of AdDomainServiceMembersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AdDomainServiceMembersInner(Retrofit retrofit, ADHybridHealthServiceImpl client) { + this.service = retrofit.create(AdDomainServiceMembersService.class); + this.client = client; + } + + /** + * The interface defining all the services for AdDomainServiceMembers to be + * used by Retrofit to perform actually REST calls. + */ + interface AdDomainServiceMembersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AdDomainServiceMembers list" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/addomainservicemembers") + Observable> list(@Path("serviceName") String serviceName, @Query("$filter") String filter, @Query("isGroupbySite") boolean isGroupbySite, @Query("query") String query, @Query("nextPartitionKey") String nextPartitionKey, @Query("nextRowKey") String nextRowKey, @Query("takeCount") Integer takeCount, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AdDomainServiceMembers listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AddsServiceMemberInner> object if successful. + */ + public PagedList list(final String serviceName, final boolean isGroupbySite) { + ServiceResponse> response = listSinglePageAsync(serviceName, isGroupbySite).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @param serviceCallback 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 serviceName, final boolean isGroupbySite, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(serviceName, isGroupbySite), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AddsServiceMemberInner> object + */ + public Observable> listAsync(final String serviceName, final boolean isGroupbySite) { + return listWithServiceResponseAsync(serviceName, isGroupbySite) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AddsServiceMemberInner> object + */ + public Observable>> listWithServiceResponseAsync(final String serviceName, final boolean isGroupbySite) { + return listSinglePageAsync(serviceName, isGroupbySite) + .concatMap(new Func1>, 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)); + } + }); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AddsServiceMemberInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String serviceName, final boolean isGroupbySite) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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 nextPartitionKey = ""; + final String nextRowKey = ""; + final String filter = null; + final String query = null; + final Integer takeCount = null; + return service.list(serviceName, filter, isGroupbySite, query, nextPartitionKey, nextRowKey, takeCount, 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); + } + } + }); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @param filter The server property filter to apply. + * @param query The custom query. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AddsServiceMemberInner> object if successful. + */ + public PagedList list(final String serviceName, final boolean isGroupbySite, final String filter, final String query, final Integer takeCount) { + ServiceResponse> response = listSinglePageAsync(serviceName, isGroupbySite, filter, query, takeCount).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @param filter The server property filter to apply. + * @param query The custom query. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @param serviceCallback 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 serviceName, final boolean isGroupbySite, final String filter, final String query, final Integer takeCount, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(serviceName, isGroupbySite, filter, query, takeCount), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @param filter The server property filter to apply. + * @param query The custom query. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AddsServiceMemberInner> object + */ + public Observable> listAsync(final String serviceName, final boolean isGroupbySite, final String filter, final String query, final Integer takeCount) { + return listWithServiceResponseAsync(serviceName, isGroupbySite, filter, query, takeCount) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @param filter The server property filter to apply. + * @param query The custom query. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AddsServiceMemberInner> object + */ + public Observable>> listWithServiceResponseAsync(final String serviceName, final boolean isGroupbySite, final String filter, final String query, final Integer takeCount) { + return listSinglePageAsync(serviceName, isGroupbySite, filter, query, takeCount) + .concatMap(new Func1>, 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)); + } + }); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param isGroupbySite Indicates if the result should be grouped by site or not. + ServiceResponse> * @param filter The server property filter to apply. + ServiceResponse> * @param query The custom query. + ServiceResponse> * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AddsServiceMemberInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String serviceName, final boolean isGroupbySite, final String filter, final String query, final Integer takeCount) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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 nextPartitionKey = ""; + final String nextRowKey = ""; + return service.list(serviceName, filter, isGroupbySite, query, nextPartitionKey, nextRowKey, takeCount, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AddsServiceMemberInner> 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(); + } + }; + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @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); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AddsServiceMemberInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AddsServiceMemberInner> 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)); + } + }); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AddsServiceMemberInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServiceMemberInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServiceMemberInner.java new file mode 100644 index 0000000000000..6ab66dae3fcb4 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServiceMemberInner.java @@ -0,0 +1,910 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Hotfix; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MonitoringLevel; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The server details for ADDS service. + */ +public class AddsServiceMemberInner { + /** + * The domain name. + */ + @JsonProperty(value = "domainName") + private String domainName; + + /** + * The site name. + */ + @JsonProperty(value = "siteName") + private String siteName; + + /** + * The list of ADDS roles. + */ + @JsonProperty(value = "addsRoles") + private List addsRoles; + + /** + * Indicates if the global catalog for this domain is reachable or not. + */ + @JsonProperty(value = "gcReachable") + private Boolean gcReachable; + + /** + * Indicates if the Dc is advertising or not. + */ + @JsonProperty(value = "isAdvertising") + private Boolean isAdvertising; + + /** + * Indicates if the primary domain controller is reachable or not. + */ + @JsonProperty(value = "pdcReachable") + private Boolean pdcReachable; + + /** + * Indicates if the SYSVOL state is healthy or not. + */ + @JsonProperty(value = "sysvolState") + private Boolean sysvolState; + + /** + * The list of domain controller types. + */ + @JsonProperty(value = "dcTypes") + private List dcTypes; + + /** + * The id of the server. + */ + @JsonProperty(value = "serviceMemberId") + private String serviceMemberId; + + /** + * The service id to whom this server belongs. + */ + @JsonProperty(value = "serviceId") + private String serviceId; + + /** + * The tenant id to whom this server belongs. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /** + * The total number of alerts that are currently active for the server. + */ + @JsonProperty(value = "activeAlerts") + private Integer activeAlerts; + + /** + * The additional information, if any, for the server. + */ + @JsonProperty(value = "additionalInformation") + private String additionalInformation; + + /** + * The date time , in UTC, when the server was onboarded to Azure Active + * Directory Connect Health. + */ + @JsonProperty(value = "createdDate") + private DateTime createdDate; + + /** + * The server specific configuration related dimensions. + */ + @JsonProperty(value = "dimensions") + private List dimensions; + + /** + * Indicates if the server is disabled or not. + */ + @JsonProperty(value = "disabled") + private Boolean disabled; + + /** + * The reason for disabling the server. + */ + @JsonProperty(value = "disabledReason") + private Integer disabledReason; + + /** + * The list of installed QFEs for the server. + */ + @JsonProperty(value = "installedQfes") + private List installedQfes; + + /** + * The date and time , in UTC, when the server was last disabled. + */ + @JsonProperty(value = "lastDisabled") + private DateTime lastDisabled; + + /** + * The date and time, in UTC, when the server was last rebooted. + */ + @JsonProperty(value = "lastReboot") + private DateTime lastReboot; + + /** + * The date and time, in UTC, when the server's data monitoring + * configuration was last changed. + */ + @JsonProperty(value = "lastServerReportedMonitoringLevelChange") + private DateTime lastServerReportedMonitoringLevelChange; + + /** + * The date and time, in UTC, when the server properties were last updated. + */ + @JsonProperty(value = "lastUpdated") + private DateTime lastUpdated; + + /** + * The id of the machine. + */ + @JsonProperty(value = "machineId") + private String machineId; + + /** + * The name of the server. + */ + @JsonProperty(value = "machineName") + private String machineName; + + /** + * The monitoring configuration of the server which determines what + * activities are monitored by Azure Active Directory Connect Health. + */ + @JsonProperty(value = "monitoringConfigurationsComputed") + private List monitoringConfigurationsComputed; + + /** + * The customized monitoring configuration of the server which determines + * what activities are monitored by Azure Active Directory Connect Health. + */ + @JsonProperty(value = "monitoringConfigurationsCustomized") + private List monitoringConfigurationsCustomized; + + /** + * The name of the operating system installed in the machine. + */ + @JsonProperty(value = "osName") + private String osName; + + /** + * The version of the operating system installed in the machine. + */ + @JsonProperty(value = "osVersion") + private String osVersion; + + /** + * Server specific properties. + */ + @JsonProperty(value = "properties") + private List properties; + + /** + * The list of recommended hotfixes for the server. + */ + @JsonProperty(value = "recommendedQfes") + private List recommendedQfes; + + /** + * The total count of alerts that are resolved for this server. + */ + @JsonProperty(value = "resolvedAlerts") + private Integer resolvedAlerts; + + /** + * The service role that is being monitored in the server. + */ + @JsonProperty(value = "role") + private String role; + + /** + * The monitoring level reported by the server. Possible values include: + * 'Partial', 'Full', 'Off'. + */ + @JsonProperty(value = "serverReportedMonitoringLevel") + private MonitoringLevel serverReportedMonitoringLevel; + + /** + * The health status of the server. + */ + @JsonProperty(value = "status") + private String status; + + /** + * Get the domain name. + * + * @return the domainName value + */ + public String domainName() { + return this.domainName; + } + + /** + * Set the domain name. + * + * @param domainName the domainName value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withDomainName(String domainName) { + this.domainName = domainName; + return this; + } + + /** + * Get the site name. + * + * @return the siteName value + */ + public String siteName() { + return this.siteName; + } + + /** + * Set the site name. + * + * @param siteName the siteName value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withSiteName(String siteName) { + this.siteName = siteName; + return this; + } + + /** + * Get the list of ADDS roles. + * + * @return the addsRoles value + */ + public List addsRoles() { + return this.addsRoles; + } + + /** + * Set the list of ADDS roles. + * + * @param addsRoles the addsRoles value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withAddsRoles(List addsRoles) { + this.addsRoles = addsRoles; + return this; + } + + /** + * Get indicates if the global catalog for this domain is reachable or not. + * + * @return the gcReachable value + */ + public Boolean gcReachable() { + return this.gcReachable; + } + + /** + * Set indicates if the global catalog for this domain is reachable or not. + * + * @param gcReachable the gcReachable value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withGcReachable(Boolean gcReachable) { + this.gcReachable = gcReachable; + return this; + } + + /** + * Get indicates if the Dc is advertising or not. + * + * @return the isAdvertising value + */ + public Boolean isAdvertising() { + return this.isAdvertising; + } + + /** + * Set indicates if the Dc is advertising or not. + * + * @param isAdvertising the isAdvertising value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withIsAdvertising(Boolean isAdvertising) { + this.isAdvertising = isAdvertising; + return this; + } + + /** + * Get indicates if the primary domain controller is reachable or not. + * + * @return the pdcReachable value + */ + public Boolean pdcReachable() { + return this.pdcReachable; + } + + /** + * Set indicates if the primary domain controller is reachable or not. + * + * @param pdcReachable the pdcReachable value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withPdcReachable(Boolean pdcReachable) { + this.pdcReachable = pdcReachable; + return this; + } + + /** + * Get indicates if the SYSVOL state is healthy or not. + * + * @return the sysvolState value + */ + public Boolean sysvolState() { + return this.sysvolState; + } + + /** + * Set indicates if the SYSVOL state is healthy or not. + * + * @param sysvolState the sysvolState value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withSysvolState(Boolean sysvolState) { + this.sysvolState = sysvolState; + return this; + } + + /** + * Get the list of domain controller types. + * + * @return the dcTypes value + */ + public List dcTypes() { + return this.dcTypes; + } + + /** + * Set the list of domain controller types. + * + * @param dcTypes the dcTypes value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withDcTypes(List dcTypes) { + this.dcTypes = dcTypes; + return this; + } + + /** + * Get the id of the server. + * + * @return the serviceMemberId value + */ + public String serviceMemberId() { + return this.serviceMemberId; + } + + /** + * Set the id of the server. + * + * @param serviceMemberId the serviceMemberId value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withServiceMemberId(String serviceMemberId) { + this.serviceMemberId = serviceMemberId; + return this; + } + + /** + * Get the service id to whom this server belongs. + * + * @return the serviceId value + */ + public String serviceId() { + return this.serviceId; + } + + /** + * Set the service id to whom this server belongs. + * + * @param serviceId the serviceId value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withServiceId(String serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * Get the tenant id to whom this server belongs. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenant id to whom this server belongs. + * + * @param tenantId the tenantId value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the total number of alerts that are currently active for the server. + * + * @return the activeAlerts value + */ + public Integer activeAlerts() { + return this.activeAlerts; + } + + /** + * Set the total number of alerts that are currently active for the server. + * + * @param activeAlerts the activeAlerts value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withActiveAlerts(Integer activeAlerts) { + this.activeAlerts = activeAlerts; + return this; + } + + /** + * Get the additional information, if any, for the server. + * + * @return the additionalInformation value + */ + public String additionalInformation() { + return this.additionalInformation; + } + + /** + * Set the additional information, if any, for the server. + * + * @param additionalInformation the additionalInformation value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withAdditionalInformation(String additionalInformation) { + this.additionalInformation = additionalInformation; + return this; + } + + /** + * Get the date time , in UTC, when the server was onboarded to Azure Active Directory Connect Health. + * + * @return the createdDate value + */ + public DateTime createdDate() { + return this.createdDate; + } + + /** + * Set the date time , in UTC, when the server was onboarded to Azure Active Directory Connect Health. + * + * @param createdDate the createdDate value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withCreatedDate(DateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get the server specific configuration related dimensions. + * + * @return the dimensions value + */ + public List dimensions() { + return this.dimensions; + } + + /** + * Set the server specific configuration related dimensions. + * + * @param dimensions the dimensions value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withDimensions(List dimensions) { + this.dimensions = dimensions; + return this; + } + + /** + * Get indicates if the server is disabled or not. + * + * @return the disabled value + */ + public Boolean disabled() { + return this.disabled; + } + + /** + * Set indicates if the server is disabled or not. + * + * @param disabled the disabled value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withDisabled(Boolean disabled) { + this.disabled = disabled; + return this; + } + + /** + * Get the reason for disabling the server. + * + * @return the disabledReason value + */ + public Integer disabledReason() { + return this.disabledReason; + } + + /** + * Set the reason for disabling the server. + * + * @param disabledReason the disabledReason value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withDisabledReason(Integer disabledReason) { + this.disabledReason = disabledReason; + return this; + } + + /** + * Get the list of installed QFEs for the server. + * + * @return the installedQfes value + */ + public List installedQfes() { + return this.installedQfes; + } + + /** + * Set the list of installed QFEs for the server. + * + * @param installedQfes the installedQfes value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withInstalledQfes(List installedQfes) { + this.installedQfes = installedQfes; + return this; + } + + /** + * Get the date and time , in UTC, when the server was last disabled. + * + * @return the lastDisabled value + */ + public DateTime lastDisabled() { + return this.lastDisabled; + } + + /** + * Set the date and time , in UTC, when the server was last disabled. + * + * @param lastDisabled the lastDisabled value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withLastDisabled(DateTime lastDisabled) { + this.lastDisabled = lastDisabled; + return this; + } + + /** + * Get the date and time, in UTC, when the server was last rebooted. + * + * @return the lastReboot value + */ + public DateTime lastReboot() { + return this.lastReboot; + } + + /** + * Set the date and time, in UTC, when the server was last rebooted. + * + * @param lastReboot the lastReboot value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withLastReboot(DateTime lastReboot) { + this.lastReboot = lastReboot; + return this; + } + + /** + * Get the date and time, in UTC, when the server's data monitoring configuration was last changed. + * + * @return the lastServerReportedMonitoringLevelChange value + */ + public DateTime lastServerReportedMonitoringLevelChange() { + return this.lastServerReportedMonitoringLevelChange; + } + + /** + * Set the date and time, in UTC, when the server's data monitoring configuration was last changed. + * + * @param lastServerReportedMonitoringLevelChange the lastServerReportedMonitoringLevelChange value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withLastServerReportedMonitoringLevelChange(DateTime lastServerReportedMonitoringLevelChange) { + this.lastServerReportedMonitoringLevelChange = lastServerReportedMonitoringLevelChange; + return this; + } + + /** + * Get the date and time, in UTC, when the server properties were last updated. + * + * @return the lastUpdated value + */ + public DateTime lastUpdated() { + return this.lastUpdated; + } + + /** + * Set the date and time, in UTC, when the server properties were last updated. + * + * @param lastUpdated the lastUpdated value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withLastUpdated(DateTime lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Get the id of the machine. + * + * @return the machineId value + */ + public String machineId() { + return this.machineId; + } + + /** + * Set the id of the machine. + * + * @param machineId the machineId value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withMachineId(String machineId) { + this.machineId = machineId; + return this; + } + + /** + * Get the name of the server. + * + * @return the machineName value + */ + public String machineName() { + return this.machineName; + } + + /** + * Set the name of the server. + * + * @param machineName the machineName value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withMachineName(String machineName) { + this.machineName = machineName; + return this; + } + + /** + * Get the monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health. + * + * @return the monitoringConfigurationsComputed value + */ + public List monitoringConfigurationsComputed() { + return this.monitoringConfigurationsComputed; + } + + /** + * Set the monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health. + * + * @param monitoringConfigurationsComputed the monitoringConfigurationsComputed value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withMonitoringConfigurationsComputed(List monitoringConfigurationsComputed) { + this.monitoringConfigurationsComputed = monitoringConfigurationsComputed; + return this; + } + + /** + * Get the customized monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health. + * + * @return the monitoringConfigurationsCustomized value + */ + public List monitoringConfigurationsCustomized() { + return this.monitoringConfigurationsCustomized; + } + + /** + * Set the customized monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health. + * + * @param monitoringConfigurationsCustomized the monitoringConfigurationsCustomized value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withMonitoringConfigurationsCustomized(List monitoringConfigurationsCustomized) { + this.monitoringConfigurationsCustomized = monitoringConfigurationsCustomized; + return this; + } + + /** + * Get the name of the operating system installed in the machine. + * + * @return the osName value + */ + public String osName() { + return this.osName; + } + + /** + * Set the name of the operating system installed in the machine. + * + * @param osName the osName value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withOsName(String osName) { + this.osName = osName; + return this; + } + + /** + * Get the version of the operating system installed in the machine. + * + * @return the osVersion value + */ + public String osVersion() { + return this.osVersion; + } + + /** + * Set the version of the operating system installed in the machine. + * + * @param osVersion the osVersion value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withOsVersion(String osVersion) { + this.osVersion = osVersion; + return this; + } + + /** + * Get server specific properties. + * + * @return the properties value + */ + public List properties() { + return this.properties; + } + + /** + * Set server specific properties. + * + * @param properties the properties value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withProperties(List properties) { + this.properties = properties; + return this; + } + + /** + * Get the list of recommended hotfixes for the server. + * + * @return the recommendedQfes value + */ + public List recommendedQfes() { + return this.recommendedQfes; + } + + /** + * Set the list of recommended hotfixes for the server. + * + * @param recommendedQfes the recommendedQfes value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withRecommendedQfes(List recommendedQfes) { + this.recommendedQfes = recommendedQfes; + return this; + } + + /** + * Get the total count of alerts that are resolved for this server. + * + * @return the resolvedAlerts value + */ + public Integer resolvedAlerts() { + return this.resolvedAlerts; + } + + /** + * Set the total count of alerts that are resolved for this server. + * + * @param resolvedAlerts the resolvedAlerts value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withResolvedAlerts(Integer resolvedAlerts) { + this.resolvedAlerts = resolvedAlerts; + return this; + } + + /** + * Get the service role that is being monitored in the server. + * + * @return the role value + */ + public String role() { + return this.role; + } + + /** + * Set the service role that is being monitored in the server. + * + * @param role the role value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withRole(String role) { + this.role = role; + return this; + } + + /** + * Get the monitoring level reported by the server. Possible values include: 'Partial', 'Full', 'Off'. + * + * @return the serverReportedMonitoringLevel value + */ + public MonitoringLevel serverReportedMonitoringLevel() { + return this.serverReportedMonitoringLevel; + } + + /** + * Set the monitoring level reported by the server. Possible values include: 'Partial', 'Full', 'Off'. + * + * @param serverReportedMonitoringLevel the serverReportedMonitoringLevel value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withServerReportedMonitoringLevel(MonitoringLevel serverReportedMonitoringLevel) { + this.serverReportedMonitoringLevel = serverReportedMonitoringLevel; + return this; + } + + /** + * Get the health status of the server. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set the health status of the server. + * + * @param status the status value to set + * @return the AddsServiceMemberInner object itself. + */ + public AddsServiceMemberInner withStatus(String status) { + this.status = status; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServiceMembersImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServiceMembersImpl.java new file mode 100644 index 0000000000000..857267fa2ccf4 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServiceMembersImpl.java @@ -0,0 +1,112 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServiceMembers; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceAddsServiceMember; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceServiceMember; +import rx.Completable; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceCredential; + +class AddsServiceMembersImpl extends WrapperImpl implements AddsServiceMembers { + private final ADHybridHealthServiceManager manager; + + AddsServiceMembersImpl(ADHybridHealthServiceManager manager) { + super(manager.inner().addsServiceMembers()); + this.manager = manager; + } + + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + private AddsserviceAddsServiceMemberImpl wrapModel(AddsServiceMemberInner inner) { + return new AddsserviceAddsServiceMemberImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String serviceName) { + AddsServiceMembersInner client = this.inner(); + return client.listAsync(serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AddsserviceAddsServiceMember call(AddsServiceMemberInner inner) { + return wrapModel(inner); + } + }); + } + + private AddsserviceServiceMemberImpl wrapAddsserviceServiceMemberModel(ServiceMemberInner inner) { + return new AddsserviceServiceMemberImpl(inner, manager()); + } + + private AddsserviceCredentialImpl wrapAddsserviceCredentialModel(CredentialInner inner) { + return new AddsserviceCredentialImpl(inner, manager()); + } + + private Observable getServiceMemberInnerUsingAddsServiceMembersInnerAsync(String id) { + String serviceName = IdParsingUtils.getValueFromIdByName(id, "addsservices"); + String serviceMemberId = UUID.fromString(IdParsingUtils.getValueFromIdByName(id, "servicemembers")); + AddsServiceMembersInner client = this.inner(); + return client.getAsync(serviceName, serviceMemberId); + } + + @Override + public Observable getAsync(String serviceName, UUID serviceMemberId) { + AddsServiceMembersInner client = this.inner(); + return client.getAsync(serviceName, serviceMemberId) + .flatMap(new Func1>() { + @Override + public Observable call(ServiceMemberInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((AddsserviceServiceMember)wrapAddsserviceServiceMemberModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String serviceName, UUID serviceMemberId) { + AddsServiceMembersInner client = this.inner(); + return client.deleteAsync(serviceName, serviceMemberId).toCompletable(); + } + + @Override + public Observable listCredentialsAsync(String serviceName, UUID serviceMemberId) { + AddsServiceMembersInner client = this.inner(); + return client.listCredentialsAsync(serviceName, serviceMemberId) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public AddsserviceCredential call(CredentialInner inner) { + return wrapAddsserviceCredentialModel(inner); + } + }); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServiceMembersInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServiceMembersInner.java new file mode 100644 index 0000000000000..b90da3ba9f28e --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServiceMembersInner.java @@ -0,0 +1,838 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import java.util.UUID; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.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 AddsServiceMembers. + */ +public class AddsServiceMembersInner implements InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private AddsServiceMembersService service; + /** The service client containing this operation class. */ + private ADHybridHealthServiceImpl client; + + /** + * Initializes an instance of AddsServiceMembersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AddsServiceMembersInner(Retrofit retrofit, ADHybridHealthServiceImpl client) { + this.service = retrofit.create(AddsServiceMembersService.class); + this.client = client; + } + + /** + * The interface defining all the services for AddsServiceMembers to be + * used by Retrofit to perform actually REST calls. + */ + interface AddsServiceMembersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServiceMembers list" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/addsservicemembers") + Observable> list(@Path("serviceName") String serviceName, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServiceMembers get" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/servicemembers/{serviceMemberId}") + Observable> get(@Path("serviceName") String serviceName, @Path("serviceMemberId") UUID serviceMemberId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServiceMembers delete" }) + @HTTP(path = "providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/servicemembers/{serviceMemberId}", method = "DELETE", hasBody = true) + Observable> delete(@Path("serviceName") String serviceName, @Path("serviceMemberId") UUID serviceMemberId, @Query("confirm") Boolean confirm, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServiceMembers listCredentials" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/servicemembers/{serviceMemberId}/credentials") + Observable> listCredentials(@Path("serviceName") String serviceName, @Path("serviceMemberId") UUID serviceMemberId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServiceMembers listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AddsServiceMemberInner> object if successful. + */ + public PagedList list(final String serviceName) { + ServiceResponse> response = listSinglePageAsync(serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param serviceCallback 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 serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AddsServiceMemberInner> object + */ + public Observable> listAsync(final String serviceName) { + return listWithServiceResponseAsync(serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AddsServiceMemberInner> object + */ + public Observable>> listWithServiceResponseAsync(final String serviceName) { + return listSinglePageAsync(serviceName) + .concatMap(new Func1>, 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)); + } + }); + } + + /** + * Gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AddsServiceMemberInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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.list(serviceName, 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); + } + } + }); + } + + /** + * Gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param filter The server property filter to apply. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AddsServiceMemberInner> object if successful. + */ + public PagedList list(final String serviceName, final String filter) { + ServiceResponse> response = listSinglePageAsync(serviceName, filter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param filter The server property filter to apply. + * @param serviceCallback 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 serviceName, final String filter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(serviceName, filter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param filter The server property filter to apply. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AddsServiceMemberInner> object + */ + public Observable> listAsync(final String serviceName, final String filter) { + return listWithServiceResponseAsync(serviceName, filter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param filter The server property filter to apply. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AddsServiceMemberInner> object + */ + public Observable>> listWithServiceResponseAsync(final String serviceName, final String filter) { + return listSinglePageAsync(serviceName, 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)); + } + }); + } + + /** + * Gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param filter The server property filter to apply. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AddsServiceMemberInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String serviceName, final String filter) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required 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(serviceName, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of a server, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServiceMemberInner object if successful. + */ + public ServiceMemberInner get(String serviceName, UUID serviceMemberId) { + return getWithServiceResponseAsync(serviceName, serviceMemberId).toBlocking().single().body(); + } + + /** + * Gets the details of a server, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server 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 getAsync(String serviceName, UUID serviceMemberId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(serviceName, serviceMemberId), serviceCallback); + } + + /** + * Gets the details of a server, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceMemberInner object + */ + public Observable getAsync(String serviceName, UUID serviceMemberId) { + return getWithServiceResponseAsync(serviceName, serviceMemberId).map(new Func1, ServiceMemberInner>() { + @Override + public ServiceMemberInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the details of a server, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceMemberInner object + */ + public Observable> getWithServiceResponseAsync(String serviceName, UUID serviceMemberId) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required 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(serviceName, serviceMemberId, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a Active Directory Domain Controller server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String serviceName, UUID serviceMemberId) { + deleteWithServiceResponseAsync(serviceName, serviceMemberId).toBlocking().single().body(); + } + + /** + * Deletes a Active Directory Domain Controller server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server 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 deleteAsync(String serviceName, UUID serviceMemberId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(serviceName, serviceMemberId), serviceCallback); + } + + /** + * Deletes a Active Directory Domain Controller server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String serviceName, UUID serviceMemberId) { + return deleteWithServiceResponseAsync(serviceName, serviceMemberId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a Active Directory Domain Controller server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String serviceName, UUID serviceMemberId) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId 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 confirm = null; + return service.delete(serviceName, serviceMemberId, confirm, 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 Active Directory Domain Controller server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @param confirm Indicates if the server will be permanently deleted or disabled. True indicates that the server will be permanently deleted and False indicates that the server will be marked disabled and then deleted after 30 days, if it is not re-registered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String serviceName, UUID serviceMemberId, Boolean confirm) { + deleteWithServiceResponseAsync(serviceName, serviceMemberId, confirm).toBlocking().single().body(); + } + + /** + * Deletes a Active Directory Domain Controller server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @param confirm Indicates if the server will be permanently deleted or disabled. True indicates that the server will be permanently deleted and False indicates that the server will be marked disabled and then deleted after 30 days, if it is not re-registered. + * @param serviceCallback 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 serviceName, UUID serviceMemberId, Boolean confirm, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(serviceName, serviceMemberId, confirm), serviceCallback); + } + + /** + * Deletes a Active Directory Domain Controller server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @param confirm Indicates if the server will be permanently deleted or disabled. True indicates that the server will be permanently deleted and False indicates that the server will be marked disabled and then deleted after 30 days, if it is not re-registered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String serviceName, UUID serviceMemberId, Boolean confirm) { + return deleteWithServiceResponseAsync(serviceName, serviceMemberId, confirm).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a Active Directory Domain Controller server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @param confirm Indicates if the server will be permanently deleted or disabled. True indicates that the server will be permanently deleted and False indicates that the server will be marked disabled and then deleted after 30 days, if it is not re-registered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String serviceName, UUID serviceMemberId, Boolean confirm) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required 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(serviceName, serviceMemberId, confirm, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<CredentialInner> object if successful. + */ + public List listCredentials(String serviceName, UUID serviceMemberId) { + return listCredentialsWithServiceResponseAsync(serviceName, serviceMemberId).toBlocking().single().body(); + } + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server 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> listCredentialsAsync(String serviceName, UUID serviceMemberId, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listCredentialsWithServiceResponseAsync(serviceName, serviceMemberId), serviceCallback); + } + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<CredentialInner> object + */ + public Observable> listCredentialsAsync(String serviceName, UUID serviceMemberId) { + return listCredentialsWithServiceResponseAsync(serviceName, serviceMemberId).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<CredentialInner> object + */ + public Observable>> listCredentialsWithServiceResponseAsync(String serviceName, UUID serviceMemberId) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId 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.listCredentials(serviceName, serviceMemberId, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listCredentialsDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @param filter The property filter to apply. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException 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<CredentialInner> object if successful. + */ + public List listCredentials(String serviceName, UUID serviceMemberId, String filter) { + return listCredentialsWithServiceResponseAsync(serviceName, serviceMemberId, filter).toBlocking().single().body(); + } + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @param filter The property filter to apply. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listCredentialsAsync(String serviceName, UUID serviceMemberId, String filter, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listCredentialsWithServiceResponseAsync(serviceName, serviceMemberId, filter), serviceCallback); + } + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @param filter The property filter to apply. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<CredentialInner> object + */ + public Observable> listCredentialsAsync(String serviceName, UUID serviceMemberId, String filter) { + return listCredentialsWithServiceResponseAsync(serviceName, serviceMemberId, filter).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @param filter The property filter to apply. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<CredentialInner> object + */ + public Observable>> listCredentialsWithServiceResponseAsync(String serviceName, UUID serviceMemberId, String filter) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listCredentials(serviceName, serviceMemberId, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listCredentialsDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AddsServiceMemberInner> 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(); + } + }; + } + + /** + * Gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @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); + } + + /** + * Gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AddsServiceMemberInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AddsServiceMemberInner> 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)); + } + }); + } + + /** + * Gets the details of the Active Directory Domain servers, for a given Active Directory Domain Service, that are onboarded to Azure Active Directory Connect Health. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AddsServiceMemberInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesImpl.java new file mode 100644 index 0000000000000..201e687249964 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesImpl.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. + * abc + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServicememberAddsserviceAlert; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceMetricSets; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceItem; +import rx.Completable; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceProperties; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ForestSummary; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MetricMetadata; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ReplicationSummary; + +class AddsServicesImpl extends WrapperImpl implements AddsServices { + private final ADHybridHealthServiceManager manager; + + AddsServicesImpl(ADHybridHealthServiceManager manager) { + super(manager.inner().addsServices()); + this.manager = manager; + } + + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + private ServicememberAddsserviceAlertImpl wrapServicememberAddsserviceAlertModel(AlertInner inner) { + return new ServicememberAddsserviceAlertImpl(inner, manager()); + } + + private AddsserviceMetricSetsImpl wrapAddsserviceMetricSetsModel(MetricSetsInner inner) { + return new AddsserviceMetricSetsImpl(inner, manager()); + } + + private ReplicationSummaryImpl wrapReplicationSummaryModel(ReplicationSummaryInner inner) { + return new ReplicationSummaryImpl(inner, manager()); + } + + private Observable getMetricSetsInnerUsingAddsServicesInnerAsync(String id) { + String serviceName = IdParsingUtils.getValueFromIdByName(id, "addsservices"); + String metricName = IdParsingUtils.getValueFromIdByName(id, "metrics"); + String groupName = IdParsingUtils.getValueFromIdByName(id, "groups"); + AddsServicesInner client = this.inner(); + return client.getMetricsAsync(serviceName, metricName, groupName); + } + + @Override + public Observable listServerAlertsAsync(final UUID serviceMemberId, final String serviceName) { + AddsServicesInner client = this.inner(); + return client.listServerAlertsAsync(serviceMemberId, serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServicememberAddsserviceAlert call(AlertInner inner) { + return wrapServicememberAddsserviceAlertModel(inner); + } + }); + } + + @Override + public Observable getMetricsAsync(String serviceName, String metricName, String groupName) { + AddsServicesInner client = this.inner(); + return client.getMetricsAsync(serviceName, metricName, groupName) + .flatMap(new Func1>() { + @Override + public Observable call(MetricSetsInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((AddsserviceMetricSets)wrapAddsserviceMetricSetsModel(inner)); + } + } + }); + } + + @Override + public Observable listMetricsAverageAsync(final String serviceName, final String metricName, final String groupName) { + AddsServicesInner client = this.inner(); + return client.listMetricsAverageAsync(serviceName, metricName, groupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceItem call(ItemInner inner) { + return new ServiceItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable listMetricsSumAsync(final String serviceName, final String metricName, final String groupName) { + AddsServicesInner client = this.inner(); + return client.listMetricsSumAsync(serviceName, metricName, groupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceItem call(ItemInner inner) { + return new ServiceItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable getMetricMetadataForGroupAsync(String serviceName, String metricName, String groupName) { + AddsServicesInner client = this.inner(); + return client.getMetricMetadataForGroupAsync(serviceName, metricName, groupName) + .map(new Func1() { + @Override + public AddsserviceMetricSets call(MetricSetsInner inner) { + return new AddsserviceMetricSetsImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAsync(String serviceName) { + AddsServicesInner client = this.inner(); + return client.getAsync(serviceName) + .map(new Func1() { + @Override + public ServiceProperties call(ServicePropertiesInner inner) { + return new ServicePropertiesImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteAsync(String serviceName) { + AddsServicesInner client = this.inner(); + return client.deleteAsync(serviceName).toCompletable(); + } + + @Override + public Observable updateAsync(String serviceName, ServicePropertiesInner service) { + AddsServicesInner client = this.inner(); + return client.updateAsync(serviceName, service) + .map(new Func1() { + @Override + public ServiceProperties call(ServicePropertiesInner inner) { + return new ServicePropertiesImpl(inner, manager()); + } + }); + } + + @Override + public Observable getForestSummaryAsync(String serviceName) { + AddsServicesInner client = this.inner(); + return client.getForestSummaryAsync(serviceName) + .map(new Func1() { + @Override + public ForestSummary call(ForestSummaryInner inner) { + return new ForestSummaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable listMetricMetadataAsync(final String serviceName) { + AddsServicesInner client = this.inner(); + return client.listMetricMetadataAsync(serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public MetricMetadata call(MetricMetadataInner inner) { + return new MetricMetadataImpl(inner, manager()); + } + }); + } + + @Override + public Observable getMetricMetadataAsync(String serviceName, String metricName) { + AddsServicesInner client = this.inner(); + return client.getMetricMetadataAsync(serviceName, metricName) + .map(new Func1() { + @Override + public MetricMetadata call(MetricMetadataInner inner) { + return new MetricMetadataImpl(inner, manager()); + } + }); + } + + @Override + public Observable listReplicationSummaryAsync(String serviceName, boolean isGroupbySite, String query) { + AddsServicesInner client = this.inner(); + return client.listReplicationSummaryAsync(serviceName, isGroupbySite, query) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public ReplicationSummary call(ReplicationSummaryInner inner) { + return new ReplicationSummaryImpl(inner, manager()); + } + }); + } + + @Override + public Observable listPremiumServicesAsync() { + AddsServicesInner client = this.inner(); + return client.listPremiumServicesAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceProperties call(ServicePropertiesInner inner) { + return new ServicePropertiesImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync() { + AddsServicesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceProperties call(ServicePropertiesInner inner) { + return new ServicePropertiesImpl(inner, manager()); + } + }); + } + + @Override + public Observable addAsync(ServicePropertiesInner service) { + AddsServicesInner client = this.inner(); + return client.addAsync(service) + .map(new Func1() { + @Override + public ServiceProperties call(ServicePropertiesInner inner) { + return new ServicePropertiesImpl(inner, manager()); + } + }); + } + + @Override + public Observable listReplicationDetailsAsync(String serviceName) { + AddsServicesInner client = this.inner(); + return client.listReplicationDetailsAsync(serviceName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public ReplicationSummary call(ReplicationSummaryInner inner) { + return wrapReplicationSummaryModel(inner); + } + }); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesInner.java new file mode 100644 index 0000000000000..cc73c7b6e4c6f --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesInner.java @@ -0,0 +1,3291 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.UUID; +import okhttp3.ResponseBody; +import org.joda.time.DateTime; +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.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 AddsServices. + */ +public class AddsServicesInner { + /** The Retrofit service to perform REST calls. */ + private AddsServicesService service; + /** The service client containing this operation class. */ + private ADHybridHealthServiceImpl client; + + /** + * Initializes an instance of AddsServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AddsServicesInner(Retrofit retrofit, ADHybridHealthServiceImpl client) { + this.service = retrofit.create(AddsServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for AddsServices to be + * used by Retrofit to perform actually REST calls. + */ + interface AddsServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices list" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices") + Observable> list(@Query("$filter") String filter, @Query("serviceType") String serviceType, @Query("skipCount") Integer skipCount, @Query("takeCount") Integer takeCount, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices add" }) + @POST("providers/Microsoft.ADHybridHealthService/addsservices") + Observable> add(@Query("api-version") String apiVersion, @Body ServicePropertiesInner service, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices get" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}") + Observable> get(@Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices delete" }) + @HTTP(path = "providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("serviceName") String serviceName, @Query("confirm") Boolean confirm, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices update" }) + @PATCH("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}") + Observable> update(@Path("serviceName") String serviceName, @Body ServicePropertiesInner service, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices getForestSummary" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/forestsummary") + Observable> getForestSummary(@Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices getMetrics" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metrics/{metricName}/groups/{groupName}") + Observable> getMetrics(@Path("serviceName") String serviceName, @Path("metricName") String metricName, @Path("groupName") String groupName, @Query("groupKey") String groupKey, @Query("fromDate") DateTime fromDate, @Query("toDate") DateTime toDate, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices listMetricsAverage" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metrics/{metricName}/groups/{groupName}/average") + Observable> listMetricsAverage(@Path("serviceName") String serviceName, @Path("metricName") String metricName, @Path("groupName") String groupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices listMetricsSum" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metrics/{metricName}/groups/{groupName}/sum") + Observable> listMetricsSum(@Path("serviceName") String serviceName, @Path("metricName") String metricName, @Path("groupName") String groupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices listMetricMetadata" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metricmetadata") + Observable> listMetricMetadata(@Path("serviceName") String serviceName, @Query("$filter") String filter, @Query("perfCounter") Boolean perfCounter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices getMetricMetadata" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metricmetadata/{metricName}") + Observable> getMetricMetadata(@Path("serviceName") String serviceName, @Path("metricName") String metricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices getMetricMetadataForGroup" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/metricmetadata/{metricName}/groups/{groupName}") + Observable> getMetricMetadataForGroup(@Path("serviceName") String serviceName, @Path("metricName") String metricName, @Path("groupName") String groupName, @Query("groupKey") String groupKey, @Query("fromDate") DateTime fromDate, @Query("toDate") DateTime toDate, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices listReplicationDetails" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/replicationdetails") + Observable> listReplicationDetails(@Path("serviceName") String serviceName, @Query("$filter") String filter, @Query("withDetails") Boolean withDetails, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices listReplicationSummary" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/replicationsummary") + Observable> listReplicationSummary(@Path("serviceName") String serviceName, @Query("$filter") String filter, @Query("isGroupbySite") boolean isGroupbySite, @Query("query") String query, @Query("nextPartitionKey") String nextPartitionKey, @Query("nextRowKey") String nextRowKey, @Query("takeCount") Integer takeCount, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices listServerAlerts" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/servicemembers/{serviceMemberId}/alerts") + Observable> listServerAlerts(@Path("serviceMemberId") UUID serviceMemberId, @Path("serviceName") String serviceName, @Query("$filter") String filter, @Query("state") String state, @Query("from") DateTime from, @Query("to") DateTime to, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices listPremiumServices" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/premiumCheck") + Observable> listPremiumServices(@Query("$filter") String filter, @Query("serviceType") String serviceType, @Query("skipCount") Integer skipCount, @Query("takeCount") Integer takeCount, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServices 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.adhybridhealthservice.v2014_01_01.AddsServices listMetricsAverageNext" }) + @GET + Observable> listMetricsAverageNext(@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.adhybridhealthservice.v2014_01_01.AddsServices listMetricsSumNext" }) + @GET + Observable> listMetricsSumNext(@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.adhybridhealthservice.v2014_01_01.AddsServices listMetricMetadataNext" }) + @GET + Observable> listMetricMetadataNext(@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.adhybridhealthservice.v2014_01_01.AddsServices listServerAlertsNext" }) + @GET + Observable> listServerAlertsNext(@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.adhybridhealthservice.v2014_01_01.AddsServices listPremiumServicesNext" }) + @GET + Observable> listPremiumServicesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServicePropertiesInner> 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(); + } + }; + } + + /** + * Gets the details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceCallback 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); + } + + /** + * Gets the details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> 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)); + } + }); + } + + /** + * Gets the details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServicePropertiesInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final String serviceType = null; + final Integer skipCount = null; + final Integer takeCount = null; + return service.list(filter, serviceType, skipCount, takeCount, 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); + } + } + }); + } + + /** + * Gets the details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @param filter The service property filter to apply. + * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServicePropertiesInner> object if successful. + */ + public PagedList list(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount) { + ServiceResponse> response = listSinglePageAsync(filter, serviceType, skipCount, takeCount).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @param filter The service property filter to apply. + * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @param serviceCallback 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 filter, final String serviceType, final Integer skipCount, final Integer takeCount, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(filter, serviceType, skipCount, takeCount), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @param filter The service property filter to apply. + * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable> listAsync(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount) { + return listWithServiceResponseAsync(filter, serviceType, skipCount, takeCount) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @param filter The service property filter to apply. + * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable>> listWithServiceResponseAsync(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount) { + return listSinglePageAsync(filter, serviceType, skipCount, takeCount) + .concatMap(new Func1>, 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)); + } + }); + } + + /** + * Gets the details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + ServiceResponse> * @param filter The service property filter to apply. + ServiceResponse> * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + ServiceResponse> * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + ServiceResponse> * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServicePropertiesInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount) { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(filter, serviceType, skipCount, takeCount, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Onboards a service for a given tenant in Azure Active Directory Connect Health. + * + * @param service The service object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServicePropertiesInner object if successful. + */ + public ServicePropertiesInner add(ServicePropertiesInner service) { + return addWithServiceResponseAsync(service).toBlocking().single().body(); + } + + /** + * Onboards a service for a given tenant in Azure Active Directory Connect Health. + * + * @param service The service 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 addAsync(ServicePropertiesInner service, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addWithServiceResponseAsync(service), serviceCallback); + } + + /** + * Onboards a service for a given tenant in Azure Active Directory Connect Health. + * + * @param service The service object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServicePropertiesInner object + */ + public Observable addAsync(ServicePropertiesInner service) { + return addWithServiceResponseAsync(service).map(new Func1, ServicePropertiesInner>() { + @Override + public ServicePropertiesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Onboards a service for a given tenant in Azure Active Directory Connect Health. + * + * @param service The service object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServicePropertiesInner object + */ + public Observable> addWithServiceResponseAsync(ServicePropertiesInner service) { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (service == null) { + throw new IllegalArgumentException("Parameter service is required and cannot be null."); + } + Validator.validate(service); + return service.add(this.client.apiVersion(), service, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse addDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of an Active Directory Domain Service for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServicePropertiesInner object if successful. + */ + public ServicePropertiesInner get(String serviceName) { + return getWithServiceResponseAsync(serviceName).toBlocking().single().body(); + } + + /** + * Gets the details of an Active Directory Domain Service for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param serviceCallback 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 serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(serviceName), serviceCallback); + } + + /** + * Gets the details of an Active Directory Domain Service for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServicePropertiesInner object + */ + public Observable getAsync(String serviceName) { + return getWithServiceResponseAsync(serviceName).map(new Func1, ServicePropertiesInner>() { + @Override + public ServicePropertiesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the details of an Active Directory Domain Service for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServicePropertiesInner object + */ + public Observable> getWithServiceResponseAsync(String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required 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(serviceName, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes an Active Directory Domain Service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String serviceName) { + deleteWithServiceResponseAsync(serviceName).toBlocking().single().body(); + } + + /** + * Deletes an Active Directory Domain Service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be 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 serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(serviceName), serviceCallback); + } + + /** + * Deletes an Active Directory Domain Service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String serviceName) { + return deleteWithServiceResponseAsync(serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an Active Directory Domain Service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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 confirm = null; + return service.delete(serviceName, confirm, 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 an Active Directory Domain Service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be deleted. + * @param confirm Indicates if the service will be permanently deleted or disabled. True indicates that the service will be permanently deleted and False indicates that the service will be marked disabled and then deleted after 30 days, if it is not re-registered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String serviceName, Boolean confirm) { + deleteWithServiceResponseAsync(serviceName, confirm).toBlocking().single().body(); + } + + /** + * Deletes an Active Directory Domain Service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be deleted. + * @param confirm Indicates if the service will be permanently deleted or disabled. True indicates that the service will be permanently deleted and False indicates that the service will be marked disabled and then deleted after 30 days, if it is not re-registered. + * @param serviceCallback 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 serviceName, Boolean confirm, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(serviceName, confirm), serviceCallback); + } + + /** + * Deletes an Active Directory Domain Service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be deleted. + * @param confirm Indicates if the service will be permanently deleted or disabled. True indicates that the service will be permanently deleted and False indicates that the service will be marked disabled and then deleted after 30 days, if it is not re-registered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String serviceName, Boolean confirm) { + return deleteWithServiceResponseAsync(serviceName, confirm).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes an Active Directory Domain Service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be deleted. + * @param confirm Indicates if the service will be permanently deleted or disabled. True indicates that the service will be permanently deleted and False indicates that the service will be marked disabled and then deleted after 30 days, if it is not re-registered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String serviceName, Boolean confirm) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required 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(serviceName, confirm, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates an Active Directory Domain Service properties of an onboarded service. + * + * @param serviceName The name of the service which needs to be deleted. + * @param service The service object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServicePropertiesInner object if successful. + */ + public ServicePropertiesInner update(String serviceName, ServicePropertiesInner service) { + return updateWithServiceResponseAsync(serviceName, service).toBlocking().single().body(); + } + + /** + * Updates an Active Directory Domain Service properties of an onboarded service. + * + * @param serviceName The name of the service which needs to be deleted. + * @param service The service 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 updateAsync(String serviceName, ServicePropertiesInner service, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(serviceName, service), serviceCallback); + } + + /** + * Updates an Active Directory Domain Service properties of an onboarded service. + * + * @param serviceName The name of the service which needs to be deleted. + * @param service The service object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServicePropertiesInner object + */ + public Observable updateAsync(String serviceName, ServicePropertiesInner service) { + return updateWithServiceResponseAsync(serviceName, service).map(new Func1, ServicePropertiesInner>() { + @Override + public ServicePropertiesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates an Active Directory Domain Service properties of an onboarded service. + * + * @param serviceName The name of the service which needs to be deleted. + * @param service The service object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServicePropertiesInner object + */ + public Observable> updateWithServiceResponseAsync(String serviceName, ServicePropertiesInner service) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (service == null) { + throw new IllegalArgumentException("Parameter service 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(service); + return service.update(serviceName, service, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the forest summary for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ForestSummaryInner object if successful. + */ + public ForestSummaryInner getForestSummary(String serviceName) { + return getForestSummaryWithServiceResponseAsync(serviceName).toBlocking().single().body(); + } + + /** + * Gets the forest summary for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getForestSummaryAsync(String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getForestSummaryWithServiceResponseAsync(serviceName), serviceCallback); + } + + /** + * Gets the forest summary for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ForestSummaryInner object + */ + public Observable getForestSummaryAsync(String serviceName) { + return getForestSummaryWithServiceResponseAsync(serviceName).map(new Func1, ForestSummaryInner>() { + @Override + public ForestSummaryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the forest summary for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ForestSummaryInner object + */ + public Observable> getForestSummaryWithServiceResponseAsync(String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getForestSummary(serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getForestSummaryDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getForestSummaryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MetricSetsInner object if successful. + */ + public MetricSetsInner getMetrics(String serviceName, String metricName, String groupName) { + return getMetricsWithServiceResponseAsync(serviceName, metricName, groupName).toBlocking().single().body(); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group 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 getMetricsAsync(String serviceName, String metricName, String groupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMetricsWithServiceResponseAsync(serviceName, metricName, groupName), serviceCallback); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable getMetricsAsync(String serviceName, String metricName, String groupName) { + return getMetricsWithServiceResponseAsync(serviceName, metricName, groupName).map(new Func1, MetricSetsInner>() { + @Override + public MetricSetsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable> getMetricsWithServiceResponseAsync(String serviceName, String metricName, String groupName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName 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 groupKey = null; + final DateTime fromDate = null; + final DateTime toDate = null; + return service.getMetrics(serviceName, metricName, groupName, groupKey, fromDate, toDate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMetricsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MetricSetsInner object if successful. + */ + public MetricSetsInner getMetrics(String serviceName, String metricName, String groupName, String groupKey, DateTime fromDate, DateTime toDate) { + return getMetricsWithServiceResponseAsync(serviceName, metricName, groupName, groupKey, fromDate, toDate).toBlocking().single().body(); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getMetricsAsync(String serviceName, String metricName, String groupName, String groupKey, DateTime fromDate, DateTime toDate, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMetricsWithServiceResponseAsync(serviceName, metricName, groupName, groupKey, fromDate, toDate), serviceCallback); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable getMetricsAsync(String serviceName, String metricName, String groupName, String groupKey, DateTime fromDate, DateTime toDate) { + return getMetricsWithServiceResponseAsync(serviceName, metricName, groupName, groupKey, fromDate, toDate).map(new Func1, MetricSetsInner>() { + @Override + public MetricSetsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable> getMetricsWithServiceResponseAsync(String serviceName, String metricName, String groupName, String groupKey, DateTime fromDate, DateTime toDate) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getMetrics(serviceName, metricName, groupName, groupKey, fromDate, toDate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMetricsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ItemInner> object if successful. + */ + public PagedList listMetricsAverage(final String serviceName, final String metricName, final String groupName) { + ServiceResponse> response = listMetricsAverageSinglePageAsync(serviceName, metricName, groupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsAverageNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group 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> listMetricsAverageAsync(final String serviceName, final String metricName, final String groupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsAverageSinglePageAsync(serviceName, metricName, groupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsAverageNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable> listMetricsAverageAsync(final String serviceName, final String metricName, final String groupName) { + return listMetricsAverageWithServiceResponseAsync(serviceName, metricName, groupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable>> listMetricsAverageWithServiceResponseAsync(final String serviceName, final String metricName, final String groupName) { + return listMetricsAverageSinglePageAsync(serviceName, metricName, groupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsAverageNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param metricName The metric name + ServiceResponse> * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricsAverageSinglePageAsync(final String serviceName, final String metricName, final String groupName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listMetricsAverage(serviceName, metricName, groupName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricsAverageDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsAverageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ItemInner> object if successful. + */ + public PagedList listMetricsSum(final String serviceName, final String metricName, final String groupName) { + ServiceResponse> response = listMetricsSumSinglePageAsync(serviceName, metricName, groupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsSumNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group 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> listMetricsSumAsync(final String serviceName, final String metricName, final String groupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsSumSinglePageAsync(serviceName, metricName, groupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsSumNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable> listMetricsSumAsync(final String serviceName, final String metricName, final String groupName) { + return listMetricsSumWithServiceResponseAsync(serviceName, metricName, groupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable>> listMetricsSumWithServiceResponseAsync(final String serviceName, final String metricName, final String groupName) { + return listMetricsSumSinglePageAsync(serviceName, metricName, groupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsSumNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param metricName The metric name + ServiceResponse> * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricsSumSinglePageAsync(final String serviceName, final String metricName, final String groupName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listMetricsSum(serviceName, metricName, groupName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricsSumDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsSumDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<MetricMetadataInner> object if successful. + */ + public PagedList listMetricMetadata(final String serviceName) { + ServiceResponse> response = listMetricMetadataSinglePageAsync(serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricMetadataNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricMetadataAsync(final String serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricMetadataSinglePageAsync(serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricMetadataNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MetricMetadataInner> object + */ + public Observable> listMetricMetadataAsync(final String serviceName) { + return listMetricMetadataWithServiceResponseAsync(serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MetricMetadataInner> object + */ + public Observable>> listMetricMetadataWithServiceResponseAsync(final String serviceName) { + return listMetricMetadataSinglePageAsync(serviceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricMetadataNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<MetricMetadataInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricMetadataSinglePageAsync(final String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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; + final Boolean perfCounter = null; + return service.listMetricMetadata(serviceName, filter, perfCounter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricMetadataDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @param filter The metric metadata property filter to apply. + * @param perfCounter Indicates if only performance counter metrics are requested. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<MetricMetadataInner> object if successful. + */ + public PagedList listMetricMetadata(final String serviceName, final String filter, final Boolean perfCounter) { + ServiceResponse> response = listMetricMetadataSinglePageAsync(serviceName, filter, perfCounter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricMetadataNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @param filter The metric metadata property filter to apply. + * @param perfCounter Indicates if only performance counter metrics are requested. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricMetadataAsync(final String serviceName, final String filter, final Boolean perfCounter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricMetadataSinglePageAsync(serviceName, filter, perfCounter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricMetadataNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @param filter The metric metadata property filter to apply. + * @param perfCounter Indicates if only performance counter metrics are requested. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MetricMetadataInner> object + */ + public Observable> listMetricMetadataAsync(final String serviceName, final String filter, final Boolean perfCounter) { + return listMetricMetadataWithServiceResponseAsync(serviceName, filter, perfCounter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @param filter The metric metadata property filter to apply. + * @param perfCounter Indicates if only performance counter metrics are requested. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MetricMetadataInner> object + */ + public Observable>> listMetricMetadataWithServiceResponseAsync(final String serviceName, final String filter, final Boolean perfCounter) { + return listMetricMetadataSinglePageAsync(serviceName, filter, perfCounter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricMetadataNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the service related metrics information. + * + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param filter The metric metadata property filter to apply. + ServiceResponse> * @param perfCounter Indicates if only performance counter metrics are requested. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<MetricMetadataInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricMetadataSinglePageAsync(final String serviceName, final String filter, final Boolean perfCounter) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listMetricMetadata(serviceName, filter, perfCounter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricMetadataDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricMetadataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the service related metric information. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MetricMetadataInner object if successful. + */ + public MetricMetadataInner getMetricMetadata(String serviceName, String metricName) { + return getMetricMetadataWithServiceResponseAsync(serviceName, metricName).toBlocking().single().body(); + } + + /** + * Gets the service related metric information. + * + * @param serviceName The name of the service. + * @param metricName The metric 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 getMetricMetadataAsync(String serviceName, String metricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMetricMetadataWithServiceResponseAsync(serviceName, metricName), serviceCallback); + } + + /** + * Gets the service related metric information. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricMetadataInner object + */ + public Observable getMetricMetadataAsync(String serviceName, String metricName) { + return getMetricMetadataWithServiceResponseAsync(serviceName, metricName).map(new Func1, MetricMetadataInner>() { + @Override + public MetricMetadataInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the service related metric information. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricMetadataInner object + */ + public Observable> getMetricMetadataWithServiceResponseAsync(String serviceName, String metricName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getMetricMetadata(serviceName, metricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMetricMetadataDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMetricMetadataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MetricSetsInner object if successful. + */ + public MetricSetsInner getMetricMetadataForGroup(String serviceName, String metricName, String groupName) { + return getMetricMetadataForGroupWithServiceResponseAsync(serviceName, metricName, groupName).toBlocking().single().body(); + } + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group 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 getMetricMetadataForGroupAsync(String serviceName, String metricName, String groupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMetricMetadataForGroupWithServiceResponseAsync(serviceName, metricName, groupName), serviceCallback); + } + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable getMetricMetadataForGroupAsync(String serviceName, String metricName, String groupName) { + return getMetricMetadataForGroupWithServiceResponseAsync(serviceName, metricName, groupName).map(new Func1, MetricSetsInner>() { + @Override + public MetricSetsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable> getMetricMetadataForGroupWithServiceResponseAsync(String serviceName, String metricName, String groupName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName 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 groupKey = null; + final DateTime fromDate = null; + final DateTime toDate = null; + return service.getMetricMetadataForGroup(serviceName, metricName, groupName, groupKey, fromDate, toDate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMetricMetadataForGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MetricSetsInner object if successful. + */ + public MetricSetsInner getMetricMetadataForGroup(String serviceName, String metricName, String groupName, String groupKey, DateTime fromDate, DateTime toDate) { + return getMetricMetadataForGroupWithServiceResponseAsync(serviceName, metricName, groupName, groupKey, fromDate, toDate).toBlocking().single().body(); + } + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getMetricMetadataForGroupAsync(String serviceName, String metricName, String groupName, String groupKey, DateTime fromDate, DateTime toDate, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMetricMetadataForGroupWithServiceResponseAsync(serviceName, metricName, groupName, groupKey, fromDate, toDate), serviceCallback); + } + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable getMetricMetadataForGroupAsync(String serviceName, String metricName, String groupName, String groupKey, DateTime fromDate, DateTime toDate) { + return getMetricMetadataForGroupWithServiceResponseAsync(serviceName, metricName, groupName, groupKey, fromDate, toDate).map(new Func1, MetricSetsInner>() { + @Override + public MetricSetsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable> getMetricMetadataForGroupWithServiceResponseAsync(String serviceName, String metricName, String groupName, String groupKey, DateTime fromDate, DateTime toDate) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getMetricMetadataForGroup(serviceName, metricName, groupName, groupKey, fromDate, toDate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMetricMetadataForGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMetricMetadataForGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException 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<ReplicationSummaryInner> object if successful. + */ + public List listReplicationDetails(String serviceName) { + return listReplicationDetailsWithServiceResponseAsync(serviceName).toBlocking().single().body(); + } + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listReplicationDetailsAsync(String serviceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listReplicationDetailsWithServiceResponseAsync(serviceName), serviceCallback); + } + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ReplicationSummaryInner> object + */ + public Observable> listReplicationDetailsAsync(String serviceName) { + return listReplicationDetailsWithServiceResponseAsync(serviceName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ReplicationSummaryInner> object + */ + public Observable>> listReplicationDetailsWithServiceResponseAsync(String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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; + final Boolean withDetails = null; + return service.listReplicationDetails(serviceName, filter, withDetails, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listReplicationDetailsDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param filter The server property filter to apply. + * @param withDetails Indicates if InboundReplicationNeighbor details are required or not. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException 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<ReplicationSummaryInner> object if successful. + */ + public List listReplicationDetails(String serviceName, String filter, Boolean withDetails) { + return listReplicationDetailsWithServiceResponseAsync(serviceName, filter, withDetails).toBlocking().single().body(); + } + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param filter The server property filter to apply. + * @param withDetails Indicates if InboundReplicationNeighbor details are required or not. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listReplicationDetailsAsync(String serviceName, String filter, Boolean withDetails, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listReplicationDetailsWithServiceResponseAsync(serviceName, filter, withDetails), serviceCallback); + } + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param filter The server property filter to apply. + * @param withDetails Indicates if InboundReplicationNeighbor details are required or not. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ReplicationSummaryInner> object + */ + public Observable> listReplicationDetailsAsync(String serviceName, String filter, Boolean withDetails) { + return listReplicationDetailsWithServiceResponseAsync(serviceName, filter, withDetails).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param filter The server property filter to apply. + * @param withDetails Indicates if InboundReplicationNeighbor details are required or not. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ReplicationSummaryInner> object + */ + public Observable>> listReplicationDetailsWithServiceResponseAsync(String serviceName, String filter, Boolean withDetails) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listReplicationDetails(serviceName, filter, withDetails, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listReplicationDetailsDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listReplicationDetailsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @param query The custom query. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException 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<ReplicationSummaryInner> object if successful. + */ + public List listReplicationSummary(String serviceName, boolean isGroupbySite, String query) { + return listReplicationSummaryWithServiceResponseAsync(serviceName, isGroupbySite, query).toBlocking().single().body(); + } + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @param query The custom query. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listReplicationSummaryAsync(String serviceName, boolean isGroupbySite, String query, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listReplicationSummaryWithServiceResponseAsync(serviceName, isGroupbySite, query), serviceCallback); + } + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @param query The custom query. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ReplicationSummaryInner> object + */ + public Observable> listReplicationSummaryAsync(String serviceName, boolean isGroupbySite, String query) { + return listReplicationSummaryWithServiceResponseAsync(serviceName, isGroupbySite, query).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @param query The custom query. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ReplicationSummaryInner> object + */ + public Observable>> listReplicationSummaryWithServiceResponseAsync(String serviceName, boolean isGroupbySite, String query) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (query == null) { + throw new IllegalArgumentException("Parameter query 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 nextPartitionKey = ""; + final String nextRowKey = ""; + final String filter = null; + final Integer takeCount = null; + return service.listReplicationSummary(serviceName, filter, isGroupbySite, query, nextPartitionKey, nextRowKey, takeCount, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listReplicationSummaryDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @param query The custom query. + * @param filter The server property filter to apply. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException 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<ReplicationSummaryInner> object if successful. + */ + public List listReplicationSummary(String serviceName, boolean isGroupbySite, String query, String filter, Integer takeCount) { + return listReplicationSummaryWithServiceResponseAsync(serviceName, isGroupbySite, query, filter, takeCount).toBlocking().single().body(); + } + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @param query The custom query. + * @param filter The server property filter to apply. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listReplicationSummaryAsync(String serviceName, boolean isGroupbySite, String query, String filter, Integer takeCount, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listReplicationSummaryWithServiceResponseAsync(serviceName, isGroupbySite, query, filter, takeCount), serviceCallback); + } + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @param query The custom query. + * @param filter The server property filter to apply. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ReplicationSummaryInner> object + */ + public Observable> listReplicationSummaryAsync(String serviceName, boolean isGroupbySite, String query, String filter, Integer takeCount) { + return listReplicationSummaryWithServiceResponseAsync(serviceName, isGroupbySite, query, filter, takeCount).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets complete domain controller list along with replication details for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param isGroupbySite Indicates if the result should be grouped by site or not. + * @param query The custom query. + * @param filter The server property filter to apply. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ReplicationSummaryInner> object + */ + public Observable>> listReplicationSummaryWithServiceResponseAsync(String serviceName, boolean isGroupbySite, String query, String filter, Integer takeCount) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (query == null) { + throw new IllegalArgumentException("Parameter query 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 nextPartitionKey = ""; + final String nextRowKey = ""; + return service.listReplicationSummary(serviceName, filter, isGroupbySite, query, nextPartitionKey, nextRowKey, takeCount, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listReplicationSummaryDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listReplicationSummaryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of an alert for a given Active Directory Domain Controller service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AlertInner> object if successful. + */ + public PagedList listServerAlerts(final UUID serviceMemberId, final String serviceName) { + ServiceResponse> response = listServerAlertsSinglePageAsync(serviceMemberId, serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listServerAlertsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of an alert for a given Active Directory Domain Controller service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listServerAlertsAsync(final UUID serviceMemberId, final String serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listServerAlertsSinglePageAsync(serviceMemberId, serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listServerAlertsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of an alert for a given Active Directory Domain Controller service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable> listServerAlertsAsync(final UUID serviceMemberId, final String serviceName) { + return listServerAlertsWithServiceResponseAsync(serviceMemberId, serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of an alert for a given Active Directory Domain Controller service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable>> listServerAlertsWithServiceResponseAsync(final UUID serviceMemberId, final String serviceName) { + return listServerAlertsSinglePageAsync(serviceMemberId, serviceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listServerAlertsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the details of an alert for a given Active Directory Domain Controller service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AlertInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listServerAlertsSinglePageAsync(final UUID serviceMemberId, final String serviceName) { + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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; + final String state = null; + final DateTime from = null; + final DateTime to = null; + return service.listServerAlerts(serviceMemberId, serviceName, filter, state, from, to, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listServerAlertsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the details of an alert for a given Active Directory Domain Controller service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @param filter The alert property filter to apply. + * @param state The alert state to query for. + * @param from The start date to query for. + * @param to The end date till when to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AlertInner> object if successful. + */ + public PagedList listServerAlerts(final UUID serviceMemberId, final String serviceName, final String filter, final String state, final DateTime from, final DateTime to) { + ServiceResponse> response = listServerAlertsSinglePageAsync(serviceMemberId, serviceName, filter, state, from, to).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listServerAlertsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of an alert for a given Active Directory Domain Controller service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @param filter The alert property filter to apply. + * @param state The alert state to query for. + * @param from The start date to query for. + * @param to The end date till when to query 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> listServerAlertsAsync(final UUID serviceMemberId, final String serviceName, final String filter, final String state, final DateTime from, final DateTime to, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listServerAlertsSinglePageAsync(serviceMemberId, serviceName, filter, state, from, to), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listServerAlertsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of an alert for a given Active Directory Domain Controller service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @param filter The alert property filter to apply. + * @param state The alert state to query for. + * @param from The start date to query for. + * @param to The end date till when to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable> listServerAlertsAsync(final UUID serviceMemberId, final String serviceName, final String filter, final String state, final DateTime from, final DateTime to) { + return listServerAlertsWithServiceResponseAsync(serviceMemberId, serviceName, filter, state, from, to) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of an alert for a given Active Directory Domain Controller service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @param filter The alert property filter to apply. + * @param state The alert state to query for. + * @param from The start date to query for. + * @param to The end date till when to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable>> listServerAlertsWithServiceResponseAsync(final UUID serviceMemberId, final String serviceName, final String filter, final String state, final DateTime from, final DateTime to) { + return listServerAlertsSinglePageAsync(serviceMemberId, serviceName, filter, state, from, to) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listServerAlertsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the details of an alert for a given Active Directory Domain Controller service and server combination. + * + ServiceResponse> * @param serviceMemberId The server Id for which the alert details needs to be queried. + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param filter The alert property filter to apply. + ServiceResponse> * @param state The alert state to query for. + ServiceResponse> * @param from The start date to query for. + ServiceResponse> * @param to The end date till when to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AlertInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listServerAlertsSinglePageAsync(final UUID serviceMemberId, final String serviceName, final String filter, final String state, final DateTime from, final DateTime to) { + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listServerAlerts(serviceMemberId, serviceName, filter, state, from, to, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listServerAlertsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listServerAlertsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of Active Directory Domain Services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServicePropertiesInner> object if successful. + */ + public PagedList listPremiumServices() { + ServiceResponse> response = listPremiumServicesSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPremiumServicesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of Active Directory Domain Services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPremiumServicesAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPremiumServicesSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPremiumServicesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of Active Directory Domain Services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable> listPremiumServicesAsync() { + return listPremiumServicesWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of Active Directory Domain Services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable>> listPremiumServicesWithServiceResponseAsync() { + return listPremiumServicesSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listPremiumServicesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the details of Active Directory Domain Services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServicePropertiesInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPremiumServicesSinglePageAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final String serviceType = null; + final Integer skipCount = null; + final Integer takeCount = null; + return service.listPremiumServices(filter, serviceType, skipCount, takeCount, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPremiumServicesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the details of Active Directory Domain Services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param filter The service property filter to apply. + * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServicePropertiesInner> object if successful. + */ + public PagedList listPremiumServices(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount) { + ServiceResponse> response = listPremiumServicesSinglePageAsync(filter, serviceType, skipCount, takeCount).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPremiumServicesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of Active Directory Domain Services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param filter The service property filter to apply. + * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPremiumServicesAsync(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPremiumServicesSinglePageAsync(filter, serviceType, skipCount, takeCount), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPremiumServicesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of Active Directory Domain Services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param filter The service property filter to apply. + * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable> listPremiumServicesAsync(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount) { + return listPremiumServicesWithServiceResponseAsync(filter, serviceType, skipCount, takeCount) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of Active Directory Domain Services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param filter The service property filter to apply. + * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable>> listPremiumServicesWithServiceResponseAsync(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount) { + return listPremiumServicesSinglePageAsync(filter, serviceType, skipCount, takeCount) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listPremiumServicesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the details of Active Directory Domain Services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + ServiceResponse> * @param filter The service property filter to apply. + ServiceResponse> * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + ServiceResponse> * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + ServiceResponse> * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServicePropertiesInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPremiumServicesSinglePageAsync(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount) { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listPremiumServices(filter, serviceType, skipCount, takeCount, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPremiumServicesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPremiumServicesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServicePropertiesInner> 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(); + } + }; + } + + /** + * Gets the details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @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); + } + + /** + * Gets the details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> 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)); + } + }); + } + + /** + * Gets the details of Active Directory Domain Service, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServicePropertiesInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ItemInner> object if successful. + */ + public PagedList listMetricsAverageNext(final String nextPageLink) { + ServiceResponse> response = listMetricsAverageNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsAverageNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @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> listMetricsAverageNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsAverageNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsAverageNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable> listMetricsAverageNextAsync(final String nextPageLink) { + return listMetricsAverageNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable>> listMetricsAverageNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricsAverageNextSinglePageAsync(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(listMetricsAverageNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricsAverageNextSinglePageAsync(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.listMetricsAverageNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricsAverageNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsAverageNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ItemInner> object if successful. + */ + public PagedList listMetricsSumNext(final String nextPageLink) { + ServiceResponse> response = listMetricsSumNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsSumNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @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> listMetricsSumNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsSumNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsSumNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable> listMetricsSumNextAsync(final String nextPageLink) { + return listMetricsSumNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable>> listMetricsSumNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricsSumNextSinglePageAsync(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(listMetricsSumNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricsSumNextSinglePageAsync(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.listMetricsSumNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricsSumNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsSumNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the service related metrics information. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<MetricMetadataInner> object if successful. + */ + public PagedList listMetricMetadataNext(final String nextPageLink) { + ServiceResponse> response = listMetricMetadataNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricMetadataNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the service related metrics 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> listMetricMetadataNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricMetadataNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricMetadataNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the service related metrics 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<MetricMetadataInner> object + */ + public Observable> listMetricMetadataNextAsync(final String nextPageLink) { + return listMetricMetadataNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the service related metrics 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<MetricMetadataInner> object + */ + public Observable>> listMetricMetadataNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricMetadataNextSinglePageAsync(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(listMetricMetadataNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the service related metrics 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<MetricMetadataInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricMetadataNextSinglePageAsync(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.listMetricMetadataNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricMetadataNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricMetadataNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of an alert for a given Active Directory Domain Controller service and server combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AlertInner> object if successful. + */ + public PagedList listServerAlertsNext(final String nextPageLink) { + ServiceResponse> response = listServerAlertsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listServerAlertsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of an alert for a given Active Directory Domain Controller service and server combination. + * + * @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> listServerAlertsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listServerAlertsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listServerAlertsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of an alert for a given Active Directory Domain Controller service and server combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable> listServerAlertsNextAsync(final String nextPageLink) { + return listServerAlertsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of an alert for a given Active Directory Domain Controller service and server combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable>> listServerAlertsNextWithServiceResponseAsync(final String nextPageLink) { + return listServerAlertsNextSinglePageAsync(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(listServerAlertsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the details of an alert for a given Active Directory Domain Controller service and server combination. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AlertInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listServerAlertsNextSinglePageAsync(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.listServerAlertsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listServerAlertsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listServerAlertsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of Active Directory Domain Services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServicePropertiesInner> object if successful. + */ + public PagedList listPremiumServicesNext(final String nextPageLink) { + ServiceResponse> response = listPremiumServicesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPremiumServicesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of Active Directory Domain Services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @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> listPremiumServicesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPremiumServicesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPremiumServicesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of Active Directory Domain Services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable> listPremiumServicesNextAsync(final String nextPageLink) { + return listPremiumServicesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of Active Directory Domain Services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable>> listPremiumServicesNextWithServiceResponseAsync(final String nextPageLink) { + return listPremiumServicesNextSinglePageAsync(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(listPremiumServicesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the details of Active Directory Domain Services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServicePropertiesInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPremiumServicesNextSinglePageAsync(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.listPremiumServicesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPremiumServicesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPremiumServicesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesReplicationStatusImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesReplicationStatusImpl.java new file mode 100644 index 0000000000000..3d7ebfe230a7d --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesReplicationStatusImpl.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. + * abc + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServicesReplicationStatus; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ReplicationStatus; + +class AddsServicesReplicationStatusImpl extends WrapperImpl implements AddsServicesReplicationStatus { + private final ADHybridHealthServiceManager manager; + + AddsServicesReplicationStatusImpl(ADHybridHealthServiceManager manager) { + super(manager.inner().addsServicesReplicationStatus()); + this.manager = manager; + } + + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public Observable getAsync(String serviceName) { + AddsServicesReplicationStatusInner client = this.inner(); + return client.getAsync(serviceName) + .map(new Func1() { + @Override + public ReplicationStatus call(ReplicationStatusInner inner) { + return new ReplicationStatusImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesReplicationStatusInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesReplicationStatusInner.java new file mode 100644 index 0000000000000..1e4e7cc3918a4 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesReplicationStatusInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in AddsServicesReplicationStatus. + */ +public class AddsServicesReplicationStatusInner { + /** The Retrofit service to perform REST calls. */ + private AddsServicesReplicationStatusService service; + /** The service client containing this operation class. */ + private ADHybridHealthServiceImpl client; + + /** + * Initializes an instance of AddsServicesReplicationStatusInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AddsServicesReplicationStatusInner(Retrofit retrofit, ADHybridHealthServiceImpl client) { + this.service = retrofit.create(AddsServicesReplicationStatusService.class); + this.client = client; + } + + /** + * The interface defining all the services for AddsServicesReplicationStatus to be + * used by Retrofit to perform actually REST calls. + */ + interface AddsServicesReplicationStatusService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServicesReplicationStatus get" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/replicationstatus") + Observable> get(@Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets Replication status for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ReplicationStatusInner object if successful. + */ + public ReplicationStatusInner get(String serviceName) { + return getWithServiceResponseAsync(serviceName).toBlocking().single().body(); + } + + /** + * Gets Replication status for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param serviceCallback 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 serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(serviceName), serviceCallback); + } + + /** + * Gets Replication status for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationStatusInner object + */ + public Observable getAsync(String serviceName) { + return getWithServiceResponseAsync(serviceName).map(new Func1, ReplicationStatusInner>() { + @Override + public ReplicationStatusInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets Replication status for a given Active Directory Domain Service, that is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ReplicationStatusInner object + */ + public Observable> getWithServiceResponseAsync(String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required 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(serviceName, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesServiceMembersImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesServiceMembersImpl.java new file mode 100644 index 0000000000000..9ff2b2d28cb68 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesServiceMembersImpl.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. + * abc + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServicesServiceMembers; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceServiceMemberModel; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceServiceMember; + +class AddsServicesServiceMembersImpl extends WrapperImpl implements AddsServicesServiceMembers { + private final ADHybridHealthServiceManager manager; + + AddsServicesServiceMembersImpl(ADHybridHealthServiceManager manager) { + super(manager.inner().addsServicesServiceMembers()); + this.manager = manager; + } + + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + private AddsserviceServiceMemberModelImpl wrapAddsserviceServiceMemberModelModel(ServiceMemberInner inner) { + return new AddsserviceServiceMemberModelImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String serviceName) { + AddsServicesServiceMembersInner client = this.inner(); + return client.listAsync(serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AddsserviceServiceMemberModel call(ServiceMemberInner inner) { + return wrapAddsserviceServiceMemberModelModel(inner); + } + }); + } + + @Override + public Observable addAsync(String serviceName, ServiceMemberInner serviceMember) { + AddsServicesServiceMembersInner client = this.inner(); + return client.addAsync(serviceName, serviceMember) + .map(new Func1() { + @Override + public AddsserviceServiceMember call(ServiceMemberInner inner) { + return new AddsserviceServiceMemberImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesServiceMembersInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesServiceMembersInner.java new file mode 100644 index 0000000000000..b5b5d92605435 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesServiceMembersInner.java @@ -0,0 +1,507 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in AddsServicesServiceMembers. + */ +public class AddsServicesServiceMembersInner { + /** The Retrofit service to perform REST calls. */ + private AddsServicesServiceMembersService service; + /** The service client containing this operation class. */ + private ADHybridHealthServiceImpl client; + + /** + * Initializes an instance of AddsServicesServiceMembersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AddsServicesServiceMembersInner(Retrofit retrofit, ADHybridHealthServiceImpl client) { + this.service = retrofit.create(AddsServicesServiceMembersService.class); + this.client = client; + } + + /** + * The interface defining all the services for AddsServicesServiceMembers to be + * used by Retrofit to perform actually REST calls. + */ + interface AddsServicesServiceMembersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServicesServiceMembers list" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/servicemembers") + Observable> list(@Path("serviceName") String serviceName, @Query("$filter") String filter, @Query("dimensionType") String dimensionType, @Query("dimensionSignature") String dimensionSignature, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServicesServiceMembers add" }) + @POST("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/servicemembers") + Observable> add(@Path("serviceName") String serviceName, @Body ServiceMemberInner serviceMember, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServicesServiceMembers listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServiceMemberInner> object if successful. + */ + public PagedList list(final String serviceName) { + ServiceResponse> response = listSinglePageAsync(serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceCallback 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 serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceMemberInner> object + */ + public Observable> listAsync(final String serviceName) { + return listWithServiceResponseAsync(serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceMemberInner> object + */ + public Observable>> listWithServiceResponseAsync(final String serviceName) { + return listSinglePageAsync(serviceName) + .concatMap(new Func1>, 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)); + } + }); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceMemberInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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; + final String dimensionType = null; + final String dimensionSignature = null; + return service.list(serviceName, filter, dimensionType, dimensionSignature, 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); + } + } + }); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param filter The server property filter to apply. + * @param dimensionType The server specific dimension. + * @param dimensionSignature The value of the dimension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServiceMemberInner> object if successful. + */ + public PagedList list(final String serviceName, final String filter, final String dimensionType, final String dimensionSignature) { + ServiceResponse> response = listSinglePageAsync(serviceName, filter, dimensionType, dimensionSignature).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param filter The server property filter to apply. + * @param dimensionType The server specific dimension. + * @param dimensionSignature The value of the dimension. + * @param serviceCallback 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 serviceName, final String filter, final String dimensionType, final String dimensionSignature, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(serviceName, filter, dimensionType, dimensionSignature), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param filter The server property filter to apply. + * @param dimensionType The server specific dimension. + * @param dimensionSignature The value of the dimension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceMemberInner> object + */ + public Observable> listAsync(final String serviceName, final String filter, final String dimensionType, final String dimensionSignature) { + return listWithServiceResponseAsync(serviceName, filter, dimensionType, dimensionSignature) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param filter The server property filter to apply. + * @param dimensionType The server specific dimension. + * @param dimensionSignature The value of the dimension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceMemberInner> object + */ + public Observable>> listWithServiceResponseAsync(final String serviceName, final String filter, final String dimensionType, final String dimensionSignature) { + return listSinglePageAsync(serviceName, filter, dimensionType, dimensionSignature) + .concatMap(new Func1>, 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)); + } + }); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param filter The server property filter to apply. + ServiceResponse> * @param dimensionType The server specific dimension. + ServiceResponse> * @param dimensionSignature The value of the dimension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceMemberInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String serviceName, final String filter, final String dimensionType, final String dimensionSignature) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required 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(serviceName, filter, dimensionType, dimensionSignature, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Onboards a server, for a given Active Directory Domain Controller service, to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service under which the server is to be onboarded. + * @param serviceMember The server object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServiceMemberInner object if successful. + */ + public ServiceMemberInner add(String serviceName, ServiceMemberInner serviceMember) { + return addWithServiceResponseAsync(serviceName, serviceMember).toBlocking().single().body(); + } + + /** + * Onboards a server, for a given Active Directory Domain Controller service, to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service under which the server is to be onboarded. + * @param serviceMember The server 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 addAsync(String serviceName, ServiceMemberInner serviceMember, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addWithServiceResponseAsync(serviceName, serviceMember), serviceCallback); + } + + /** + * Onboards a server, for a given Active Directory Domain Controller service, to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service under which the server is to be onboarded. + * @param serviceMember The server object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceMemberInner object + */ + public Observable addAsync(String serviceName, ServiceMemberInner serviceMember) { + return addWithServiceResponseAsync(serviceName, serviceMember).map(new Func1, ServiceMemberInner>() { + @Override + public ServiceMemberInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Onboards a server, for a given Active Directory Domain Controller service, to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service under which the server is to be onboarded. + * @param serviceMember The server object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceMemberInner object + */ + public Observable> addWithServiceResponseAsync(String serviceName, ServiceMemberInner serviceMember) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMember == null) { + throw new IllegalArgumentException("Parameter serviceMember 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(serviceMember); + return service.add(serviceName, serviceMember, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse addDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServiceMemberInner> 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(); + } + }; + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @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); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceMemberInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceMemberInner> 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)); + } + }); + } + + /** + * Gets the details of the servers, for a given Active Directory Domain Controller service, that are onboarded to Azure Active Directory Connect Health Service. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceMemberInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesUserPreferencesImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesUserPreferencesImpl.java new file mode 100644 index 0000000000000..480bf10f25986 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesUserPreferencesImpl.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. + * abc + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServicesUserPreferences; +import rx.Completable; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.UserPreference; + +class AddsServicesUserPreferencesImpl extends WrapperImpl implements AddsServicesUserPreferences { + private final ADHybridHealthServiceManager manager; + + AddsServicesUserPreferencesImpl(ADHybridHealthServiceManager manager) { + super(manager.inner().addsServicesUserPreferences()); + this.manager = manager; + } + + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public Observable getAsync(String serviceName, String featureName) { + AddsServicesUserPreferencesInner client = this.inner(); + return client.getAsync(serviceName, featureName) + .map(new Func1() { + @Override + public UserPreference call(UserPreferenceInner inner) { + return new UserPreferenceImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteAsync(String serviceName, String featureName) { + AddsServicesUserPreferencesInner client = this.inner(); + return client.deleteAsync(serviceName, featureName).toCompletable(); + } + + @Override + public Completable addAsync(String serviceName, String featureName) { + AddsServicesUserPreferencesInner client = this.inner(); + return client.addAsync(serviceName, featureName).toCompletable(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesUserPreferencesInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesUserPreferencesInner.java new file mode 100644 index 0000000000000..0db6874039f6c --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsServicesUserPreferencesInner.java @@ -0,0 +1,406 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +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.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in AddsServicesUserPreferences. + */ +public class AddsServicesUserPreferencesInner implements InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private AddsServicesUserPreferencesService service; + /** The service client containing this operation class. */ + private ADHybridHealthServiceImpl client; + + /** + * Initializes an instance of AddsServicesUserPreferencesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AddsServicesUserPreferencesInner(Retrofit retrofit, ADHybridHealthServiceImpl client) { + this.service = retrofit.create(AddsServicesUserPreferencesService.class); + this.client = client; + } + + /** + * The interface defining all the services for AddsServicesUserPreferences to be + * used by Retrofit to perform actually REST calls. + */ + interface AddsServicesUserPreferencesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServicesUserPreferences get" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/features/{featureName}/userpreference") + Observable> get(@Path("serviceName") String serviceName, @Path("featureName") String featureName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServicesUserPreferences delete" }) + @HTTP(path = "providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/features/{featureName}/userpreference", method = "DELETE", hasBody = true) + Observable> delete(@Path("serviceName") String serviceName, @Path("featureName") String featureName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsServicesUserPreferences add" }) + @POST("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/features/{featureName}/userpreference") + Observable> add(@Path("serviceName") String serviceName, @Path("featureName") String featureName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UserPreferenceInner setting, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the UserPreferenceInner object if successful. + */ + public UserPreferenceInner get(String serviceName, String featureName) { + return getWithServiceResponseAsync(serviceName, featureName).toBlocking().single().body(); + } + + /** + * Gets the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @param serviceCallback 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 serviceName, String featureName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(serviceName, featureName), serviceCallback); + } + + /** + * Gets the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the UserPreferenceInner object + */ + public Observable getAsync(String serviceName, String featureName) { + return getWithServiceResponseAsync(serviceName, featureName).map(new Func1, UserPreferenceInner>() { + @Override + public UserPreferenceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the UserPreferenceInner object + */ + public Observable> getWithServiceResponseAsync(String serviceName, String featureName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (featureName == null) { + throw new IllegalArgumentException("Parameter featureName is required 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(serviceName, featureName, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String serviceName, String featureName) { + deleteWithServiceResponseAsync(serviceName, featureName).toBlocking().single().body(); + } + + /** + * Deletes the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @param serviceCallback 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 serviceName, String featureName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(serviceName, featureName), serviceCallback); + } + + /** + * Deletes the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String serviceName, String featureName) { + return deleteWithServiceResponseAsync(serviceName, featureName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String serviceName, String featureName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (featureName == null) { + throw new IllegalArgumentException("Parameter featureName is required 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(serviceName, featureName, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Adds the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void add(String serviceName, String featureName) { + addWithServiceResponseAsync(serviceName, featureName).toBlocking().single().body(); + } + + /** + * Adds the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addAsync(String serviceName, String featureName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addWithServiceResponseAsync(serviceName, featureName), serviceCallback); + } + + /** + * Adds the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable addAsync(String serviceName, String featureName) { + return addWithServiceResponseAsync(serviceName, featureName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Adds the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> addWithServiceResponseAsync(String serviceName, String featureName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (featureName == null) { + throw new IllegalArgumentException("Parameter featureName 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 List metricNames = null; + UserPreferenceInner setting = new UserPreferenceInner(); + setting.withMetricNames(null); + return service.add(serviceName, featureName, this.client.apiVersion(), this.client.acceptLanguage(), setting, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Adds the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @param metricNames The name of the metric. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void add(String serviceName, String featureName, List metricNames) { + addWithServiceResponseAsync(serviceName, featureName, metricNames).toBlocking().single().body(); + } + + /** + * Adds the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @param metricNames The name of the metric. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addAsync(String serviceName, String featureName, List metricNames, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addWithServiceResponseAsync(serviceName, featureName, metricNames), serviceCallback); + } + + /** + * Adds the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @param metricNames The name of the metric. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable addAsync(String serviceName, String featureName, List metricNames) { + return addWithServiceResponseAsync(serviceName, featureName, metricNames).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Adds the user preferences for a given feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @param metricNames The name of the metric. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> addWithServiceResponseAsync(String serviceName, String featureName, List metricNames) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (featureName == null) { + throw new IllegalArgumentException("Parameter featureName 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(metricNames); + UserPreferenceInner setting = new UserPreferenceInner(); + setting.withMetricNames(metricNames); + return service.add(serviceName, featureName, this.client.apiVersion(), this.client.acceptLanguage(), setting, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse addDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceAddsServiceMemberImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceAddsServiceMemberImpl.java new file mode 100644 index 0000000000000..88d177c62729e --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceAddsServiceMemberImpl.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceAddsServiceMember; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; +import org.joda.time.DateTime; +import java.util.ArrayList; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceItem; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Hotfix; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MonitoringLevel; + +class AddsserviceAddsServiceMemberImpl extends WrapperImpl implements AddsserviceAddsServiceMember { + private final ADHybridHealthServiceManager manager; + + AddsserviceAddsServiceMemberImpl(AddsServiceMemberInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public Integer activeAlerts() { + return this.inner().activeAlerts(); + } + + @Override + public String additionalInformation() { + return this.inner().additionalInformation(); + } + + @Override + public List addsRoles() { + return this.inner().addsRoles(); + } + + @Override + public DateTime createdDate() { + return this.inner().createdDate(); + } + + @Override + public List dcTypes() { + return this.inner().dcTypes(); + } + + @Override + public List dimensions() { + List lst = new ArrayList(); + if (this.inner().dimensions() != null) { + for (ItemInner inner : this.inner().dimensions()) { + lst.add( new ServiceItemImpl(inner, manager())); + } + } + return lst; + } + + @Override + public Boolean disabled() { + return this.inner().disabled(); + } + + @Override + public Integer disabledReason() { + return this.inner().disabledReason(); + } + + @Override + public String domainName() { + return this.inner().domainName(); + } + + @Override + public Boolean gcReachable() { + return this.inner().gcReachable(); + } + + @Override + public List installedQfes() { + return this.inner().installedQfes(); + } + + @Override + public Boolean isAdvertising() { + return this.inner().isAdvertising(); + } + + @Override + public DateTime lastDisabled() { + return this.inner().lastDisabled(); + } + + @Override + public DateTime lastReboot() { + return this.inner().lastReboot(); + } + + @Override + public DateTime lastServerReportedMonitoringLevelChange() { + return this.inner().lastServerReportedMonitoringLevelChange(); + } + + @Override + public DateTime lastUpdated() { + return this.inner().lastUpdated(); + } + + @Override + public String machineId() { + return this.inner().machineId(); + } + + @Override + public String machineName() { + return this.inner().machineName(); + } + + @Override + public List monitoringConfigurationsComputed() { + List lst = new ArrayList(); + if (this.inner().monitoringConfigurationsComputed() != null) { + for (ItemInner inner : this.inner().monitoringConfigurationsComputed()) { + lst.add( new ServiceItemImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List monitoringConfigurationsCustomized() { + List lst = new ArrayList(); + if (this.inner().monitoringConfigurationsCustomized() != null) { + for (ItemInner inner : this.inner().monitoringConfigurationsCustomized()) { + lst.add( new ServiceItemImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String osName() { + return this.inner().osName(); + } + + @Override + public String osVersion() { + return this.inner().osVersion(); + } + + @Override + public Boolean pdcReachable() { + return this.inner().pdcReachable(); + } + + @Override + public List properties() { + List lst = new ArrayList(); + if (this.inner().properties() != null) { + for (ItemInner inner : this.inner().properties()) { + lst.add( new ServiceItemImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List recommendedQfes() { + return this.inner().recommendedQfes(); + } + + @Override + public Integer resolvedAlerts() { + return this.inner().resolvedAlerts(); + } + + @Override + public String role() { + return this.inner().role(); + } + + @Override + public MonitoringLevel serverReportedMonitoringLevel() { + return this.inner().serverReportedMonitoringLevel(); + } + + @Override + public String serviceId() { + return this.inner().serviceId(); + } + + @Override + public String serviceMemberId() { + return this.inner().serviceMemberId(); + } + + @Override + public String siteName() { + return this.inner().siteName(); + } + + @Override + public String status() { + return this.inner().status(); + } + + @Override + public Boolean sysvolState() { + return this.inner().sysvolState(); + } + + @Override + public String tenantId() { + return this.inner().tenantId(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceAddsServiceMemberModelImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceAddsServiceMemberModelImpl.java new file mode 100644 index 0000000000000..59cfe2443e752 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceAddsServiceMemberModelImpl.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceAddsServiceMemberModel; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; +import org.joda.time.DateTime; +import java.util.ArrayList; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceItem; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Hotfix; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MonitoringLevel; + +class AddsserviceAddsServiceMemberModelImpl extends WrapperImpl implements AddsserviceAddsServiceMemberModel { + private final ADHybridHealthServiceManager manager; + + AddsserviceAddsServiceMemberModelImpl(AddsServiceMemberInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public Integer activeAlerts() { + return this.inner().activeAlerts(); + } + + @Override + public String additionalInformation() { + return this.inner().additionalInformation(); + } + + @Override + public List addsRoles() { + return this.inner().addsRoles(); + } + + @Override + public DateTime createdDate() { + return this.inner().createdDate(); + } + + @Override + public List dcTypes() { + return this.inner().dcTypes(); + } + + @Override + public List dimensions() { + List lst = new ArrayList(); + if (this.inner().dimensions() != null) { + for (ItemInner inner : this.inner().dimensions()) { + lst.add( new ServiceItemImpl(inner, manager())); + } + } + return lst; + } + + @Override + public Boolean disabled() { + return this.inner().disabled(); + } + + @Override + public Integer disabledReason() { + return this.inner().disabledReason(); + } + + @Override + public String domainName() { + return this.inner().domainName(); + } + + @Override + public Boolean gcReachable() { + return this.inner().gcReachable(); + } + + @Override + public List installedQfes() { + return this.inner().installedQfes(); + } + + @Override + public Boolean isAdvertising() { + return this.inner().isAdvertising(); + } + + @Override + public DateTime lastDisabled() { + return this.inner().lastDisabled(); + } + + @Override + public DateTime lastReboot() { + return this.inner().lastReboot(); + } + + @Override + public DateTime lastServerReportedMonitoringLevelChange() { + return this.inner().lastServerReportedMonitoringLevelChange(); + } + + @Override + public DateTime lastUpdated() { + return this.inner().lastUpdated(); + } + + @Override + public String machineId() { + return this.inner().machineId(); + } + + @Override + public String machineName() { + return this.inner().machineName(); + } + + @Override + public List monitoringConfigurationsComputed() { + List lst = new ArrayList(); + if (this.inner().monitoringConfigurationsComputed() != null) { + for (ItemInner inner : this.inner().monitoringConfigurationsComputed()) { + lst.add( new ServiceItemImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List monitoringConfigurationsCustomized() { + List lst = new ArrayList(); + if (this.inner().monitoringConfigurationsCustomized() != null) { + for (ItemInner inner : this.inner().monitoringConfigurationsCustomized()) { + lst.add( new ServiceItemImpl(inner, manager())); + } + } + return lst; + } + + @Override + public String osName() { + return this.inner().osName(); + } + + @Override + public String osVersion() { + return this.inner().osVersion(); + } + + @Override + public Boolean pdcReachable() { + return this.inner().pdcReachable(); + } + + @Override + public List properties() { + List lst = new ArrayList(); + if (this.inner().properties() != null) { + for (ItemInner inner : this.inner().properties()) { + lst.add( new ServiceItemImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List recommendedQfes() { + return this.inner().recommendedQfes(); + } + + @Override + public Integer resolvedAlerts() { + return this.inner().resolvedAlerts(); + } + + @Override + public String role() { + return this.inner().role(); + } + + @Override + public MonitoringLevel serverReportedMonitoringLevel() { + return this.inner().serverReportedMonitoringLevel(); + } + + @Override + public String serviceId() { + return this.inner().serviceId(); + } + + @Override + public String serviceMemberId() { + return this.inner().serviceMemberId(); + } + + @Override + public String siteName() { + return this.inner().siteName(); + } + + @Override + public String status() { + return this.inner().status(); + } + + @Override + public Boolean sysvolState() { + return this.inner().sysvolState(); + } + + @Override + public String tenantId() { + return this.inner().tenantId(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceAlertImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceAlertImpl.java new file mode 100644 index 0000000000000..963d3547416df --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceAlertImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceAlert; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.ArrayList; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceItem; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AdditionalInformation; +import java.util.UUID; +import org.joda.time.DateTime; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Level; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.HelpLink; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.State; + +class AddsserviceAlertImpl extends WrapperImpl implements AddsserviceAlert { + private final ADHybridHealthServiceManager manager; + + AddsserviceAlertImpl(AlertInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public List activeAlertProperties() { + List lst = new ArrayList(); + if (this.inner().activeAlertProperties() != null) { + for (ItemInner inner : this.inner().activeAlertProperties()) { + lst.add( new ServiceItemImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List additionalInformation() { + return this.inner().additionalInformation(); + } + + @Override + public UUID alertId() { + return this.inner().alertId(); + } + + @Override + public DateTime createdDate() { + return this.inner().createdDate(); + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public DateTime lastUpdated() { + return this.inner().lastUpdated(); + } + + @Override + public Level level() { + return this.inner().level(); + } + + @Override + public String monitorRoleType() { + return this.inner().monitorRoleType(); + } + + @Override + public List relatedLinks() { + return this.inner().relatedLinks(); + } + + @Override + public String remediation() { + return this.inner().remediation(); + } + + @Override + public List resolvedAlertProperties() { + List lst = new ArrayList(); + if (this.inner().resolvedAlertProperties() != null) { + for (ItemInner inner : this.inner().resolvedAlertProperties()) { + lst.add( new ServiceItemImpl(inner, manager())); + } + } + return lst; + } + + @Override + public DateTime resolvedDate() { + return this.inner().resolvedDate(); + } + + @Override + public String scope() { + return this.inner().scope(); + } + + @Override + public UUID serviceId() { + return this.inner().serviceId(); + } + + @Override + public UUID serviceMemberId() { + return this.inner().serviceMemberId(); + } + + @Override + public String shortName() { + return this.inner().shortName(); + } + + @Override + public State state() { + return this.inner().state(); + } + + @Override + public UUID tenantId() { + return this.inner().tenantId(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceCredentialImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceCredentialImpl.java new file mode 100644 index 0000000000000..a683b018aa2f5 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceCredentialImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceCredential; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; + +class AddsserviceCredentialImpl extends WrapperImpl implements AddsserviceCredential { + private final ADHybridHealthServiceManager manager; + + AddsserviceCredentialImpl(CredentialInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public List credentialData() { + return this.inner().credentialData(); + } + + @Override + public String identifier() { + return this.inner().identifier(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceMetricSetsImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceMetricSetsImpl.java new file mode 100644 index 0000000000000..f44860fd1631b --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceMetricSetsImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceMetricSets; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MetricSet; +import org.joda.time.DateTime; + +class AddsserviceMetricSetsImpl extends WrapperImpl implements AddsserviceMetricSets { + private final ADHybridHealthServiceManager manager; + private String serviceName; + private String metricName; + private String groupName; + + AddsserviceMetricSetsImpl(MetricSetsInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public List sets() { + return this.inner().sets(); + } + + @Override + public List timeStamps() { + return this.inner().timeStamps(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceServiceMemberImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceServiceMemberImpl.java new file mode 100644 index 0000000000000..6e82bca752811 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceServiceMemberImpl.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceServiceMember; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MonitoringLevel; + +class AddsserviceServiceMemberImpl extends WrapperImpl implements AddsserviceServiceMember { + private final ADHybridHealthServiceManager manager; + private String serviceName; + private UUID serviceMemberId; + + AddsserviceServiceMemberImpl(ServiceMemberInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public Integer activeAlerts() { + return this.inner().activeAlerts(); + } + + @Override + public String additionalInformation() { + return this.inner().additionalInformation(); + } + + @Override + public DateTime createdDate() { + return this.inner().createdDate(); + } + + @Override + public Object dimensions() { + return this.inner().dimensions(); + } + + @Override + public Boolean disabled() { + return this.inner().disabled(); + } + + @Override + public Integer disabledReason() { + return this.inner().disabledReason(); + } + + @Override + public Object installedQfes() { + return this.inner().installedQfes(); + } + + @Override + public DateTime lastDisabled() { + return this.inner().lastDisabled(); + } + + @Override + public DateTime lastReboot() { + return this.inner().lastReboot(); + } + + @Override + public DateTime lastServerReportedMonitoringLevelChange() { + return this.inner().lastServerReportedMonitoringLevelChange(); + } + + @Override + public DateTime lastUpdated() { + return this.inner().lastUpdated(); + } + + @Override + public String machineId() { + return this.inner().machineId(); + } + + @Override + public String machineName() { + return this.inner().machineName(); + } + + @Override + public Object monitoringConfigurationsComputed() { + return this.inner().monitoringConfigurationsComputed(); + } + + @Override + public Object monitoringConfigurationsCustomized() { + return this.inner().monitoringConfigurationsCustomized(); + } + + @Override + public String osName() { + return this.inner().osName(); + } + + @Override + public String osVersion() { + return this.inner().osVersion(); + } + + @Override + public Object properties() { + return this.inner().properties(); + } + + @Override + public Object recommendedQfes() { + return this.inner().recommendedQfes(); + } + + @Override + public Integer resolvedAlerts() { + return this.inner().resolvedAlerts(); + } + + @Override + public String role() { + return this.inner().role(); + } + + @Override + public MonitoringLevel serverReportedMonitoringLevel() { + return this.inner().serverReportedMonitoringLevel(); + } + + @Override + public String serviceId() { + return this.inner().serviceId(); + } + + @Override + public String serviceMemberId() { + return this.inner().serviceMemberId(); + } + + @Override + public String status() { + return this.inner().status(); + } + + @Override + public String tenantId() { + return this.inner().tenantId(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceServiceMemberModelImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceServiceMemberModelImpl.java new file mode 100644 index 0000000000000..e3ca3e525e115 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AddsserviceServiceMemberModelImpl.java @@ -0,0 +1,162 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceServiceMemberModel; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MonitoringLevel; + +class AddsserviceServiceMemberModelImpl extends WrapperImpl implements AddsserviceServiceMemberModel { + private final ADHybridHealthServiceManager manager; + + AddsserviceServiceMemberModelImpl(ServiceMemberInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public Integer activeAlerts() { + return this.inner().activeAlerts(); + } + + @Override + public String additionalInformation() { + return this.inner().additionalInformation(); + } + + @Override + public DateTime createdDate() { + return this.inner().createdDate(); + } + + @Override + public Object dimensions() { + return this.inner().dimensions(); + } + + @Override + public Boolean disabled() { + return this.inner().disabled(); + } + + @Override + public Integer disabledReason() { + return this.inner().disabledReason(); + } + + @Override + public Object installedQfes() { + return this.inner().installedQfes(); + } + + @Override + public DateTime lastDisabled() { + return this.inner().lastDisabled(); + } + + @Override + public DateTime lastReboot() { + return this.inner().lastReboot(); + } + + @Override + public DateTime lastServerReportedMonitoringLevelChange() { + return this.inner().lastServerReportedMonitoringLevelChange(); + } + + @Override + public DateTime lastUpdated() { + return this.inner().lastUpdated(); + } + + @Override + public String machineId() { + return this.inner().machineId(); + } + + @Override + public String machineName() { + return this.inner().machineName(); + } + + @Override + public Object monitoringConfigurationsComputed() { + return this.inner().monitoringConfigurationsComputed(); + } + + @Override + public Object monitoringConfigurationsCustomized() { + return this.inner().monitoringConfigurationsCustomized(); + } + + @Override + public String osName() { + return this.inner().osName(); + } + + @Override + public String osVersion() { + return this.inner().osVersion(); + } + + @Override + public Object properties() { + return this.inner().properties(); + } + + @Override + public Object recommendedQfes() { + return this.inner().recommendedQfes(); + } + + @Override + public Integer resolvedAlerts() { + return this.inner().resolvedAlerts(); + } + + @Override + public String role() { + return this.inner().role(); + } + + @Override + public MonitoringLevel serverReportedMonitoringLevel() { + return this.inner().serverReportedMonitoringLevel(); + } + + @Override + public String serviceId() { + return this.inner().serviceId(); + } + + @Override + public String serviceMemberId() { + return this.inner().serviceMemberId(); + } + + @Override + public String status() { + return this.inner().status(); + } + + @Override + public String tenantId() { + return this.inner().tenantId(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AlertFeedbackImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AlertFeedbackImpl.java new file mode 100644 index 0000000000000..97386a2f33611 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AlertFeedbackImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AlertFeedback; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import org.joda.time.DateTime; + +class AlertFeedbackImpl extends WrapperImpl implements AlertFeedback { + private final ADHybridHealthServiceManager manager; + AlertFeedbackImpl(AlertFeedbackInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public String comment() { + return this.inner().comment(); + } + + @Override + public Boolean consentedToShare() { + return this.inner().consentedToShare(); + } + + @Override + public DateTime createdDate() { + return this.inner().createdDate(); + } + + @Override + public String feedback() { + return this.inner().feedback(); + } + + @Override + public String level() { + return this.inner().level(); + } + + @Override + public String serviceMemberId() { + return this.inner().serviceMemberId(); + } + + @Override + public String shortName() { + return this.inner().shortName(); + } + + @Override + public String state() { + return this.inner().state(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AlertFeedbackInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AlertFeedbackInner.java new file mode 100644 index 0000000000000..a86d9ed9db353 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AlertFeedbackInner.java @@ -0,0 +1,228 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The alert feedback details. + */ +public class AlertFeedbackInner { + /** + * The alert level which indicates the severity of the alert. + */ + @JsonProperty(value = "level") + private String level; + + /** + * The alert state which can be either active or resolved with multiple + * resolution types. + */ + @JsonProperty(value = "state") + private String state; + + /** + * The alert short name. + */ + @JsonProperty(value = "shortName") + private String shortName; + + /** + * The feedback for the alert which indicates if the customer likes or + * dislikes the alert. + */ + @JsonProperty(value = "feedback") + private String feedback; + + /** + * Additional comments related to the alert. + */ + @JsonProperty(value = "comment") + private String comment; + + /** + * Indicates if the alert feedback can be shared from product team. + */ + @JsonProperty(value = "consentedToShare") + private Boolean consentedToShare; + + /** + * The server Id of the alert. + */ + @JsonProperty(value = "serviceMemberId") + private String serviceMemberId; + + /** + * The date and time,in UTC,when the alert was created. + */ + @JsonProperty(value = "createdDate") + private DateTime createdDate; + + /** + * Get the alert level which indicates the severity of the alert. + * + * @return the level value + */ + public String level() { + return this.level; + } + + /** + * Set the alert level which indicates the severity of the alert. + * + * @param level the level value to set + * @return the AlertFeedbackInner object itself. + */ + public AlertFeedbackInner withLevel(String level) { + this.level = level; + return this; + } + + /** + * Get the alert state which can be either active or resolved with multiple resolution types. + * + * @return the state value + */ + public String state() { + return this.state; + } + + /** + * Set the alert state which can be either active or resolved with multiple resolution types. + * + * @param state the state value to set + * @return the AlertFeedbackInner object itself. + */ + public AlertFeedbackInner withState(String state) { + this.state = state; + return this; + } + + /** + * Get the alert short name. + * + * @return the shortName value + */ + public String shortName() { + return this.shortName; + } + + /** + * Set the alert short name. + * + * @param shortName the shortName value to set + * @return the AlertFeedbackInner object itself. + */ + public AlertFeedbackInner withShortName(String shortName) { + this.shortName = shortName; + return this; + } + + /** + * Get the feedback for the alert which indicates if the customer likes or dislikes the alert. + * + * @return the feedback value + */ + public String feedback() { + return this.feedback; + } + + /** + * Set the feedback for the alert which indicates if the customer likes or dislikes the alert. + * + * @param feedback the feedback value to set + * @return the AlertFeedbackInner object itself. + */ + public AlertFeedbackInner withFeedback(String feedback) { + this.feedback = feedback; + return this; + } + + /** + * Get additional comments related to the alert. + * + * @return the comment value + */ + public String comment() { + return this.comment; + } + + /** + * Set additional comments related to the alert. + * + * @param comment the comment value to set + * @return the AlertFeedbackInner object itself. + */ + public AlertFeedbackInner withComment(String comment) { + this.comment = comment; + return this; + } + + /** + * Get indicates if the alert feedback can be shared from product team. + * + * @return the consentedToShare value + */ + public Boolean consentedToShare() { + return this.consentedToShare; + } + + /** + * Set indicates if the alert feedback can be shared from product team. + * + * @param consentedToShare the consentedToShare value to set + * @return the AlertFeedbackInner object itself. + */ + public AlertFeedbackInner withConsentedToShare(Boolean consentedToShare) { + this.consentedToShare = consentedToShare; + return this; + } + + /** + * Get the server Id of the alert. + * + * @return the serviceMemberId value + */ + public String serviceMemberId() { + return this.serviceMemberId; + } + + /** + * Set the server Id of the alert. + * + * @param serviceMemberId the serviceMemberId value to set + * @return the AlertFeedbackInner object itself. + */ + public AlertFeedbackInner withServiceMemberId(String serviceMemberId) { + this.serviceMemberId = serviceMemberId; + return this; + } + + /** + * Get the date and time,in UTC,when the alert was created. + * + * @return the createdDate value + */ + public DateTime createdDate() { + return this.createdDate; + } + + /** + * Set the date and time,in UTC,when the alert was created. + * + * @param createdDate the createdDate value to set + * @return the AlertFeedbackInner object itself. + */ + public AlertFeedbackInner withCreatedDate(DateTime createdDate) { + this.createdDate = createdDate; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AlertInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AlertInner.java new file mode 100644 index 0000000000000..b1461d437bbfc --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AlertInner.java @@ -0,0 +1,523 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import java.util.UUID; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Level; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.State; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.HelpLink; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AdditionalInformation; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The alert details indicating an issue with service or server. + */ +public class AlertInner { + /** + * The alert Id. + */ + @JsonProperty(value = "alertId") + private UUID alertId; + + /** + * The alert level which indicates the severity of the alert. Possible + * values include: 'Warning', 'Error', 'PreWarning'. + */ + @JsonProperty(value = "level") + private Level level; + + /** + * The alert state which can be either active or resolved with multiple + * resolution types. Possible values include: 'Active', + * 'ResolvedByPositiveResult', 'ResolvedManually', 'ResolvedByTimer', + * 'ResolvedByStateChange'. + */ + @JsonProperty(value = "state") + private State state; + + /** + * The alert short name. + */ + @JsonProperty(value = "shortName") + private String shortName; + + /** + * The display name for the alert. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * The alert description. + */ + @JsonProperty(value = "description") + private String description; + + /** + * The alert remediation. + */ + @JsonProperty(value = "remediation") + private String remediation; + + /** + * The help links to get more information related to the alert. + */ + @JsonProperty(value = "relatedLinks") + private List relatedLinks; + + /** + * The scope of the alert. Indicates if it is a service or a server related + * alert. + */ + @JsonProperty(value = "scope") + private String scope; + + /** + * Additional information related to the alert. + */ + @JsonProperty(value = "additionalInformation") + private List additionalInformation; + + /** + * The date and time,in UTC,when the alert was created. + */ + @JsonProperty(value = "createdDate") + private DateTime createdDate; + + /** + * The date and time, in UTC, when the alert was resolved. + */ + @JsonProperty(value = "resolvedDate") + private DateTime resolvedDate; + + /** + * The date and time, in UTC, when the alert was last updated. + */ + @JsonProperty(value = "lastUpdated") + private DateTime lastUpdated; + + /** + * The monitoring role type for which the alert was raised. + */ + @JsonProperty(value = "monitorRoleType") + private String monitorRoleType; + + /** + * The active alert properties. + */ + @JsonProperty(value = "activeAlertProperties") + private List activeAlertProperties; + + /** + * The resolved alert properties. + */ + @JsonProperty(value = "resolvedAlertProperties") + private List resolvedAlertProperties; + + /** + * The tenant Id. + */ + @JsonProperty(value = "tenantId") + private UUID tenantId; + + /** + * The service Id. + */ + @JsonProperty(value = "serviceId") + private UUID serviceId; + + /** + * The server Id. + */ + @JsonProperty(value = "serviceMemberId") + private UUID serviceMemberId; + + /** + * Get the alert Id. + * + * @return the alertId value + */ + public UUID alertId() { + return this.alertId; + } + + /** + * Set the alert Id. + * + * @param alertId the alertId value to set + * @return the AlertInner object itself. + */ + public AlertInner withAlertId(UUID alertId) { + this.alertId = alertId; + return this; + } + + /** + * Get the alert level which indicates the severity of the alert. Possible values include: 'Warning', 'Error', 'PreWarning'. + * + * @return the level value + */ + public Level level() { + return this.level; + } + + /** + * Set the alert level which indicates the severity of the alert. Possible values include: 'Warning', 'Error', 'PreWarning'. + * + * @param level the level value to set + * @return the AlertInner object itself. + */ + public AlertInner withLevel(Level level) { + this.level = level; + return this; + } + + /** + * Get the alert state which can be either active or resolved with multiple resolution types. Possible values include: 'Active', 'ResolvedByPositiveResult', 'ResolvedManually', 'ResolvedByTimer', 'ResolvedByStateChange'. + * + * @return the state value + */ + public State state() { + return this.state; + } + + /** + * Set the alert state which can be either active or resolved with multiple resolution types. Possible values include: 'Active', 'ResolvedByPositiveResult', 'ResolvedManually', 'ResolvedByTimer', 'ResolvedByStateChange'. + * + * @param state the state value to set + * @return the AlertInner object itself. + */ + public AlertInner withState(State state) { + this.state = state; + return this; + } + + /** + * Get the alert short name. + * + * @return the shortName value + */ + public String shortName() { + return this.shortName; + } + + /** + * Set the alert short name. + * + * @param shortName the shortName value to set + * @return the AlertInner object itself. + */ + public AlertInner withShortName(String shortName) { + this.shortName = shortName; + return this; + } + + /** + * Get the display name for the alert. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name for the alert. + * + * @param displayName the displayName value to set + * @return the AlertInner object itself. + */ + public AlertInner withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the alert description. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the alert description. + * + * @param description the description value to set + * @return the AlertInner object itself. + */ + public AlertInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the alert remediation. + * + * @return the remediation value + */ + public String remediation() { + return this.remediation; + } + + /** + * Set the alert remediation. + * + * @param remediation the remediation value to set + * @return the AlertInner object itself. + */ + public AlertInner withRemediation(String remediation) { + this.remediation = remediation; + return this; + } + + /** + * Get the help links to get more information related to the alert. + * + * @return the relatedLinks value + */ + public List relatedLinks() { + return this.relatedLinks; + } + + /** + * Set the help links to get more information related to the alert. + * + * @param relatedLinks the relatedLinks value to set + * @return the AlertInner object itself. + */ + public AlertInner withRelatedLinks(List relatedLinks) { + this.relatedLinks = relatedLinks; + return this; + } + + /** + * Get the scope of the alert. Indicates if it is a service or a server related alert. + * + * @return the scope value + */ + public String scope() { + return this.scope; + } + + /** + * Set the scope of the alert. Indicates if it is a service or a server related alert. + * + * @param scope the scope value to set + * @return the AlertInner object itself. + */ + public AlertInner withScope(String scope) { + this.scope = scope; + return this; + } + + /** + * Get additional information related to the alert. + * + * @return the additionalInformation value + */ + public List additionalInformation() { + return this.additionalInformation; + } + + /** + * Set additional information related to the alert. + * + * @param additionalInformation the additionalInformation value to set + * @return the AlertInner object itself. + */ + public AlertInner withAdditionalInformation(List additionalInformation) { + this.additionalInformation = additionalInformation; + return this; + } + + /** + * Get the date and time,in UTC,when the alert was created. + * + * @return the createdDate value + */ + public DateTime createdDate() { + return this.createdDate; + } + + /** + * Set the date and time,in UTC,when the alert was created. + * + * @param createdDate the createdDate value to set + * @return the AlertInner object itself. + */ + public AlertInner withCreatedDate(DateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get the date and time, in UTC, when the alert was resolved. + * + * @return the resolvedDate value + */ + public DateTime resolvedDate() { + return this.resolvedDate; + } + + /** + * Set the date and time, in UTC, when the alert was resolved. + * + * @param resolvedDate the resolvedDate value to set + * @return the AlertInner object itself. + */ + public AlertInner withResolvedDate(DateTime resolvedDate) { + this.resolvedDate = resolvedDate; + return this; + } + + /** + * Get the date and time, in UTC, when the alert was last updated. + * + * @return the lastUpdated value + */ + public DateTime lastUpdated() { + return this.lastUpdated; + } + + /** + * Set the date and time, in UTC, when the alert was last updated. + * + * @param lastUpdated the lastUpdated value to set + * @return the AlertInner object itself. + */ + public AlertInner withLastUpdated(DateTime lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Get the monitoring role type for which the alert was raised. + * + * @return the monitorRoleType value + */ + public String monitorRoleType() { + return this.monitorRoleType; + } + + /** + * Set the monitoring role type for which the alert was raised. + * + * @param monitorRoleType the monitorRoleType value to set + * @return the AlertInner object itself. + */ + public AlertInner withMonitorRoleType(String monitorRoleType) { + this.monitorRoleType = monitorRoleType; + return this; + } + + /** + * Get the active alert properties. + * + * @return the activeAlertProperties value + */ + public List activeAlertProperties() { + return this.activeAlertProperties; + } + + /** + * Set the active alert properties. + * + * @param activeAlertProperties the activeAlertProperties value to set + * @return the AlertInner object itself. + */ + public AlertInner withActiveAlertProperties(List activeAlertProperties) { + this.activeAlertProperties = activeAlertProperties; + return this; + } + + /** + * Get the resolved alert properties. + * + * @return the resolvedAlertProperties value + */ + public List resolvedAlertProperties() { + return this.resolvedAlertProperties; + } + + /** + * Set the resolved alert properties. + * + * @param resolvedAlertProperties the resolvedAlertProperties value to set + * @return the AlertInner object itself. + */ + public AlertInner withResolvedAlertProperties(List resolvedAlertProperties) { + this.resolvedAlertProperties = resolvedAlertProperties; + return this; + } + + /** + * Get the tenant Id. + * + * @return the tenantId value + */ + public UUID tenantId() { + return this.tenantId; + } + + /** + * Set the tenant Id. + * + * @param tenantId the tenantId value to set + * @return the AlertInner object itself. + */ + public AlertInner withTenantId(UUID tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the service Id. + * + * @return the serviceId value + */ + public UUID serviceId() { + return this.serviceId; + } + + /** + * Set the service Id. + * + * @param serviceId the serviceId value to set + * @return the AlertInner object itself. + */ + public AlertInner withServiceId(UUID serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * Get the server Id. + * + * @return the serviceMemberId value + */ + public UUID serviceMemberId() { + return this.serviceMemberId; + } + + /** + * Set the server Id. + * + * @param serviceMemberId the serviceMemberId value to set + * @return the AlertInner object itself. + */ + public AlertInner withServiceMemberId(UUID serviceMemberId) { + this.serviceMemberId = serviceMemberId; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AlertsImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AlertsImpl.java new file mode 100644 index 0000000000000..b40883c15da8f --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AlertsImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Alerts; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceAlert; + +class AlertsImpl extends WrapperImpl implements Alerts { + private final ADHybridHealthServiceManager manager; + + AlertsImpl(ADHybridHealthServiceManager manager) { + super(manager.inner().alerts()); + this.manager = manager; + } + + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + private AddsserviceAlertImpl wrapModel(AlertInner inner) { + return new AddsserviceAlertImpl(inner, manager()); + } + + @Override + public Observable listAddsAlertsAsync(final String serviceName) { + AlertsInner client = this.inner(); + return client.listAddsAlertsAsync(serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AddsserviceAlert call(AlertInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AlertsInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AlertsInner.java new file mode 100644 index 0000000000000..ee01ec18e6ece --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/AlertsInner.java @@ -0,0 +1,422 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import org.joda.time.DateTime; +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 Alerts. + */ +public class AlertsInner { + /** The Retrofit service to perform REST calls. */ + private AlertsService service; + /** The service client containing this operation class. */ + private ADHybridHealthServiceImpl client; + + /** + * Initializes an instance of AlertsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public AlertsInner(Retrofit retrofit, ADHybridHealthServiceImpl client) { + this.service = retrofit.create(AlertsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Alerts to be + * used by Retrofit to perform actually REST calls. + */ + interface AlertsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Alerts listAddsAlerts" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/alerts") + Observable> listAddsAlerts(@Path("serviceName") String serviceName, @Query("$filter") String filter, @Query("state") String state, @Query("from") DateTime from, @Query("to") DateTime to, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Alerts listAddsAlertsNext" }) + @GET + Observable> listAddsAlertsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the alerts for a given Active Directory Domain Service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AlertInner> object if successful. + */ + public PagedList listAddsAlerts(final String serviceName) { + ServiceResponse> response = listAddsAlertsSinglePageAsync(serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAddsAlertsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the alerts for a given Active Directory Domain Service. + * + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAddsAlertsAsync(final String serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAddsAlertsSinglePageAsync(serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAddsAlertsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the alerts for a given Active Directory Domain Service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable> listAddsAlertsAsync(final String serviceName) { + return listAddsAlertsWithServiceResponseAsync(serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the alerts for a given Active Directory Domain Service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable>> listAddsAlertsWithServiceResponseAsync(final String serviceName) { + return listAddsAlertsSinglePageAsync(serviceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAddsAlertsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the alerts for a given Active Directory Domain Service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AlertInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAddsAlertsSinglePageAsync(final String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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; + final String state = null; + final DateTime from = null; + final DateTime to = null; + return service.listAddsAlerts(serviceName, filter, state, from, to, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAddsAlertsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the alerts for a given Active Directory Domain Service. + * + * @param serviceName The name of the service. + * @param filter The alert property filter to apply. + * @param state The alert state to query for. + * @param from The start date to query for. + * @param to The end date till when to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AlertInner> object if successful. + */ + public PagedList listAddsAlerts(final String serviceName, final String filter, final String state, final DateTime from, final DateTime to) { + ServiceResponse> response = listAddsAlertsSinglePageAsync(serviceName, filter, state, from, to).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAddsAlertsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the alerts for a given Active Directory Domain Service. + * + * @param serviceName The name of the service. + * @param filter The alert property filter to apply. + * @param state The alert state to query for. + * @param from The start date to query for. + * @param to The end date till when to query 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> listAddsAlertsAsync(final String serviceName, final String filter, final String state, final DateTime from, final DateTime to, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAddsAlertsSinglePageAsync(serviceName, filter, state, from, to), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAddsAlertsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the alerts for a given Active Directory Domain Service. + * + * @param serviceName The name of the service. + * @param filter The alert property filter to apply. + * @param state The alert state to query for. + * @param from The start date to query for. + * @param to The end date till when to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable> listAddsAlertsAsync(final String serviceName, final String filter, final String state, final DateTime from, final DateTime to) { + return listAddsAlertsWithServiceResponseAsync(serviceName, filter, state, from, to) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the alerts for a given Active Directory Domain Service. + * + * @param serviceName The name of the service. + * @param filter The alert property filter to apply. + * @param state The alert state to query for. + * @param from The start date to query for. + * @param to The end date till when to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable>> listAddsAlertsWithServiceResponseAsync(final String serviceName, final String filter, final String state, final DateTime from, final DateTime to) { + return listAddsAlertsSinglePageAsync(serviceName, filter, state, from, to) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAddsAlertsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the alerts for a given Active Directory Domain Service. + * + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param filter The alert property filter to apply. + ServiceResponse> * @param state The alert state to query for. + ServiceResponse> * @param from The start date to query for. + ServiceResponse> * @param to The end date till when to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AlertInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAddsAlertsSinglePageAsync(final String serviceName, final String filter, final String state, final DateTime from, final DateTime to) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listAddsAlerts(serviceName, filter, state, from, to, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAddsAlertsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAddsAlertsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the alerts for a given Active Directory Domain Service. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AlertInner> object if successful. + */ + public PagedList listAddsAlertsNext(final String nextPageLink) { + ServiceResponse> response = listAddsAlertsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAddsAlertsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the alerts for a given Active Directory Domain Service. + * + * @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> listAddsAlertsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAddsAlertsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAddsAlertsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the alerts for a given Active Directory Domain Service. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable> listAddsAlertsNextAsync(final String nextPageLink) { + return listAddsAlertsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the alerts for a given Active Directory Domain Service. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable>> listAddsAlertsNextWithServiceResponseAsync(final String nextPageLink) { + return listAddsAlertsNextSinglePageAsync(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(listAddsAlertsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the alerts for a given Active Directory Domain Service. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AlertInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAddsAlertsNextSinglePageAsync(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.listAddsAlertsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAddsAlertsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAddsAlertsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConfigurationsImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConfigurationsImpl.java new file mode 100644 index 0000000000000..4739073f193a4 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConfigurationsImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Configurations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceItem; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Tenant; + +class ConfigurationsImpl extends WrapperImpl implements Configurations { + private final ADHybridHealthServiceManager manager; + + ConfigurationsImpl(ADHybridHealthServiceManager manager) { + super(manager.inner().configurations()); + this.manager = manager; + } + + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public Observable listAddsConfigurationsAsync(final String serviceName) { + ConfigurationsInner client = this.inner(); + return client.listAddsConfigurationsAsync(serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceItem call(ItemInner inner) { + return new ServiceItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable addAsync() { + ConfigurationsInner client = this.inner(); + return client.addAsync() + .map(new Func1() { + @Override + public Tenant call(TenantInner inner) { + return new TenantImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAsync() { + ConfigurationsInner client = this.inner(); + return client.getAsync() + .map(new Func1() { + @Override + public Tenant call(TenantInner inner) { + return new TenantImpl(inner, manager()); + } + }); + } + + @Override + public Observable updateAsync(TenantInner tenant) { + ConfigurationsInner client = this.inner(); + return client.updateAsync(tenant) + .map(new Func1() { + @Override + public Tenant call(TenantInner inner) { + return new TenantImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConfigurationsInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConfigurationsInner.java new file mode 100644 index 0000000000000..92617d96f39c6 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConfigurationsInner.java @@ -0,0 +1,629 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.PATCH; +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 Configurations. + */ +public class ConfigurationsInner { + /** The Retrofit service to perform REST calls. */ + private ConfigurationsService service; + /** The service client containing this operation class. */ + private ADHybridHealthServiceImpl client; + + /** + * Initializes an instance of ConfigurationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ConfigurationsInner(Retrofit retrofit, ADHybridHealthServiceImpl client) { + this.service = retrofit.create(ConfigurationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Configurations to be + * used by Retrofit to perform actually REST calls. + */ + interface ConfigurationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Configurations listAddsConfigurations" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/configuration") + Observable> listAddsConfigurations(@Path("serviceName") String serviceName, @Query("grouping") String grouping, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Configurations add" }) + @POST("providers/Microsoft.ADHybridHealthService/configuration") + Observable> add(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Configurations get" }) + @GET("providers/Microsoft.ADHybridHealthService/configuration") + Observable> get(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Configurations update" }) + @PATCH("providers/Microsoft.ADHybridHealthService/configuration") + Observable> update(@Body TenantInner tenant, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Configurations listAddsConfigurationsNext" }) + @GET + Observable> listAddsConfigurationsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the service configurations. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ItemInner> object if successful. + */ + public PagedList listAddsConfigurations(final String serviceName) { + ServiceResponse> response = listAddsConfigurationsSinglePageAsync(serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAddsConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the service configurations. + * + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAddsConfigurationsAsync(final String serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAddsConfigurationsSinglePageAsync(serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAddsConfigurationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the service configurations. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable> listAddsConfigurationsAsync(final String serviceName) { + return listAddsConfigurationsWithServiceResponseAsync(serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the service configurations. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable>> listAddsConfigurationsWithServiceResponseAsync(final String serviceName) { + return listAddsConfigurationsSinglePageAsync(serviceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAddsConfigurationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the service configurations. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAddsConfigurationsSinglePageAsync(final String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + final String grouping = null; + return service.listAddsConfigurations(serviceName, grouping, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAddsConfigurationsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the service configurations. + * + * @param serviceName The name of the service. + * @param grouping The grouping for configurations. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ItemInner> object if successful. + */ + public PagedList listAddsConfigurations(final String serviceName, final String grouping) { + ServiceResponse> response = listAddsConfigurationsSinglePageAsync(serviceName, grouping).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAddsConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the service configurations. + * + * @param serviceName The name of the service. + * @param grouping The grouping for configurations. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAddsConfigurationsAsync(final String serviceName, final String grouping, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAddsConfigurationsSinglePageAsync(serviceName, grouping), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAddsConfigurationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the service configurations. + * + * @param serviceName The name of the service. + * @param grouping The grouping for configurations. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable> listAddsConfigurationsAsync(final String serviceName, final String grouping) { + return listAddsConfigurationsWithServiceResponseAsync(serviceName, grouping) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the service configurations. + * + * @param serviceName The name of the service. + * @param grouping The grouping for configurations. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable>> listAddsConfigurationsWithServiceResponseAsync(final String serviceName, final String grouping) { + return listAddsConfigurationsSinglePageAsync(serviceName, grouping) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAddsConfigurationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the service configurations. + * + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param grouping The grouping for configurations. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAddsConfigurationsSinglePageAsync(final String serviceName, final String grouping) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + return service.listAddsConfigurations(serviceName, grouping, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAddsConfigurationsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAddsConfigurationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Onboards a tenant in Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TenantInner object if successful. + */ + public TenantInner add() { + return addWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Onboards a tenant in Azure Active Directory Connect Health. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addWithServiceResponseAsync(), serviceCallback); + } + + /** + * Onboards a tenant in Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TenantInner object + */ + public Observable addAsync() { + return addWithServiceResponseAsync().map(new Func1, TenantInner>() { + @Override + public TenantInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Onboards a tenant in Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TenantInner object + */ + public Observable> addWithServiceResponseAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.add(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse addDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of a tenant onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TenantInner object if successful. + */ + public TenantInner get() { + return getWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Gets the details of a tenant onboarded to Azure Active Directory Connect Health. + * + * @param serviceCallback 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(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(), serviceCallback); + } + + /** + * Gets the details of a tenant onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TenantInner object + */ + public Observable getAsync() { + return getWithServiceResponseAsync().map(new Func1, TenantInner>() { + @Override + public TenantInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the details of a tenant onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TenantInner object + */ + public Observable> getWithServiceResponseAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates tenant properties for tenants onboarded to Azure Active Directory Connect Health. + * + * @param tenant The tenant object with the properties set to the updated value. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the TenantInner object if successful. + */ + public TenantInner update(TenantInner tenant) { + return updateWithServiceResponseAsync(tenant).toBlocking().single().body(); + } + + /** + * Updates tenant properties for tenants onboarded to Azure Active Directory Connect Health. + * + * @param tenant The tenant object with the properties set to the updated 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 updateAsync(TenantInner tenant, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(tenant), serviceCallback); + } + + /** + * Updates tenant properties for tenants onboarded to Azure Active Directory Connect Health. + * + * @param tenant The tenant object with the properties set to the updated value. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TenantInner object + */ + public Observable updateAsync(TenantInner tenant) { + return updateWithServiceResponseAsync(tenant).map(new Func1, TenantInner>() { + @Override + public TenantInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tenant properties for tenants onboarded to Azure Active Directory Connect Health. + * + * @param tenant The tenant object with the properties set to the updated value. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TenantInner object + */ + public Observable> updateWithServiceResponseAsync(TenantInner tenant) { + if (tenant == null) { + throw new IllegalArgumentException("Parameter tenant 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(tenant); + return service.update(tenant, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the service configurations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ItemInner> object if successful. + */ + public PagedList listAddsConfigurationsNext(final String nextPageLink) { + ServiceResponse> response = listAddsConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAddsConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the service configurations. + * + * @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> listAddsConfigurationsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAddsConfigurationsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAddsConfigurationsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the service configurations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable> listAddsConfigurationsNextAsync(final String nextPageLink) { + return listAddsConfigurationsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the service configurations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable>> listAddsConfigurationsNextWithServiceResponseAsync(final String nextPageLink) { + return listAddsConfigurationsNextSinglePageAsync(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(listAddsConfigurationsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the service configurations. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAddsConfigurationsNextSinglePageAsync(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.listAddsConfigurationsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAddsConfigurationsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAddsConfigurationsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConnectorImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConnectorImpl.java new file mode 100644 index 0000000000000..c1498c73cf2c9 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConnectorImpl.java @@ -0,0 +1,109 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Connector; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Partition; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.RunProfile; +import org.joda.time.DateTime; + +class ConnectorImpl extends WrapperImpl implements Connector { + private final ADHybridHealthServiceManager manager; + + ConnectorImpl(ConnectorInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public List attributesIncluded() { + return this.inner().attributesIncluded(); + } + + @Override + public List classesIncluded() { + return this.inner().classesIncluded(); + } + + @Override + public String connectorId() { + return this.inner().connectorId(); + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List partitions() { + return this.inner().partitions(); + } + + @Override + public Object passwordHashSyncConfiguration() { + return this.inner().passwordHashSyncConfiguration(); + } + + @Override + public Object passwordManagementSettings() { + return this.inner().passwordManagementSettings(); + } + + @Override + public List runProfiles() { + return this.inner().runProfiles(); + } + + @Override + public String schemaXml() { + return this.inner().schemaXml(); + } + + @Override + public DateTime timeCreated() { + return this.inner().timeCreated(); + } + + @Override + public DateTime timeLastModified() { + return this.inner().timeLastModified(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public Integer version() { + return this.inner().version(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConnectorInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConnectorInner.java new file mode 100644 index 0000000000000..a85675357b258 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConnectorInner.java @@ -0,0 +1,411 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Partition; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.RunProfile; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The connect details. + */ +public class ConnectorInner { + /** + * The connector Id. + */ + @JsonProperty(value = "connectorId") + private String connectorId; + + /** + * The connector Id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The connector name. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The connector version. + */ + @JsonProperty(value = "version") + private Integer version; + + /** + * The connector type. + */ + @JsonProperty(value = "type") + private String type; + + /** + * The connector description. + */ + @JsonProperty(value = "description") + private String description; + + /** + * The schema xml for the connector. + */ + @JsonProperty(value = "schemaXml") + private String schemaXml; + + /** + * The password management settings of the connector. + */ + @JsonProperty(value = "passwordManagementSettings") + private Object passwordManagementSettings; + + /** + * The password hash synchronization configuration of the connector. + */ + @JsonProperty(value = "passwordHashSyncConfiguration") + private Object passwordHashSyncConfiguration; + + /** + * The date and time when this connector was created. + */ + @JsonProperty(value = "timeCreated") + private DateTime timeCreated; + + /** + * The date and time when this connector was last modified. + */ + @JsonProperty(value = "timeLastModified") + private DateTime timeLastModified; + + /** + * The partitions of the connector. + */ + @JsonProperty(value = "partitions") + private List partitions; + + /** + * The run profiles of the connector. + */ + @JsonProperty(value = "runProfiles") + private List runProfiles; + + /** + * The class inclusion list of the connector. + */ + @JsonProperty(value = "classesIncluded") + private List classesIncluded; + + /** + * The attribute inclusion list of the connector. + */ + @JsonProperty(value = "attributesIncluded") + private List attributesIncluded; + + /** + * Get the connector Id. + * + * @return the connectorId value + */ + public String connectorId() { + return this.connectorId; + } + + /** + * Set the connector Id. + * + * @param connectorId the connectorId value to set + * @return the ConnectorInner object itself. + */ + public ConnectorInner withConnectorId(String connectorId) { + this.connectorId = connectorId; + return this; + } + + /** + * Get the connector Id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the connector Id. + * + * @param id the id value to set + * @return the ConnectorInner object itself. + */ + public ConnectorInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the connector name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the connector name. + * + * @param name the name value to set + * @return the ConnectorInner object itself. + */ + public ConnectorInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the connector version. + * + * @return the version value + */ + public Integer version() { + return this.version; + } + + /** + * Set the connector version. + * + * @param version the version value to set + * @return the ConnectorInner object itself. + */ + public ConnectorInner withVersion(Integer version) { + this.version = version; + return this; + } + + /** + * Get the connector type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the connector type. + * + * @param type the type value to set + * @return the ConnectorInner object itself. + */ + public ConnectorInner withType(String type) { + this.type = type; + return this; + } + + /** + * Get the connector description. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the connector description. + * + * @param description the description value to set + * @return the ConnectorInner object itself. + */ + public ConnectorInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the schema xml for the connector. + * + * @return the schemaXml value + */ + public String schemaXml() { + return this.schemaXml; + } + + /** + * Set the schema xml for the connector. + * + * @param schemaXml the schemaXml value to set + * @return the ConnectorInner object itself. + */ + public ConnectorInner withSchemaXml(String schemaXml) { + this.schemaXml = schemaXml; + return this; + } + + /** + * Get the password management settings of the connector. + * + * @return the passwordManagementSettings value + */ + public Object passwordManagementSettings() { + return this.passwordManagementSettings; + } + + /** + * Set the password management settings of the connector. + * + * @param passwordManagementSettings the passwordManagementSettings value to set + * @return the ConnectorInner object itself. + */ + public ConnectorInner withPasswordManagementSettings(Object passwordManagementSettings) { + this.passwordManagementSettings = passwordManagementSettings; + return this; + } + + /** + * Get the password hash synchronization configuration of the connector. + * + * @return the passwordHashSyncConfiguration value + */ + public Object passwordHashSyncConfiguration() { + return this.passwordHashSyncConfiguration; + } + + /** + * Set the password hash synchronization configuration of the connector. + * + * @param passwordHashSyncConfiguration the passwordHashSyncConfiguration value to set + * @return the ConnectorInner object itself. + */ + public ConnectorInner withPasswordHashSyncConfiguration(Object passwordHashSyncConfiguration) { + this.passwordHashSyncConfiguration = passwordHashSyncConfiguration; + return this; + } + + /** + * Get the date and time when this connector was created. + * + * @return the timeCreated value + */ + public DateTime timeCreated() { + return this.timeCreated; + } + + /** + * Set the date and time when this connector was created. + * + * @param timeCreated the timeCreated value to set + * @return the ConnectorInner object itself. + */ + public ConnectorInner withTimeCreated(DateTime timeCreated) { + this.timeCreated = timeCreated; + return this; + } + + /** + * Get the date and time when this connector was last modified. + * + * @return the timeLastModified value + */ + public DateTime timeLastModified() { + return this.timeLastModified; + } + + /** + * Set the date and time when this connector was last modified. + * + * @param timeLastModified the timeLastModified value to set + * @return the ConnectorInner object itself. + */ + public ConnectorInner withTimeLastModified(DateTime timeLastModified) { + this.timeLastModified = timeLastModified; + return this; + } + + /** + * Get the partitions of the connector. + * + * @return the partitions value + */ + public List partitions() { + return this.partitions; + } + + /** + * Set the partitions of the connector. + * + * @param partitions the partitions value to set + * @return the ConnectorInner object itself. + */ + public ConnectorInner withPartitions(List partitions) { + this.partitions = partitions; + return this; + } + + /** + * Get the run profiles of the connector. + * + * @return the runProfiles value + */ + public List runProfiles() { + return this.runProfiles; + } + + /** + * Set the run profiles of the connector. + * + * @param runProfiles the runProfiles value to set + * @return the ConnectorInner object itself. + */ + public ConnectorInner withRunProfiles(List runProfiles) { + this.runProfiles = runProfiles; + return this; + } + + /** + * Get the class inclusion list of the connector. + * + * @return the classesIncluded value + */ + public List classesIncluded() { + return this.classesIncluded; + } + + /** + * Set the class inclusion list of the connector. + * + * @param classesIncluded the classesIncluded value to set + * @return the ConnectorInner object itself. + */ + public ConnectorInner withClassesIncluded(List classesIncluded) { + this.classesIncluded = classesIncluded; + return this; + } + + /** + * Get the attribute inclusion list of the connector. + * + * @return the attributesIncluded value + */ + public List attributesIncluded() { + return this.attributesIncluded; + } + + /** + * Set the attribute inclusion list of the connector. + * + * @param attributesIncluded the attributesIncluded value to set + * @return the ConnectorInner object itself. + */ + public ConnectorInner withAttributesIncluded(List attributesIncluded) { + this.attributesIncluded = attributesIncluded; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConnectorMetadataImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConnectorMetadataImpl.java new file mode 100644 index 0000000000000..0e143cce6f87c --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConnectorMetadataImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ConnectorMetadata; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ConnectorMetadataDetails; + +class ConnectorMetadataImpl extends WrapperImpl implements ConnectorMetadata { + private final ADHybridHealthServiceManager manager; + private String serviceName; + private UUID serviceMemberId; + private String metricName; + + ConnectorMetadataImpl(ConnectorMetadataInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public List connectors() { + return this.inner().connectors(); + } + + @Override + public List runProfileNames() { + return this.inner().runProfileNames(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConnectorMetadataInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConnectorMetadataInner.java new file mode 100644 index 0000000000000..7a1b27a3d5995 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ConnectorMetadataInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ConnectorMetadataDetails; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Gets the list of connectors and run profile names. + */ +public class ConnectorMetadataInner { + /** + * The list of connectors. + */ + @JsonProperty(value = "connectors") + private List connectors; + + /** + * The list of run profile names. + */ + @JsonProperty(value = "runProfileNames") + private List runProfileNames; + + /** + * Get the list of connectors. + * + * @return the connectors value + */ + public List connectors() { + return this.connectors; + } + + /** + * Set the list of connectors. + * + * @param connectors the connectors value to set + * @return the ConnectorMetadataInner object itself. + */ + public ConnectorMetadataInner withConnectors(List connectors) { + this.connectors = connectors; + return this; + } + + /** + * Get the list of run profile names. + * + * @return the runProfileNames value + */ + public List runProfileNames() { + return this.runProfileNames; + } + + /** + * Set the list of run profile names. + * + * @param runProfileNames the runProfileNames value to set + * @return the ConnectorMetadataInner object itself. + */ + public ConnectorMetadataInner withRunProfileNames(List runProfileNames) { + this.runProfileNames = runProfileNames; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/CredentialInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/CredentialInner.java new file mode 100644 index 0000000000000..a1a3ad0c117af --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/CredentialInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The credential for a given server. + */ +public class CredentialInner { + /** + * The credential identifier. + */ + @JsonProperty(value = "identifier") + private String identifier; + + /** + * The type of credential. + */ + @JsonProperty(value = "type") + private String type; + + /** + * The credential data. + */ + @JsonProperty(value = "credentialData") + private List credentialData; + + /** + * Get the credential identifier. + * + * @return the identifier value + */ + public String identifier() { + return this.identifier; + } + + /** + * Set the credential identifier. + * + * @param identifier the identifier value to set + * @return the CredentialInner object itself. + */ + public CredentialInner withIdentifier(String identifier) { + this.identifier = identifier; + return this; + } + + /** + * Get the type of credential. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type of credential. + * + * @param type the type value to set + * @return the CredentialInner object itself. + */ + public CredentialInner withType(String type) { + this.type = type; + return this; + } + + /** + * Get the credential data. + * + * @return the credentialData value + */ + public List credentialData() { + return this.credentialData; + } + + /** + * Set the credential data. + * + * @param credentialData the credentialData value to set + * @return the CredentialInner object itself. + */ + public CredentialInner withCredentialData(List credentialData) { + this.credentialData = credentialData; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/DimensionImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/DimensionImpl.java new file mode 100644 index 0000000000000..d1221e2358d70 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/DimensionImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Dimension; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.HealthStatus; +import org.joda.time.DateTime; + +class DimensionImpl extends WrapperImpl implements Dimension { + private final ADHybridHealthServiceManager manager; + DimensionImpl(DimensionInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public Integer activeAlerts() { + return this.inner().activeAlerts(); + } + + @Override + public String additionalInformation() { + return this.inner().additionalInformation(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public HealthStatus health() { + return this.inner().health(); + } + + @Override + public DateTime lastUpdated() { + return this.inner().lastUpdated(); + } + + @Override + public Integer resolvedAlerts() { + return this.inner().resolvedAlerts(); + } + + @Override + public String signature() { + return this.inner().signature(); + } + + @Override + public Object simpleProperties() { + return this.inner().simpleProperties(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/DimensionInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/DimensionInner.java new file mode 100644 index 0000000000000..61219a498912c --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/DimensionInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.HealthStatus; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The connector object error. + */ +public class DimensionInner { + /** + * The health status for the domain controller. Possible values include: + * 'Healthy', 'Warning', 'Error', 'NotMonitored', 'Missing'. + */ + @JsonProperty(value = "health") + private HealthStatus health; + + /** + * List of service specific configuration properties. + */ + @JsonProperty(value = "simpleProperties") + private Object simpleProperties; + + /** + * The count of alerts that are currently active for the service. + */ + @JsonProperty(value = "activeAlerts") + private Integer activeAlerts; + + /** + * The additional information related to the service. + */ + @JsonProperty(value = "additionalInformation") + private String additionalInformation; + + /** + * The date or time , in UTC, when the service properties were last + * updated. + */ + @JsonProperty(value = "lastUpdated") + private DateTime lastUpdated; + + /** + * The display name of the service. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * The total count of alerts that has been resolved for the service. + */ + @JsonProperty(value = "resolvedAlerts") + private Integer resolvedAlerts; + + /** + * The signature of the service. + */ + @JsonProperty(value = "signature") + private String signature; + + /** + * The service type for the services onboarded to Azure Active Directory + * Connect Health. Depending on whether the service is monitoring, ADFS, + * Sync or ADDS roles, the service type can either be AdFederationService + * or AadSyncService or AdDomainService. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the health status for the domain controller. Possible values include: 'Healthy', 'Warning', 'Error', 'NotMonitored', 'Missing'. + * + * @return the health value + */ + public HealthStatus health() { + return this.health; + } + + /** + * Set the health status for the domain controller. Possible values include: 'Healthy', 'Warning', 'Error', 'NotMonitored', 'Missing'. + * + * @param health the health value to set + * @return the DimensionInner object itself. + */ + public DimensionInner withHealth(HealthStatus health) { + this.health = health; + return this; + } + + /** + * Get list of service specific configuration properties. + * + * @return the simpleProperties value + */ + public Object simpleProperties() { + return this.simpleProperties; + } + + /** + * Set list of service specific configuration properties. + * + * @param simpleProperties the simpleProperties value to set + * @return the DimensionInner object itself. + */ + public DimensionInner withSimpleProperties(Object simpleProperties) { + this.simpleProperties = simpleProperties; + return this; + } + + /** + * Get the count of alerts that are currently active for the service. + * + * @return the activeAlerts value + */ + public Integer activeAlerts() { + return this.activeAlerts; + } + + /** + * Set the count of alerts that are currently active for the service. + * + * @param activeAlerts the activeAlerts value to set + * @return the DimensionInner object itself. + */ + public DimensionInner withActiveAlerts(Integer activeAlerts) { + this.activeAlerts = activeAlerts; + return this; + } + + /** + * Get the additional information related to the service. + * + * @return the additionalInformation value + */ + public String additionalInformation() { + return this.additionalInformation; + } + + /** + * Set the additional information related to the service. + * + * @param additionalInformation the additionalInformation value to set + * @return the DimensionInner object itself. + */ + public DimensionInner withAdditionalInformation(String additionalInformation) { + this.additionalInformation = additionalInformation; + return this; + } + + /** + * Get the date or time , in UTC, when the service properties were last updated. + * + * @return the lastUpdated value + */ + public DateTime lastUpdated() { + return this.lastUpdated; + } + + /** + * Set the date or time , in UTC, when the service properties were last updated. + * + * @param lastUpdated the lastUpdated value to set + * @return the DimensionInner object itself. + */ + public DimensionInner withLastUpdated(DateTime lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Get the display name of the service. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name of the service. + * + * @param displayName the displayName value to set + * @return the DimensionInner object itself. + */ + public DimensionInner withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the total count of alerts that has been resolved for the service. + * + * @return the resolvedAlerts value + */ + public Integer resolvedAlerts() { + return this.resolvedAlerts; + } + + /** + * Set the total count of alerts that has been resolved for the service. + * + * @param resolvedAlerts the resolvedAlerts value to set + * @return the DimensionInner object itself. + */ + public DimensionInner withResolvedAlerts(Integer resolvedAlerts) { + this.resolvedAlerts = resolvedAlerts; + return this; + } + + /** + * Get the signature of the service. + * + * @return the signature value + */ + public String signature() { + return this.signature; + } + + /** + * Set the signature of the service. + * + * @param signature the signature value to set + * @return the DimensionInner object itself. + */ + public DimensionInner withSignature(String signature) { + this.signature = signature; + return this; + } + + /** + * Get the service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * + * @param type the type value to set + * @return the DimensionInner object itself. + */ + public DimensionInner withType(String type) { + this.type = type; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/DimensionsImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/DimensionsImpl.java new file mode 100644 index 0000000000000..c11764c1210cb --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/DimensionsImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Dimensions; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Dimension; + +class DimensionsImpl extends WrapperImpl implements Dimensions { + private final ADHybridHealthServiceManager manager; + + DimensionsImpl(ADHybridHealthServiceManager manager) { + super(manager.inner().dimensions()); + this.manager = manager; + } + + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public Observable listAddsDimensionsAsync(final String serviceName, final String dimension) { + DimensionsInner client = this.inner(); + return client.listAddsDimensionsAsync(serviceName, dimension) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Dimension call(DimensionInner inner) { + return new DimensionImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/DimensionsInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/DimensionsInner.java new file mode 100644 index 0000000000000..b081b28f2f58c --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/DimensionsInner.java @@ -0,0 +1,300 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Dimensions. + */ +public class DimensionsInner { + /** The Retrofit service to perform REST calls. */ + private DimensionsService service; + /** The service client containing this operation class. */ + private ADHybridHealthServiceImpl client; + + /** + * Initializes an instance of DimensionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DimensionsInner(Retrofit retrofit, ADHybridHealthServiceImpl client) { + this.service = retrofit.create(DimensionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Dimensions to be + * used by Retrofit to perform actually REST calls. + */ + interface DimensionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Dimensions listAddsDimensions" }) + @GET("providers/Microsoft.ADHybridHealthService/addsservices/{serviceName}/dimensions/{dimension}") + Observable> listAddsDimensions(@Path("serviceName") String serviceName, @Path("dimension") String dimension, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Dimensions listAddsDimensionsNext" }) + @GET + Observable> listAddsDimensionsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the dimensions for a given dimension type in a server. + * + * @param serviceName The name of the service. + * @param dimension The dimension type. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DimensionInner> object if successful. + */ + public PagedList listAddsDimensions(final String serviceName, final String dimension) { + ServiceResponse> response = listAddsDimensionsSinglePageAsync(serviceName, dimension).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAddsDimensionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the dimensions for a given dimension type in a server. + * + * @param serviceName The name of the service. + * @param dimension The dimension type. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAddsDimensionsAsync(final String serviceName, final String dimension, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAddsDimensionsSinglePageAsync(serviceName, dimension), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAddsDimensionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the dimensions for a given dimension type in a server. + * + * @param serviceName The name of the service. + * @param dimension The dimension type. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DimensionInner> object + */ + public Observable> listAddsDimensionsAsync(final String serviceName, final String dimension) { + return listAddsDimensionsWithServiceResponseAsync(serviceName, dimension) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the dimensions for a given dimension type in a server. + * + * @param serviceName The name of the service. + * @param dimension The dimension type. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DimensionInner> object + */ + public Observable>> listAddsDimensionsWithServiceResponseAsync(final String serviceName, final String dimension) { + return listAddsDimensionsSinglePageAsync(serviceName, dimension) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAddsDimensionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the dimensions for a given dimension type in a server. + * + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param dimension The dimension type. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DimensionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAddsDimensionsSinglePageAsync(final String serviceName, final String dimension) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (dimension == null) { + throw new IllegalArgumentException("Parameter dimension is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listAddsDimensions(serviceName, dimension, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAddsDimensionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAddsDimensionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the dimensions for a given dimension type in a server. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<DimensionInner> object if successful. + */ + public PagedList listAddsDimensionsNext(final String nextPageLink) { + ServiceResponse> response = listAddsDimensionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAddsDimensionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the dimensions for a given dimension type in a server. + * + * @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> listAddsDimensionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAddsDimensionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAddsDimensionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the dimensions for a given dimension type in a server. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DimensionInner> object + */ + public Observable> listAddsDimensionsNextAsync(final String nextPageLink) { + return listAddsDimensionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the dimensions for a given dimension type in a server. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<DimensionInner> object + */ + public Observable>> listAddsDimensionsNextWithServiceResponseAsync(final String nextPageLink) { + return listAddsDimensionsNextSinglePageAsync(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(listAddsDimensionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the dimensions for a given dimension type in a server. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<DimensionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAddsDimensionsNextSinglePageAsync(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.listAddsDimensionsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAddsDimensionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAddsDimensionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ErrorCountImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ErrorCountImpl.java new file mode 100644 index 0000000000000..634863019901f --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ErrorCountImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ErrorCount; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class ErrorCountImpl extends WrapperImpl implements ErrorCount { + private final ADHybridHealthServiceManager manager; + ErrorCountImpl(ErrorCountInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public Integer count() { + return this.inner().count(); + } + + @Override + public String errorBucket() { + return this.inner().errorBucket(); + } + + @Override + public Boolean truncated() { + return this.inner().truncated(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ErrorCountInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ErrorCountInner.java new file mode 100644 index 0000000000000..a9c65b2c637de --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ErrorCountInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The error count details. + */ +public class ErrorCountInner { + /** + * The error bucket. + */ + @JsonProperty(value = "errorBucket") + private String errorBucket; + + /** + * The error count. + */ + @JsonProperty(value = "count") + private Integer count; + + /** + * Indicates if the error count is truncated or not. + */ + @JsonProperty(value = "truncated") + private Boolean truncated; + + /** + * Get the error bucket. + * + * @return the errorBucket value + */ + public String errorBucket() { + return this.errorBucket; + } + + /** + * Set the error bucket. + * + * @param errorBucket the errorBucket value to set + * @return the ErrorCountInner object itself. + */ + public ErrorCountInner withErrorBucket(String errorBucket) { + this.errorBucket = errorBucket; + return this; + } + + /** + * Get the error count. + * + * @return the count value + */ + public Integer count() { + return this.count; + } + + /** + * Set the error count. + * + * @param count the count value to set + * @return the ErrorCountInner object itself. + */ + public ErrorCountInner withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get indicates if the error count is truncated or not. + * + * @return the truncated value + */ + public Boolean truncated() { + return this.truncated; + } + + /** + * Set indicates if the error count is truncated or not. + * + * @param truncated the truncated value to set + * @return the ErrorCountInner object itself. + */ + public ErrorCountInner withTruncated(Boolean truncated) { + this.truncated = truncated; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ErrorReportUsersEntryImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ErrorReportUsersEntryImpl.java new file mode 100644 index 0000000000000..fa87263831067 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ErrorReportUsersEntryImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ErrorReportUsersEntry; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import org.joda.time.DateTime; + +class ErrorReportUsersEntryImpl extends WrapperImpl implements ErrorReportUsersEntry { + private final ADHybridHealthServiceManager manager; + ErrorReportUsersEntryImpl(ErrorReportUsersEntryInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public String ipAddress() { + return this.inner().ipAddress(); + } + + @Override + public DateTime lastUpdated() { + return this.inner().lastUpdated(); + } + + @Override + public Integer totalErrorAttempts() { + return this.inner().totalErrorAttempts(); + } + + @Override + public String uniqueIpAddresses() { + return this.inner().uniqueIpAddresses(); + } + + @Override + public String userId() { + return this.inner().userId(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ErrorReportUsersEntryInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ErrorReportUsersEntryInner.java new file mode 100644 index 0000000000000..3befb81fbe616 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ErrorReportUsersEntryInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The bad password login attempt details. + */ +public class ErrorReportUsersEntryInner { + /** + * The user ID value. + */ + @JsonProperty(value = "userId") + private String userId; + + /** + * The IP address corresponding to the last error event. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * The date and time when the last error event was logged. + */ + @JsonProperty(value = "lastUpdated") + private DateTime lastUpdated; + + /** + * The list of unique IP addresses. + */ + @JsonProperty(value = "uniqueIpAddresses") + private String uniqueIpAddresses; + + /** + * The total count of specific error events. + */ + @JsonProperty(value = "totalErrorAttempts") + private Integer totalErrorAttempts; + + /** + * Get the user ID value. + * + * @return the userId value + */ + public String userId() { + return this.userId; + } + + /** + * Set the user ID value. + * + * @param userId the userId value to set + * @return the ErrorReportUsersEntryInner object itself. + */ + public ErrorReportUsersEntryInner withUserId(String userId) { + this.userId = userId; + return this; + } + + /** + * Get the IP address corresponding to the last error event. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the IP address corresponding to the last error event. + * + * @param ipAddress the ipAddress value to set + * @return the ErrorReportUsersEntryInner object itself. + */ + public ErrorReportUsersEntryInner withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the date and time when the last error event was logged. + * + * @return the lastUpdated value + */ + public DateTime lastUpdated() { + return this.lastUpdated; + } + + /** + * Set the date and time when the last error event was logged. + * + * @param lastUpdated the lastUpdated value to set + * @return the ErrorReportUsersEntryInner object itself. + */ + public ErrorReportUsersEntryInner withLastUpdated(DateTime lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Get the list of unique IP addresses. + * + * @return the uniqueIpAddresses value + */ + public String uniqueIpAddresses() { + return this.uniqueIpAddresses; + } + + /** + * Set the list of unique IP addresses. + * + * @param uniqueIpAddresses the uniqueIpAddresses value to set + * @return the ErrorReportUsersEntryInner object itself. + */ + public ErrorReportUsersEntryInner withUniqueIpAddresses(String uniqueIpAddresses) { + this.uniqueIpAddresses = uniqueIpAddresses; + return this; + } + + /** + * Get the total count of specific error events. + * + * @return the totalErrorAttempts value + */ + public Integer totalErrorAttempts() { + return this.totalErrorAttempts; + } + + /** + * Set the total count of specific error events. + * + * @param totalErrorAttempts the totalErrorAttempts value to set + * @return the ErrorReportUsersEntryInner object itself. + */ + public ErrorReportUsersEntryInner withTotalErrorAttempts(Integer totalErrorAttempts) { + this.totalErrorAttempts = totalErrorAttempts; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ExportStatusInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ExportStatusInner.java new file mode 100644 index 0000000000000..a5d5fc858c37a --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ExportStatusInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import java.util.UUID; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The details of the export status. + */ +public class ExportStatusInner { + /** + * The id of the service for whom the export status is being reported. + */ + @JsonProperty(value = "serviceId") + private UUID serviceId; + + /** + * The server Id for whom the export status is being reported. + */ + @JsonProperty(value = "serviceMemberId") + private UUID serviceMemberId; + + /** + * The date and time when the export ended. + */ + @JsonProperty(value = "endTime") + private DateTime endTime; + + /** + * The run step result Id. + */ + @JsonProperty(value = "runStepResultId") + private String runStepResultId; + + /** + * Get the id of the service for whom the export status is being reported. + * + * @return the serviceId value + */ + public UUID serviceId() { + return this.serviceId; + } + + /** + * Set the id of the service for whom the export status is being reported. + * + * @param serviceId the serviceId value to set + * @return the ExportStatusInner object itself. + */ + public ExportStatusInner withServiceId(UUID serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * Get the server Id for whom the export status is being reported. + * + * @return the serviceMemberId value + */ + public UUID serviceMemberId() { + return this.serviceMemberId; + } + + /** + * Set the server Id for whom the export status is being reported. + * + * @param serviceMemberId the serviceMemberId value to set + * @return the ExportStatusInner object itself. + */ + public ExportStatusInner withServiceMemberId(UUID serviceMemberId) { + this.serviceMemberId = serviceMemberId; + return this; + } + + /** + * Get the date and time when the export ended. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set the date and time when the export ended. + * + * @param endTime the endTime value to set + * @return the ExportStatusInner object itself. + */ + public ExportStatusInner withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the run step result Id. + * + * @return the runStepResultId value + */ + public String runStepResultId() { + return this.runStepResultId; + } + + /** + * Set the run step result Id. + * + * @param runStepResultId the runStepResultId value to set + * @return the ExportStatusInner object itself. + */ + public ExportStatusInner withRunStepResultId(String runStepResultId) { + this.runStepResultId = runStepResultId; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ForestSummaryImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ForestSummaryImpl.java new file mode 100644 index 0000000000000..b56139071d1a0 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ForestSummaryImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ForestSummary; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class ForestSummaryImpl extends WrapperImpl implements ForestSummary { + private final ADHybridHealthServiceManager manager; + ForestSummaryImpl(ForestSummaryInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public Integer domainCount() { + return this.inner().domainCount(); + } + + @Override + public List domains() { + return this.inner().domains(); + } + + @Override + public String forestName() { + return this.inner().forestName(); + } + + @Override + public Integer monitoredDcCount() { + return this.inner().monitoredDcCount(); + } + + @Override + public Integer siteCount() { + return this.inner().siteCount(); + } + + @Override + public List sites() { + return this.inner().sites(); + } + + @Override + public Integer totalDcCount() { + return this.inner().totalDcCount(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ForestSummaryInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ForestSummaryInner.java new file mode 100644 index 0000000000000..7d4faa67dce94 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ForestSummaryInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The forest summary for an ADDS domain. + */ +public class ForestSummaryInner { + /** + * The forest name. + */ + @JsonProperty(value = "forestName") + private String forestName; + + /** + * The domain count. + */ + @JsonProperty(value = "domainCount") + private Integer domainCount; + + /** + * The site count. + */ + @JsonProperty(value = "siteCount") + private Integer siteCount; + + /** + * The number of domain controllers that are monitored by Azure Active + * Directory Connect Health. + */ + @JsonProperty(value = "monitoredDcCount") + private Integer monitoredDcCount; + + /** + * The total domain controllers. + */ + @JsonProperty(value = "totalDcCount") + private Integer totalDcCount; + + /** + * The list of domain controller names. + */ + @JsonProperty(value = "domains") + private List domains; + + /** + * The list of site names. + */ + @JsonProperty(value = "sites") + private List sites; + + /** + * Get the forest name. + * + * @return the forestName value + */ + public String forestName() { + return this.forestName; + } + + /** + * Set the forest name. + * + * @param forestName the forestName value to set + * @return the ForestSummaryInner object itself. + */ + public ForestSummaryInner withForestName(String forestName) { + this.forestName = forestName; + return this; + } + + /** + * Get the domain count. + * + * @return the domainCount value + */ + public Integer domainCount() { + return this.domainCount; + } + + /** + * Set the domain count. + * + * @param domainCount the domainCount value to set + * @return the ForestSummaryInner object itself. + */ + public ForestSummaryInner withDomainCount(Integer domainCount) { + this.domainCount = domainCount; + return this; + } + + /** + * Get the site count. + * + * @return the siteCount value + */ + public Integer siteCount() { + return this.siteCount; + } + + /** + * Set the site count. + * + * @param siteCount the siteCount value to set + * @return the ForestSummaryInner object itself. + */ + public ForestSummaryInner withSiteCount(Integer siteCount) { + this.siteCount = siteCount; + return this; + } + + /** + * Get the number of domain controllers that are monitored by Azure Active Directory Connect Health. + * + * @return the monitoredDcCount value + */ + public Integer monitoredDcCount() { + return this.monitoredDcCount; + } + + /** + * Set the number of domain controllers that are monitored by Azure Active Directory Connect Health. + * + * @param monitoredDcCount the monitoredDcCount value to set + * @return the ForestSummaryInner object itself. + */ + public ForestSummaryInner withMonitoredDcCount(Integer monitoredDcCount) { + this.monitoredDcCount = monitoredDcCount; + return this; + } + + /** + * Get the total domain controllers. + * + * @return the totalDcCount value + */ + public Integer totalDcCount() { + return this.totalDcCount; + } + + /** + * Set the total domain controllers. + * + * @param totalDcCount the totalDcCount value to set + * @return the ForestSummaryInner object itself. + */ + public ForestSummaryInner withTotalDcCount(Integer totalDcCount) { + this.totalDcCount = totalDcCount; + return this; + } + + /** + * Get the list of domain controller names. + * + * @return the domains value + */ + public List domains() { + return this.domains; + } + + /** + * Set the list of domain controller names. + * + * @param domains the domains value to set + * @return the ForestSummaryInner object itself. + */ + public ForestSummaryInner withDomains(List domains) { + this.domains = domains; + return this; + } + + /** + * Get the list of site names. + * + * @return the sites value + */ + public List sites() { + return this.sites; + } + + /** + * Set the list of site names. + * + * @param sites the sites value to set + * @return the ForestSummaryInner object itself. + */ + public ForestSummaryInner withSites(List sites) { + this.sites = sites; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/GlobalConfigurationImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/GlobalConfigurationImpl.java new file mode 100644 index 0000000000000..471dc229f40f8 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/GlobalConfigurationImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.GlobalConfiguration; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class GlobalConfigurationImpl extends WrapperImpl implements GlobalConfiguration { + private final ADHybridHealthServiceManager manager; + GlobalConfigurationImpl(GlobalConfigurationInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public List featureSet() { + return this.inner().featureSet(); + } + + @Override + public Integer numSavedPwdEvent() { + return this.inner().numSavedPwdEvent(); + } + + @Override + public Boolean passwordSyncEnabled() { + return this.inner().passwordSyncEnabled(); + } + + @Override + public String schemaXml() { + return this.inner().schemaXml(); + } + + @Override + public Integer version() { + return this.inner().version(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/GlobalConfigurationInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/GlobalConfigurationInner.java new file mode 100644 index 0000000000000..cf25fa6b8aad5 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/GlobalConfigurationInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The global configuration settings. + */ +public class GlobalConfigurationInner { + /** + * The version for the global configuration. + */ + @JsonProperty(value = "version") + private Integer version; + + /** + * The schema for the configuration. + */ + @JsonProperty(value = "schemaXml") + private String schemaXml; + + /** + * Indicates if password sync is enabled or not. + */ + @JsonProperty(value = "passwordSyncEnabled") + private Boolean passwordSyncEnabled; + + /** + * The number of saved password events. + */ + @JsonProperty(value = "numSavedPwdEvent") + private Integer numSavedPwdEvent; + + /** + * The list of additional feature sets. + */ + @JsonProperty(value = "featureSet") + private List featureSet; + + /** + * Get the version for the global configuration. + * + * @return the version value + */ + public Integer version() { + return this.version; + } + + /** + * Set the version for the global configuration. + * + * @param version the version value to set + * @return the GlobalConfigurationInner object itself. + */ + public GlobalConfigurationInner withVersion(Integer version) { + this.version = version; + return this; + } + + /** + * Get the schema for the configuration. + * + * @return the schemaXml value + */ + public String schemaXml() { + return this.schemaXml; + } + + /** + * Set the schema for the configuration. + * + * @param schemaXml the schemaXml value to set + * @return the GlobalConfigurationInner object itself. + */ + public GlobalConfigurationInner withSchemaXml(String schemaXml) { + this.schemaXml = schemaXml; + return this; + } + + /** + * Get indicates if password sync is enabled or not. + * + * @return the passwordSyncEnabled value + */ + public Boolean passwordSyncEnabled() { + return this.passwordSyncEnabled; + } + + /** + * Set indicates if password sync is enabled or not. + * + * @param passwordSyncEnabled the passwordSyncEnabled value to set + * @return the GlobalConfigurationInner object itself. + */ + public GlobalConfigurationInner withPasswordSyncEnabled(Boolean passwordSyncEnabled) { + this.passwordSyncEnabled = passwordSyncEnabled; + return this; + } + + /** + * Get the number of saved password events. + * + * @return the numSavedPwdEvent value + */ + public Integer numSavedPwdEvent() { + return this.numSavedPwdEvent; + } + + /** + * Set the number of saved password events. + * + * @param numSavedPwdEvent the numSavedPwdEvent value to set + * @return the GlobalConfigurationInner object itself. + */ + public GlobalConfigurationInner withNumSavedPwdEvent(Integer numSavedPwdEvent) { + this.numSavedPwdEvent = numSavedPwdEvent; + return this; + } + + /** + * Get the list of additional feature sets. + * + * @return the featureSet value + */ + public List featureSet() { + return this.featureSet; + } + + /** + * Set the list of additional feature sets. + * + * @param featureSet the featureSet value to set + * @return the GlobalConfigurationInner object itself. + */ + public GlobalConfigurationInner withFeatureSet(List featureSet) { + this.featureSet = featureSet; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/IPAddressAggregateImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/IPAddressAggregateImpl.java new file mode 100644 index 0000000000000..447bb21b1eac2 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/IPAddressAggregateImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.IPAddressAggregate; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class IPAddressAggregateImpl extends WrapperImpl implements IPAddressAggregate { + private final ADHybridHealthServiceManager manager; + + IPAddressAggregateImpl(IPAddressAggregateInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public Boolean attemptCountThresholdIsExceeded() { + return this.inner().attemptCountThresholdIsExceeded(); + } + + @Override + public Integer attemptCountThresholdOnTrigger() { + return this.inner().attemptCountThresholdOnTrigger(); + } + + @Override + public String attemptThresholdTypeOnTrigger() { + return this.inner().attemptThresholdTypeOnTrigger(); + } + + @Override + public Integer badPasswordErrorCount() { + return this.inner().badPasswordErrorCount(); + } + + @Override + public Integer extranetLockoutErrorCount() { + return this.inner().extranetLockoutErrorCount(); + } + + @Override + public String firstAuditTimestamp() { + return this.inner().firstAuditTimestamp(); + } + + @Override + public String geographicLocation() { + return this.inner().geographicLocation(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String ipAddress() { + return this.inner().ipAddress(); + } + + @Override + public Boolean isWhitelistedIpAddress() { + return this.inner().isWhitelistedIpAddress(); + } + + @Override + public String lastAuditTimestamp() { + return this.inner().lastAuditTimestamp(); + } + + @Override + public String networkLocation() { + return this.inner().networkLocation(); + } + + @Override + public String serviceId() { + return this.inner().serviceId(); + } + + @Override + public String tenantId() { + return this.inner().tenantId(); + } + + @Override + public String timeSpan() { + return this.inner().timeSpan(); + } + + @Override + public String timestamp() { + return this.inner().timestamp(); + } + + @Override + public Integer uniqueUsernamesAttemptedCount() { + return this.inner().uniqueUsernamesAttemptedCount(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/IPAddressAggregateInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/IPAddressAggregateInner.java new file mode 100644 index 0000000000000..decee7048d1cb --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/IPAddressAggregateInner.java @@ -0,0 +1,459 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The key value pair for properties. + */ +public class IPAddressAggregateInner { + /** + * Unique ID for the entree. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The tenant ID. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /** + * The service ID. + */ + @JsonProperty(value = "serviceId") + private String serviceId; + + /** + * The IP address from where the attempted login originated from. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /** + * When the event occurred. + */ + @JsonProperty(value = "timestamp") + private String timestamp; + + /** + * The first audit timestamp. + */ + @JsonProperty(value = "firstAuditTimestamp") + private String firstAuditTimestamp; + + /** + * The last audit timestamp. + */ + @JsonProperty(value = "lastAuditTimestamp") + private String lastAuditTimestamp; + + /** + * The extranet lockout error count. + */ + @JsonProperty(value = "extranetLockoutErrorCount") + private Integer extranetLockoutErrorCount; + + /** + * The bad password error count. + */ + @JsonProperty(value = "badPasswordErrorCount") + private Integer badPasswordErrorCount; + + /** + * The unique usernames attempted. + */ + @JsonProperty(value = "uniqueUsernamesAttemptedCount") + private Integer uniqueUsernamesAttemptedCount; + + /** + * A value indicating whether the attempt count threshold been exceeded. + */ + @JsonProperty(value = "attemptCountThresholdIsExceeded") + private Boolean attemptCountThresholdIsExceeded; + + /** + * The duration of the event. + */ + @JsonProperty(value = "timeSpan") + private String timeSpan; + + /** + * A value indicating whether the IP address has been whitelisted. + */ + @JsonProperty(value = "isWhitelistedIpAddress") + private Boolean isWhitelistedIpAddress; + + /** + * The network location. + */ + @JsonProperty(value = "networkLocation") + private String networkLocation; + + /** + * The attempted count threshold on trigger. + */ + @JsonProperty(value = "attemptCountThresholdOnTrigger") + private Integer attemptCountThresholdOnTrigger; + + /** + * The attempted threshold type on trigger. + */ + @JsonProperty(value = "attemptThresholdTypeOnTrigger") + private String attemptThresholdTypeOnTrigger; + + /** + * The geographic location. + */ + @JsonProperty(value = "geographicLocation") + private String geographicLocation; + + /** + * Get unique ID for the entree. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set unique ID for the entree. + * + * @param id the id value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the tenant ID. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenant ID. + * + * @param tenantId the tenantId value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the service ID. + * + * @return the serviceId value + */ + public String serviceId() { + return this.serviceId; + } + + /** + * Set the service ID. + * + * @param serviceId the serviceId value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withServiceId(String serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * Get the IP address from where the attempted login originated from. + * + * @return the ipAddress value + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the IP address from where the attempted login originated from. + * + * @param ipAddress the ipAddress value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get when the event occurred. + * + * @return the timestamp value + */ + public String timestamp() { + return this.timestamp; + } + + /** + * Set when the event occurred. + * + * @param timestamp the timestamp value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withTimestamp(String timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the first audit timestamp. + * + * @return the firstAuditTimestamp value + */ + public String firstAuditTimestamp() { + return this.firstAuditTimestamp; + } + + /** + * Set the first audit timestamp. + * + * @param firstAuditTimestamp the firstAuditTimestamp value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withFirstAuditTimestamp(String firstAuditTimestamp) { + this.firstAuditTimestamp = firstAuditTimestamp; + return this; + } + + /** + * Get the last audit timestamp. + * + * @return the lastAuditTimestamp value + */ + public String lastAuditTimestamp() { + return this.lastAuditTimestamp; + } + + /** + * Set the last audit timestamp. + * + * @param lastAuditTimestamp the lastAuditTimestamp value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withLastAuditTimestamp(String lastAuditTimestamp) { + this.lastAuditTimestamp = lastAuditTimestamp; + return this; + } + + /** + * Get the extranet lockout error count. + * + * @return the extranetLockoutErrorCount value + */ + public Integer extranetLockoutErrorCount() { + return this.extranetLockoutErrorCount; + } + + /** + * Set the extranet lockout error count. + * + * @param extranetLockoutErrorCount the extranetLockoutErrorCount value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withExtranetLockoutErrorCount(Integer extranetLockoutErrorCount) { + this.extranetLockoutErrorCount = extranetLockoutErrorCount; + return this; + } + + /** + * Get the bad password error count. + * + * @return the badPasswordErrorCount value + */ + public Integer badPasswordErrorCount() { + return this.badPasswordErrorCount; + } + + /** + * Set the bad password error count. + * + * @param badPasswordErrorCount the badPasswordErrorCount value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withBadPasswordErrorCount(Integer badPasswordErrorCount) { + this.badPasswordErrorCount = badPasswordErrorCount; + return this; + } + + /** + * Get the unique usernames attempted. + * + * @return the uniqueUsernamesAttemptedCount value + */ + public Integer uniqueUsernamesAttemptedCount() { + return this.uniqueUsernamesAttemptedCount; + } + + /** + * Set the unique usernames attempted. + * + * @param uniqueUsernamesAttemptedCount the uniqueUsernamesAttemptedCount value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withUniqueUsernamesAttemptedCount(Integer uniqueUsernamesAttemptedCount) { + this.uniqueUsernamesAttemptedCount = uniqueUsernamesAttemptedCount; + return this; + } + + /** + * Get a value indicating whether the attempt count threshold been exceeded. + * + * @return the attemptCountThresholdIsExceeded value + */ + public Boolean attemptCountThresholdIsExceeded() { + return this.attemptCountThresholdIsExceeded; + } + + /** + * Set a value indicating whether the attempt count threshold been exceeded. + * + * @param attemptCountThresholdIsExceeded the attemptCountThresholdIsExceeded value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withAttemptCountThresholdIsExceeded(Boolean attemptCountThresholdIsExceeded) { + this.attemptCountThresholdIsExceeded = attemptCountThresholdIsExceeded; + return this; + } + + /** + * Get the duration of the event. + * + * @return the timeSpan value + */ + public String timeSpan() { + return this.timeSpan; + } + + /** + * Set the duration of the event. + * + * @param timeSpan the timeSpan value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withTimeSpan(String timeSpan) { + this.timeSpan = timeSpan; + return this; + } + + /** + * Get a value indicating whether the IP address has been whitelisted. + * + * @return the isWhitelistedIpAddress value + */ + public Boolean isWhitelistedIpAddress() { + return this.isWhitelistedIpAddress; + } + + /** + * Set a value indicating whether the IP address has been whitelisted. + * + * @param isWhitelistedIpAddress the isWhitelistedIpAddress value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withIsWhitelistedIpAddress(Boolean isWhitelistedIpAddress) { + this.isWhitelistedIpAddress = isWhitelistedIpAddress; + return this; + } + + /** + * Get the network location. + * + * @return the networkLocation value + */ + public String networkLocation() { + return this.networkLocation; + } + + /** + * Set the network location. + * + * @param networkLocation the networkLocation value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withNetworkLocation(String networkLocation) { + this.networkLocation = networkLocation; + return this; + } + + /** + * Get the attempted count threshold on trigger. + * + * @return the attemptCountThresholdOnTrigger value + */ + public Integer attemptCountThresholdOnTrigger() { + return this.attemptCountThresholdOnTrigger; + } + + /** + * Set the attempted count threshold on trigger. + * + * @param attemptCountThresholdOnTrigger the attemptCountThresholdOnTrigger value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withAttemptCountThresholdOnTrigger(Integer attemptCountThresholdOnTrigger) { + this.attemptCountThresholdOnTrigger = attemptCountThresholdOnTrigger; + return this; + } + + /** + * Get the attempted threshold type on trigger. + * + * @return the attemptThresholdTypeOnTrigger value + */ + public String attemptThresholdTypeOnTrigger() { + return this.attemptThresholdTypeOnTrigger; + } + + /** + * Set the attempted threshold type on trigger. + * + * @param attemptThresholdTypeOnTrigger the attemptThresholdTypeOnTrigger value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withAttemptThresholdTypeOnTrigger(String attemptThresholdTypeOnTrigger) { + this.attemptThresholdTypeOnTrigger = attemptThresholdTypeOnTrigger; + return this; + } + + /** + * Get the geographic location. + * + * @return the geographicLocation value + */ + public String geographicLocation() { + return this.geographicLocation; + } + + /** + * Set the geographic location. + * + * @param geographicLocation the geographicLocation value to set + * @return the IPAddressAggregateInner object itself. + */ + public IPAddressAggregateInner withGeographicLocation(String geographicLocation) { + this.geographicLocation = geographicLocation; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/IPAddressAggregateSettingImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/IPAddressAggregateSettingImpl.java new file mode 100644 index 0000000000000..35097eab3288e --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/IPAddressAggregateSettingImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.IPAddressAggregateSetting; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class IPAddressAggregateSettingImpl extends WrapperImpl implements IPAddressAggregateSetting { + private final ADHybridHealthServiceManager manager; + IPAddressAggregateSettingImpl(IPAddressAggregateSettingInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public Integer badPasswordAndExtranetLockoutCombinedDailyThreshold() { + return this.inner().badPasswordAndExtranetLockoutCombinedDailyThreshold(); + } + + @Override + public Integer badPasswordAndExtranetLockoutCombinedHourlyThreshold() { + return this.inner().badPasswordAndExtranetLockoutCombinedHourlyThreshold(); + } + + @Override + public Boolean emailNotificationEnabled() { + return this.inner().emailNotificationEnabled(); + } + + @Override + public Integer extranetLockoutDailyThreshold() { + return this.inner().extranetLockoutDailyThreshold(); + } + + @Override + public Integer extranetLockoutHourlyThreshold() { + return this.inner().extranetLockoutHourlyThreshold(); + } + + @Override + public String id() { + return this.inner().id(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/IPAddressAggregateSettingInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/IPAddressAggregateSettingInner.java new file mode 100644 index 0000000000000..8dad5f4fd06f5 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/IPAddressAggregateSettingInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The key value pair for IP aggregate thresholds. + */ +public class IPAddressAggregateSettingInner { + /** + * Unique ID for the entree. + */ + @JsonProperty(value = "id") + private String id; + + /** + * This threshold setting defines the per day trigger for a new event to be + * generated in the report. + */ + @JsonProperty(value = "badPasswordAndExtranetLockoutCombinedDailyThreshold") + private Integer badPasswordAndExtranetLockoutCombinedDailyThreshold; + + /** + * This threshold setting defines the per hour trigger for a new event to + * be generated in the report. + */ + @JsonProperty(value = "badPasswordAndExtranetLockoutCombinedHourlyThreshold") + private Integer badPasswordAndExtranetLockoutCombinedHourlyThreshold; + + /** + * This threshold setting defines the per hour trigger for a new event to + * be generated in the report. + */ + @JsonProperty(value = "extranetLockoutDailyThreshold") + private Integer extranetLockoutDailyThreshold; + + /** + * This threshold setting defines the per hour trigger for a new event to + * be generated in the report. + */ + @JsonProperty(value = "extranetLockoutHourlyThreshold") + private Integer extranetLockoutHourlyThreshold; + + /** + * A value indicating whether email notification has been enabled. + */ + @JsonProperty(value = "emailNotificationEnabled") + private Boolean emailNotificationEnabled; + + /** + * Get unique ID for the entree. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set unique ID for the entree. + * + * @param id the id value to set + * @return the IPAddressAggregateSettingInner object itself. + */ + public IPAddressAggregateSettingInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get this threshold setting defines the per day trigger for a new event to be generated in the report. + * + * @return the badPasswordAndExtranetLockoutCombinedDailyThreshold value + */ + public Integer badPasswordAndExtranetLockoutCombinedDailyThreshold() { + return this.badPasswordAndExtranetLockoutCombinedDailyThreshold; + } + + /** + * Set this threshold setting defines the per day trigger for a new event to be generated in the report. + * + * @param badPasswordAndExtranetLockoutCombinedDailyThreshold the badPasswordAndExtranetLockoutCombinedDailyThreshold value to set + * @return the IPAddressAggregateSettingInner object itself. + */ + public IPAddressAggregateSettingInner withBadPasswordAndExtranetLockoutCombinedDailyThreshold(Integer badPasswordAndExtranetLockoutCombinedDailyThreshold) { + this.badPasswordAndExtranetLockoutCombinedDailyThreshold = badPasswordAndExtranetLockoutCombinedDailyThreshold; + return this; + } + + /** + * Get this threshold setting defines the per hour trigger for a new event to be generated in the report. + * + * @return the badPasswordAndExtranetLockoutCombinedHourlyThreshold value + */ + public Integer badPasswordAndExtranetLockoutCombinedHourlyThreshold() { + return this.badPasswordAndExtranetLockoutCombinedHourlyThreshold; + } + + /** + * Set this threshold setting defines the per hour trigger for a new event to be generated in the report. + * + * @param badPasswordAndExtranetLockoutCombinedHourlyThreshold the badPasswordAndExtranetLockoutCombinedHourlyThreshold value to set + * @return the IPAddressAggregateSettingInner object itself. + */ + public IPAddressAggregateSettingInner withBadPasswordAndExtranetLockoutCombinedHourlyThreshold(Integer badPasswordAndExtranetLockoutCombinedHourlyThreshold) { + this.badPasswordAndExtranetLockoutCombinedHourlyThreshold = badPasswordAndExtranetLockoutCombinedHourlyThreshold; + return this; + } + + /** + * Get this threshold setting defines the per hour trigger for a new event to be generated in the report. + * + * @return the extranetLockoutDailyThreshold value + */ + public Integer extranetLockoutDailyThreshold() { + return this.extranetLockoutDailyThreshold; + } + + /** + * Set this threshold setting defines the per hour trigger for a new event to be generated in the report. + * + * @param extranetLockoutDailyThreshold the extranetLockoutDailyThreshold value to set + * @return the IPAddressAggregateSettingInner object itself. + */ + public IPAddressAggregateSettingInner withExtranetLockoutDailyThreshold(Integer extranetLockoutDailyThreshold) { + this.extranetLockoutDailyThreshold = extranetLockoutDailyThreshold; + return this; + } + + /** + * Get this threshold setting defines the per hour trigger for a new event to be generated in the report. + * + * @return the extranetLockoutHourlyThreshold value + */ + public Integer extranetLockoutHourlyThreshold() { + return this.extranetLockoutHourlyThreshold; + } + + /** + * Set this threshold setting defines the per hour trigger for a new event to be generated in the report. + * + * @param extranetLockoutHourlyThreshold the extranetLockoutHourlyThreshold value to set + * @return the IPAddressAggregateSettingInner object itself. + */ + public IPAddressAggregateSettingInner withExtranetLockoutHourlyThreshold(Integer extranetLockoutHourlyThreshold) { + this.extranetLockoutHourlyThreshold = extranetLockoutHourlyThreshold; + return this; + } + + /** + * Get a value indicating whether email notification has been enabled. + * + * @return the emailNotificationEnabled value + */ + public Boolean emailNotificationEnabled() { + return this.emailNotificationEnabled; + } + + /** + * Set a value indicating whether email notification has been enabled. + * + * @param emailNotificationEnabled the emailNotificationEnabled value to set + * @return the IPAddressAggregateSettingInner object itself. + */ + public IPAddressAggregateSettingInner withEmailNotificationEnabled(Boolean emailNotificationEnabled) { + this.emailNotificationEnabled = emailNotificationEnabled; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/IdParsingUtils.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/IdParsingUtils.java new file mode 100644 index 0000000000000..14917b243d1a9 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_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.adhybridhealthservice.v2014_01_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/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ItemInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ItemInner.java new file mode 100644 index 0000000000000..8d4e0033b9418 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ItemInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The key value pair for properties. + */ +public class ItemInner { + /** + * The key for the property. + */ + @JsonProperty(value = "key") + private String key; + + /** + * The value for the key. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the key for the property. + * + * @return the key value + */ + public String key() { + return this.key; + } + + /** + * Set the key for the property. + * + * @param key the key value to set + * @return the ItemInner object itself. + */ + public ItemInner withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the value for the key. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the value for the key. + * + * @param value the value value to set + * @return the ItemInner object itself. + */ + public ItemInner withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ListsImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ListsImpl.java new file mode 100644 index 0000000000000..9c4cf256c2d7e --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ListsImpl.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. + * abc + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Lists; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.IPAddressAggregate; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.IPAddressAggregateSetting; + +class ListsImpl extends WrapperImpl implements Lists { + private final ADHybridHealthServiceManager manager; + + ListsImpl(ADHybridHealthServiceManager manager) { + super(manager.inner().lists()); + this.manager = manager; + } + + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + private IPAddressAggregateImpl wrapIPAddressAggregateModel(IPAddressAggregateInner inner) { + return new IPAddressAggregateImpl(inner, manager()); + } + + @Override + public Observable iPAddressAggregatesByServiceAsync(final String serviceName) { + ListsInner client = this.inner(); + return client.iPAddressAggregatesByServiceAsync(serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public IPAddressAggregate call(IPAddressAggregateInner inner) { + return wrapIPAddressAggregateModel(inner); + } + }); + } + + @Override + public Observable iPAddressAggregateSettingsAsync(String serviceName) { + ListsInner client = this.inner(); + return client.iPAddressAggregateSettingsAsync(serviceName) + .map(new Func1() { + @Override + public IPAddressAggregateSetting call(IPAddressAggregateSettingInner inner) { + return new IPAddressAggregateSettingImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ListsInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ListsInner.java new file mode 100644 index 0000000000000..a0d80cac7fea1 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ListsInner.java @@ -0,0 +1,484 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.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 Lists. + */ +public class ListsInner { + /** The Retrofit service to perform REST calls. */ + private ListsService service; + /** The service client containing this operation class. */ + private ADHybridHealthServiceImpl client; + + /** + * Initializes an instance of ListsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ListsInner(Retrofit retrofit, ADHybridHealthServiceImpl client) { + this.service = retrofit.create(ListsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Lists to be + * used by Retrofit to perform actually REST calls. + */ + interface ListsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Lists iPAddressAggregatesByService" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/ipAddressAggregates") + Observable> iPAddressAggregatesByService(@Path("serviceName") String serviceName, @Query("skiptoken") String skiptoken, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Lists iPAddressAggregateSettings" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/ipAddressAggregateSettings") + Observable> iPAddressAggregateSettings(@Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Lists iPAddressAggregatesByServiceNext" }) + @GET + Observable> iPAddressAggregatesByServiceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the IP address aggregates for a given service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<IPAddressAggregateInner> object if successful. + */ + public PagedList iPAddressAggregatesByService(final String serviceName) { + ServiceResponse> response = iPAddressAggregatesByServiceSinglePageAsync(serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return iPAddressAggregatesByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the IP address aggregates for a given service. + * + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> iPAddressAggregatesByServiceAsync(final String serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + iPAddressAggregatesByServiceSinglePageAsync(serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return iPAddressAggregatesByServiceNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the IP address aggregates for a given service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IPAddressAggregateInner> object + */ + public Observable> iPAddressAggregatesByServiceAsync(final String serviceName) { + return iPAddressAggregatesByServiceWithServiceResponseAsync(serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the IP address aggregates for a given service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IPAddressAggregateInner> object + */ + public Observable>> iPAddressAggregatesByServiceWithServiceResponseAsync(final String serviceName) { + return iPAddressAggregatesByServiceSinglePageAsync(serviceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(iPAddressAggregatesByServiceNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the IP address aggregates for a given service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IPAddressAggregateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> iPAddressAggregatesByServiceSinglePageAsync(final String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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; + return service.iPAddressAggregatesByService(serviceName, skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = iPAddressAggregatesByServiceDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the IP address aggregates for a given service. + * + * @param serviceName The name of the service. + * @param skiptoken A continuationtoken value returned in paginated result to load different pages. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<IPAddressAggregateInner> object if successful. + */ + public PagedList iPAddressAggregatesByService(final String serviceName, final String skiptoken) { + ServiceResponse> response = iPAddressAggregatesByServiceSinglePageAsync(serviceName, skiptoken).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return iPAddressAggregatesByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the IP address aggregates for a given service. + * + * @param serviceName The name of the service. + * @param skiptoken A continuationtoken value returned in paginated result to load different pages. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> iPAddressAggregatesByServiceAsync(final String serviceName, final String skiptoken, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + iPAddressAggregatesByServiceSinglePageAsync(serviceName, skiptoken), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return iPAddressAggregatesByServiceNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the IP address aggregates for a given service. + * + * @param serviceName The name of the service. + * @param skiptoken A continuationtoken value returned in paginated result to load different pages. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IPAddressAggregateInner> object + */ + public Observable> iPAddressAggregatesByServiceAsync(final String serviceName, final String skiptoken) { + return iPAddressAggregatesByServiceWithServiceResponseAsync(serviceName, skiptoken) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the IP address aggregates for a given service. + * + * @param serviceName The name of the service. + * @param skiptoken A continuationtoken value returned in paginated result to load different pages. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IPAddressAggregateInner> object + */ + public Observable>> iPAddressAggregatesByServiceWithServiceResponseAsync(final String serviceName, final String skiptoken) { + return iPAddressAggregatesByServiceSinglePageAsync(serviceName, skiptoken) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(iPAddressAggregatesByServiceNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the IP address aggregates for a given service. + * + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param skiptoken A continuationtoken value returned in paginated result to load different pages. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IPAddressAggregateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> iPAddressAggregatesByServiceSinglePageAsync(final String serviceName, final String skiptoken) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.iPAddressAggregatesByService(serviceName, skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = iPAddressAggregatesByServiceDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> iPAddressAggregatesByServiceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the IP address aggregate settings. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the IPAddressAggregateSettingInner object if successful. + */ + public IPAddressAggregateSettingInner iPAddressAggregateSettings(String serviceName) { + return iPAddressAggregateSettingsWithServiceResponseAsync(serviceName).toBlocking().single().body(); + } + + /** + * Gets the IP address aggregate settings. + * + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture iPAddressAggregateSettingsAsync(String serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(iPAddressAggregateSettingsWithServiceResponseAsync(serviceName), serviceCallback); + } + + /** + * Gets the IP address aggregate settings. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IPAddressAggregateSettingInner object + */ + public Observable iPAddressAggregateSettingsAsync(String serviceName) { + return iPAddressAggregateSettingsWithServiceResponseAsync(serviceName).map(new Func1, IPAddressAggregateSettingInner>() { + @Override + public IPAddressAggregateSettingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the IP address aggregate settings. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IPAddressAggregateSettingInner object + */ + public Observable> iPAddressAggregateSettingsWithServiceResponseAsync(String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.iPAddressAggregateSettings(serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = iPAddressAggregateSettingsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse iPAddressAggregateSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the IP address aggregates for a given service. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<IPAddressAggregateInner> object if successful. + */ + public PagedList iPAddressAggregatesByServiceNext(final String nextPageLink) { + ServiceResponse> response = iPAddressAggregatesByServiceNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return iPAddressAggregatesByServiceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the IP address aggregates for a given service. + * + * @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> iPAddressAggregatesByServiceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + iPAddressAggregatesByServiceNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return iPAddressAggregatesByServiceNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the IP address aggregates for a given service. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IPAddressAggregateInner> object + */ + public Observable> iPAddressAggregatesByServiceNextAsync(final String nextPageLink) { + return iPAddressAggregatesByServiceNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the IP address aggregates for a given service. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<IPAddressAggregateInner> object + */ + public Observable>> iPAddressAggregatesByServiceNextWithServiceResponseAsync(final String nextPageLink) { + return iPAddressAggregatesByServiceNextSinglePageAsync(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(iPAddressAggregatesByServiceNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the IP address aggregates for a given service. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<IPAddressAggregateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> iPAddressAggregatesByServiceNextSinglePageAsync(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.iPAddressAggregatesByServiceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = iPAddressAggregatesByServiceNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> iPAddressAggregatesByServiceNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MergedExportErrorImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MergedExportErrorImpl.java new file mode 100644 index 0000000000000..ba9270a9d1ce9 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MergedExportErrorImpl.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MergedExportError; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import org.joda.time.DateTime; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AssociatedObject; +import java.util.UUID; + +class MergedExportErrorImpl extends WrapperImpl implements MergedExportError { + private final ADHybridHealthServiceManager manager; + MergedExportErrorImpl(MergedExportErrorInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public String attributeName() { + return this.inner().attributeName(); + } + + @Override + public String attributeValue() { + return this.inner().attributeValue(); + } + + @Override + public DateTime createdDate() { + return this.inner().createdDate(); + } + + @Override + public String csObjectId() { + return this.inner().csObjectId(); + } + + @Override + public String dn() { + return this.inner().dn(); + } + + @Override + public AssociatedObject existingObject() { + return this.inner().existingObject(); + } + + @Override + public Integer exportErrorStatus() { + return this.inner().exportErrorStatus(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public AssociatedObject incomingObject() { + return this.inner().incomingObject(); + } + + @Override + public String incomingObjectDisplayName() { + return this.inner().incomingObjectDisplayName(); + } + + @Override + public String incomingObjectType() { + return this.inner().incomingObjectType(); + } + + @Override + public UUID mergedEntityId() { + return this.inner().mergedEntityId(); + } + + @Override + public String modifiedOrRemovedAttributeValue() { + return this.inner().modifiedOrRemovedAttributeValue(); + } + + @Override + public UUID runStepResultId() { + return this.inner().runStepResultId(); + } + + @Override + public String samAccountName() { + return this.inner().samAccountName(); + } + + @Override + public String serverErrorDetail() { + return this.inner().serverErrorDetail(); + } + + @Override + public UUID serviceId() { + return this.inner().serviceId(); + } + + @Override + public UUID serviceMemberId() { + return this.inner().serviceMemberId(); + } + + @Override + public DateTime timeFirstOccurred() { + return this.inner().timeFirstOccurred(); + } + + @Override + public DateTime timeOccurred() { + return this.inner().timeOccurred(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public String userPrincipalName() { + return this.inner().userPrincipalName(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MergedExportErrorInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MergedExportErrorInner.java new file mode 100644 index 0000000000000..48b63b63d296b --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MergedExportErrorInner.java @@ -0,0 +1,592 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AssociatedObject; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The merged export error. + */ +public class MergedExportErrorInner { + /** + * The error Id. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The incoming object display name. + */ + @JsonProperty(value = "incomingObjectDisplayName") + private String incomingObjectDisplayName; + + /** + * The incoming object type. + */ + @JsonProperty(value = "incomingObjectType") + private String incomingObjectType; + + /** + * The user principal name. + */ + @JsonProperty(value = "userPrincipalName") + private String userPrincipalName; + + /** + * The type of the error. + */ + @JsonProperty(value = "type") + private String type; + + /** + * The attribute name. + */ + @JsonProperty(value = "attributeName") + private String attributeName; + + /** + * The attribute value. + */ + @JsonProperty(value = "attributeValue") + private String attributeValue; + + /** + * The date and time when the error occurred. + */ + @JsonProperty(value = "timeOccurred") + private DateTime timeOccurred; + + /** + * The time when the error first occurred. + */ + @JsonProperty(value = "timeFirstOccurred") + private DateTime timeFirstOccurred; + + /** + * the cs object Id. + */ + @JsonProperty(value = "csObjectId") + private String csObjectId; + + /** + * the DN of the object. + */ + @JsonProperty(value = "dn") + private String dn; + + /** + * The incoming object details. + */ + @JsonProperty(value = "incomingObject") + private AssociatedObject incomingObject; + + /** + * The existing object. + */ + @JsonProperty(value = "existingObject") + private AssociatedObject existingObject; + + /** + * The modified or removed attribute value. + */ + @JsonProperty(value = "modifiedOrRemovedAttributeValue") + private String modifiedOrRemovedAttributeValue; + + /** + * The run step result Id. + */ + @JsonProperty(value = "runStepResultId") + private UUID runStepResultId; + + /** + * The sam account name. + */ + @JsonProperty(value = "samAccountName") + private String samAccountName; + + /** + * The server error details. + */ + @JsonProperty(value = "serverErrorDetail") + private String serverErrorDetail; + + /** + * The service Id. + */ + @JsonProperty(value = "serviceId") + private UUID serviceId; + + /** + * The server Id. + */ + @JsonProperty(value = "serviceMemberId") + private UUID serviceMemberId; + + /** + * The merged entity Id. + */ + @JsonProperty(value = "mergedEntityId") + private UUID mergedEntityId; + + /** + * The date and time, in UTC, when the error was created. + */ + @JsonProperty(value = "createdDate") + private DateTime createdDate; + + /** + * The export error status. + */ + @JsonProperty(value = "exportErrorStatus") + private Integer exportErrorStatus; + + /** + * Get the error Id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the error Id. + * + * @param id the id value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the incoming object display name. + * + * @return the incomingObjectDisplayName value + */ + public String incomingObjectDisplayName() { + return this.incomingObjectDisplayName; + } + + /** + * Set the incoming object display name. + * + * @param incomingObjectDisplayName the incomingObjectDisplayName value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withIncomingObjectDisplayName(String incomingObjectDisplayName) { + this.incomingObjectDisplayName = incomingObjectDisplayName; + return this; + } + + /** + * Get the incoming object type. + * + * @return the incomingObjectType value + */ + public String incomingObjectType() { + return this.incomingObjectType; + } + + /** + * Set the incoming object type. + * + * @param incomingObjectType the incomingObjectType value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withIncomingObjectType(String incomingObjectType) { + this.incomingObjectType = incomingObjectType; + return this; + } + + /** + * Get the user principal name. + * + * @return the userPrincipalName value + */ + public String userPrincipalName() { + return this.userPrincipalName; + } + + /** + * Set the user principal name. + * + * @param userPrincipalName the userPrincipalName value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withUserPrincipalName(String userPrincipalName) { + this.userPrincipalName = userPrincipalName; + return this; + } + + /** + * Get the type of the error. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the type of the error. + * + * @param type the type value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withType(String type) { + this.type = type; + return this; + } + + /** + * Get the attribute name. + * + * @return the attributeName value + */ + public String attributeName() { + return this.attributeName; + } + + /** + * Set the attribute name. + * + * @param attributeName the attributeName value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withAttributeName(String attributeName) { + this.attributeName = attributeName; + return this; + } + + /** + * Get the attribute value. + * + * @return the attributeValue value + */ + public String attributeValue() { + return this.attributeValue; + } + + /** + * Set the attribute value. + * + * @param attributeValue the attributeValue value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + return this; + } + + /** + * Get the date and time when the error occurred. + * + * @return the timeOccurred value + */ + public DateTime timeOccurred() { + return this.timeOccurred; + } + + /** + * Set the date and time when the error occurred. + * + * @param timeOccurred the timeOccurred value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withTimeOccurred(DateTime timeOccurred) { + this.timeOccurred = timeOccurred; + return this; + } + + /** + * Get the time when the error first occurred. + * + * @return the timeFirstOccurred value + */ + public DateTime timeFirstOccurred() { + return this.timeFirstOccurred; + } + + /** + * Set the time when the error first occurred. + * + * @param timeFirstOccurred the timeFirstOccurred value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withTimeFirstOccurred(DateTime timeFirstOccurred) { + this.timeFirstOccurred = timeFirstOccurred; + return this; + } + + /** + * Get the cs object Id. + * + * @return the csObjectId value + */ + public String csObjectId() { + return this.csObjectId; + } + + /** + * Set the cs object Id. + * + * @param csObjectId the csObjectId value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withCsObjectId(String csObjectId) { + this.csObjectId = csObjectId; + return this; + } + + /** + * Get the DN of the object. + * + * @return the dn value + */ + public String dn() { + return this.dn; + } + + /** + * Set the DN of the object. + * + * @param dn the dn value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withDn(String dn) { + this.dn = dn; + return this; + } + + /** + * Get the incoming object details. + * + * @return the incomingObject value + */ + public AssociatedObject incomingObject() { + return this.incomingObject; + } + + /** + * Set the incoming object details. + * + * @param incomingObject the incomingObject value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withIncomingObject(AssociatedObject incomingObject) { + this.incomingObject = incomingObject; + return this; + } + + /** + * Get the existing object. + * + * @return the existingObject value + */ + public AssociatedObject existingObject() { + return this.existingObject; + } + + /** + * Set the existing object. + * + * @param existingObject the existingObject value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withExistingObject(AssociatedObject existingObject) { + this.existingObject = existingObject; + return this; + } + + /** + * Get the modified or removed attribute value. + * + * @return the modifiedOrRemovedAttributeValue value + */ + public String modifiedOrRemovedAttributeValue() { + return this.modifiedOrRemovedAttributeValue; + } + + /** + * Set the modified or removed attribute value. + * + * @param modifiedOrRemovedAttributeValue the modifiedOrRemovedAttributeValue value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withModifiedOrRemovedAttributeValue(String modifiedOrRemovedAttributeValue) { + this.modifiedOrRemovedAttributeValue = modifiedOrRemovedAttributeValue; + return this; + } + + /** + * Get the run step result Id. + * + * @return the runStepResultId value + */ + public UUID runStepResultId() { + return this.runStepResultId; + } + + /** + * Set the run step result Id. + * + * @param runStepResultId the runStepResultId value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withRunStepResultId(UUID runStepResultId) { + this.runStepResultId = runStepResultId; + return this; + } + + /** + * Get the sam account name. + * + * @return the samAccountName value + */ + public String samAccountName() { + return this.samAccountName; + } + + /** + * Set the sam account name. + * + * @param samAccountName the samAccountName value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withSamAccountName(String samAccountName) { + this.samAccountName = samAccountName; + return this; + } + + /** + * Get the server error details. + * + * @return the serverErrorDetail value + */ + public String serverErrorDetail() { + return this.serverErrorDetail; + } + + /** + * Set the server error details. + * + * @param serverErrorDetail the serverErrorDetail value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withServerErrorDetail(String serverErrorDetail) { + this.serverErrorDetail = serverErrorDetail; + return this; + } + + /** + * Get the service Id. + * + * @return the serviceId value + */ + public UUID serviceId() { + return this.serviceId; + } + + /** + * Set the service Id. + * + * @param serviceId the serviceId value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withServiceId(UUID serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * Get the server Id. + * + * @return the serviceMemberId value + */ + public UUID serviceMemberId() { + return this.serviceMemberId; + } + + /** + * Set the server Id. + * + * @param serviceMemberId the serviceMemberId value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withServiceMemberId(UUID serviceMemberId) { + this.serviceMemberId = serviceMemberId; + return this; + } + + /** + * Get the merged entity Id. + * + * @return the mergedEntityId value + */ + public UUID mergedEntityId() { + return this.mergedEntityId; + } + + /** + * Set the merged entity Id. + * + * @param mergedEntityId the mergedEntityId value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withMergedEntityId(UUID mergedEntityId) { + this.mergedEntityId = mergedEntityId; + return this; + } + + /** + * Get the date and time, in UTC, when the error was created. + * + * @return the createdDate value + */ + public DateTime createdDate() { + return this.createdDate; + } + + /** + * Set the date and time, in UTC, when the error was created. + * + * @param createdDate the createdDate value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withCreatedDate(DateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get the export error status. + * + * @return the exportErrorStatus value + */ + public Integer exportErrorStatus() { + return this.exportErrorStatus; + } + + /** + * Set the export error status. + * + * @param exportErrorStatus the exportErrorStatus value to set + * @return the MergedExportErrorInner object itself. + */ + public MergedExportErrorInner withExportErrorStatus(Integer exportErrorStatus) { + this.exportErrorStatus = exportErrorStatus; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MetricMetadataImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MetricMetadataImpl.java new file mode 100644 index 0000000000000..201a8342fd396 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MetricMetadataImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MetricMetadata; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MetricGroup; + +class MetricMetadataImpl extends WrapperImpl implements MetricMetadata { + private final ADHybridHealthServiceManager manager; + MetricMetadataImpl(MetricMetadataInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public List groupings() { + return this.inner().groupings(); + } + + @Override + public Boolean isDefault() { + return this.inner().isDefault(); + } + + @Override + public Boolean isDevOps() { + return this.inner().isDevOps(); + } + + @Override + public Boolean isPerfCounter() { + return this.inner().isPerfCounter(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public Integer maxValue() { + return this.inner().maxValue(); + } + + @Override + public String metricName() { + return this.inner().metricName(); + } + + @Override + public String metricsProcessorClassName() { + return this.inner().metricsProcessorClassName(); + } + + @Override + public Integer minValue() { + return this.inner().minValue(); + } + + @Override + public String valueKind() { + return this.inner().valueKind(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MetricMetadataInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MetricMetadataInner.java new file mode 100644 index 0000000000000..2e303272d0a1a --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MetricMetadataInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MetricGroup; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The metric meta data. + */ +public class MetricMetadataInner { + /** + * The name of the class which retrieve and process the metric. + */ + @JsonProperty(value = "metricsProcessorClassName") + private String metricsProcessorClassName; + + /** + * The metric name. + */ + @JsonProperty(value = "metricName") + private String metricName; + + /** + * The groupings for the metrics. + */ + @JsonProperty(value = "groupings") + private List groupings; + + /** + * The display name for the metric. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Indicates if the metrics is a rate,value, percent or duration type. + */ + @JsonProperty(value = "valueKind") + private String valueKind; + + /** + * The minimum value. + */ + @JsonProperty(value = "minValue") + private Integer minValue; + + /** + * The maximum value. + */ + @JsonProperty(value = "maxValue") + private Integer maxValue; + + /** + * Indicates whether the dashboard to represent the metric is a line, + * bar,pie, area or donut chart. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Indicates if the metric is a default metric or not. + */ + @JsonProperty(value = "isDefault") + private Boolean isDefault; + + /** + * Indicates if the metric is a performance counter metric or not. + */ + @JsonProperty(value = "isPerfCounter") + private Boolean isPerfCounter; + + /** + * Indicates if the metric is visible to DevOps or not. + */ + @JsonProperty(value = "isDevOps") + private Boolean isDevOps; + + /** + * Get the name of the class which retrieve and process the metric. + * + * @return the metricsProcessorClassName value + */ + public String metricsProcessorClassName() { + return this.metricsProcessorClassName; + } + + /** + * Set the name of the class which retrieve and process the metric. + * + * @param metricsProcessorClassName the metricsProcessorClassName value to set + * @return the MetricMetadataInner object itself. + */ + public MetricMetadataInner withMetricsProcessorClassName(String metricsProcessorClassName) { + this.metricsProcessorClassName = metricsProcessorClassName; + return this; + } + + /** + * Get the metric name. + * + * @return the metricName value + */ + public String metricName() { + return this.metricName; + } + + /** + * Set the metric name. + * + * @param metricName the metricName value to set + * @return the MetricMetadataInner object itself. + */ + public MetricMetadataInner withMetricName(String metricName) { + this.metricName = metricName; + return this; + } + + /** + * Get the groupings for the metrics. + * + * @return the groupings value + */ + public List groupings() { + return this.groupings; + } + + /** + * Set the groupings for the metrics. + * + * @param groupings the groupings value to set + * @return the MetricMetadataInner object itself. + */ + public MetricMetadataInner withGroupings(List groupings) { + this.groupings = groupings; + return this; + } + + /** + * Get the display name for the metric. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name for the metric. + * + * @param displayName the displayName value to set + * @return the MetricMetadataInner object itself. + */ + public MetricMetadataInner withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get indicates if the metrics is a rate,value, percent or duration type. + * + * @return the valueKind value + */ + public String valueKind() { + return this.valueKind; + } + + /** + * Set indicates if the metrics is a rate,value, percent or duration type. + * + * @param valueKind the valueKind value to set + * @return the MetricMetadataInner object itself. + */ + public MetricMetadataInner withValueKind(String valueKind) { + this.valueKind = valueKind; + return this; + } + + /** + * Get the minimum value. + * + * @return the minValue value + */ + public Integer minValue() { + return this.minValue; + } + + /** + * Set the minimum value. + * + * @param minValue the minValue value to set + * @return the MetricMetadataInner object itself. + */ + public MetricMetadataInner withMinValue(Integer minValue) { + this.minValue = minValue; + return this; + } + + /** + * Get the maximum value. + * + * @return the maxValue value + */ + public Integer maxValue() { + return this.maxValue; + } + + /** + * Set the maximum value. + * + * @param maxValue the maxValue value to set + * @return the MetricMetadataInner object itself. + */ + public MetricMetadataInner withMaxValue(Integer maxValue) { + this.maxValue = maxValue; + return this; + } + + /** + * Get indicates whether the dashboard to represent the metric is a line, bar,pie, area or donut chart. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + + /** + * Set indicates whether the dashboard to represent the metric is a line, bar,pie, area or donut chart. + * + * @param kind the kind value to set + * @return the MetricMetadataInner object itself. + */ + public MetricMetadataInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get indicates if the metric is a default metric or not. + * + * @return the isDefault value + */ + public Boolean isDefault() { + return this.isDefault; + } + + /** + * Set indicates if the metric is a default metric or not. + * + * @param isDefault the isDefault value to set + * @return the MetricMetadataInner object itself. + */ + public MetricMetadataInner withIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get indicates if the metric is a performance counter metric or not. + * + * @return the isPerfCounter value + */ + public Boolean isPerfCounter() { + return this.isPerfCounter; + } + + /** + * Set indicates if the metric is a performance counter metric or not. + * + * @param isPerfCounter the isPerfCounter value to set + * @return the MetricMetadataInner object itself. + */ + public MetricMetadataInner withIsPerfCounter(Boolean isPerfCounter) { + this.isPerfCounter = isPerfCounter; + return this; + } + + /** + * Get indicates if the metric is visible to DevOps or not. + * + * @return the isDevOps value + */ + public Boolean isDevOps() { + return this.isDevOps; + } + + /** + * Set indicates if the metric is visible to DevOps or not. + * + * @param isDevOps the isDevOps value to set + * @return the MetricMetadataInner object itself. + */ + public MetricMetadataInner withIsDevOps(Boolean isDevOps) { + this.isDevOps = isDevOps; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MetricServiceMetricSetsImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MetricServiceMetricSetsImpl.java new file mode 100644 index 0000000000000..67dcec34be6b6 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MetricServiceMetricSetsImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MetricServiceMetricSets; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MetricSet; +import org.joda.time.DateTime; + +class MetricServiceMetricSetsImpl extends WrapperImpl implements MetricServiceMetricSets { + private final ADHybridHealthServiceManager manager; + private String serviceName; + private String metricName; + private String groupName; + + MetricServiceMetricSetsImpl(MetricSetsInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public List sets() { + return this.inner().sets(); + } + + @Override + public List timeStamps() { + return this.inner().timeStamps(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MetricSetsInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MetricSetsInner.java new file mode 100644 index 0000000000000..5283ca79c66be --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/MetricSetsInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MetricSet; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The metrics data represented set. + */ +public class MetricSetsInner { + /** + * The list of metric set. + */ + @JsonProperty(value = "sets") + private List sets; + + /** + * The list of timestamps for each metric in the metric set. + */ + @JsonProperty(value = "timeStamps") + private List timeStamps; + + /** + * Get the list of metric set. + * + * @return the sets value + */ + public List sets() { + return this.sets; + } + + /** + * Set the list of metric set. + * + * @param sets the sets value to set + * @return the MetricSetsInner object itself. + */ + public MetricSetsInner withSets(List sets) { + this.sets = sets; + return this; + } + + /** + * Get the list of timestamps for each metric in the metric set. + * + * @return the timeStamps value + */ + public List timeStamps() { + return this.timeStamps; + } + + /** + * Set the list of timestamps for each metric in the metric set. + * + * @param timeStamps the timeStamps value to set + * @return the MetricSetsInner object itself. + */ + public MetricSetsInner withTimeStamps(List timeStamps) { + this.timeStamps = timeStamps; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/OperationImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/OperationImpl.java new file mode 100644 index 0000000000000..a8b0e01855f04 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/OperationImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Operation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class OperationImpl extends WrapperImpl implements Operation { + private final ADHybridHealthServiceManager manager; + OperationImpl(OperationInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public Object display() { + return this.inner().display(); + } + + @Override + public String name() { + return this.inner().name(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/OperationInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/OperationInner.java new file mode 100644 index 0000000000000..4e1484e6fe7d2 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/OperationInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The details of the operation. + */ +public class OperationInner { + /** + * The name of the operation. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The display details for the operation. + */ + @JsonProperty(value = "display") + private Object display; + + /** + * Get the name of the operation. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the operation. + * + * @param name the name value to set + * @return the OperationInner object itself. + */ + public OperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display details for the operation. + * + * @return the display value + */ + public Object display() { + return this.display; + } + + /** + * Set the display details for the operation. + * + * @param display the display value to set + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(Object display) { + this.display = display; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/OperationsImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..c7a54a2439586 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/OperationsImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Operations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Operation; + +class OperationsImpl extends WrapperImpl implements Operations { + private final ADHybridHealthServiceManager manager; + + OperationsImpl(ADHybridHealthServiceManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Operation call(OperationInner inner) { + return new OperationImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/OperationsInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/OperationsInner.java new file mode 100644 index 0000000000000..d5cd003de9dc6 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/OperationsInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private ADHybridHealthServiceImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, ADHybridHealthServiceImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Operations list" }) + @GET("providers/Microsoft.ADHybridHealthService/operations") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Operations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists the available Azure Data Factory API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OperationInner> object if successful. + */ + 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(); + } + }; + } + + /** + * Lists the available Azure Data Factory API operations. + * + * @param serviceCallback 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); + } + + /** + * Lists the available Azure Data Factory API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the available Azure Data Factory API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> 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)); + } + }); + } + + /** + * Lists the available Azure Data Factory API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists the available Azure Data Factory API operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OperationInner> 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(); + } + }; + } + + /** + * Lists the available Azure Data Factory API operations. + * + * @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); + } + + /** + * Lists the available Azure Data Factory API operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists the available Azure Data Factory API operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> 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)); + } + }); + } + + /** + * Lists the available Azure Data Factory API operations. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/PageImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/PageImpl.java new file mode 100644 index 0000000000000..cd68a2da06e74 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_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.adhybridhealthservice.v2014_01_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/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/PageImpl1.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/PageImpl1.java new file mode 100644 index 0000000000000..5189d91ec1db5 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/PageImpl1.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.adhybridhealthservice.v2014_01_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 PageImpl1 implements Page { + /** + * The link to the next page. + */ + @JsonProperty("") + 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 PageImpl1 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 PageImpl1 setItems(List items) { + this.items = items; + return this; + } +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReplicationStatusImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReplicationStatusImpl.java new file mode 100644 index 0000000000000..ee540744de0bb --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReplicationStatusImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ReplicationStatus; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class ReplicationStatusImpl extends WrapperImpl implements ReplicationStatus { + private final ADHybridHealthServiceManager manager; + ReplicationStatusImpl(ReplicationStatusInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public Integer errorDcCount() { + return this.inner().errorDcCount(); + } + + @Override + public String forestName() { + return this.inner().forestName(); + } + + @Override + public Integer totalDcCount() { + return this.inner().totalDcCount(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReplicationStatusInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReplicationStatusInner.java new file mode 100644 index 0000000000000..e7bfe57a3f150 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReplicationStatusInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Replication summary for a domain controller. + */ +public class ReplicationStatusInner { + /** + * The forest name. + */ + @JsonProperty(value = "forestName") + private String forestName; + + /** + * The total number of domain controllers for a given forest. + */ + @JsonProperty(value = "totalDcCount") + private Integer totalDcCount; + + /** + * The total number of domain controllers with error in a given forest. + */ + @JsonProperty(value = "errorDcCount") + private Integer errorDcCount; + + /** + * Get the forest name. + * + * @return the forestName value + */ + public String forestName() { + return this.forestName; + } + + /** + * Set the forest name. + * + * @param forestName the forestName value to set + * @return the ReplicationStatusInner object itself. + */ + public ReplicationStatusInner withForestName(String forestName) { + this.forestName = forestName; + return this; + } + + /** + * Get the total number of domain controllers for a given forest. + * + * @return the totalDcCount value + */ + public Integer totalDcCount() { + return this.totalDcCount; + } + + /** + * Set the total number of domain controllers for a given forest. + * + * @param totalDcCount the totalDcCount value to set + * @return the ReplicationStatusInner object itself. + */ + public ReplicationStatusInner withTotalDcCount(Integer totalDcCount) { + this.totalDcCount = totalDcCount; + return this; + } + + /** + * Get the total number of domain controllers with error in a given forest. + * + * @return the errorDcCount value + */ + public Integer errorDcCount() { + return this.errorDcCount; + } + + /** + * Set the total number of domain controllers with error in a given forest. + * + * @param errorDcCount the errorDcCount value to set + * @return the ReplicationStatusInner object itself. + */ + public ReplicationStatusInner withErrorDcCount(Integer errorDcCount) { + this.errorDcCount = errorDcCount; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReplicationSummaryImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReplicationSummaryImpl.java new file mode 100644 index 0000000000000..261ec1a30229b --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReplicationSummaryImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ReplicationSummary; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.InboundReplicationNeighbor; +import org.joda.time.DateTime; + +class ReplicationSummaryImpl extends WrapperImpl implements ReplicationSummary { + private final ADHybridHealthServiceManager manager; + + ReplicationSummaryImpl(ReplicationSummaryInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public String domain() { + return this.inner().domain(); + } + + @Override + public List inboundNeighborCollection() { + return this.inner().inboundNeighborCollection(); + } + + @Override + public DateTime lastAttemptedSync() { + return this.inner().lastAttemptedSync(); + } + + @Override + public DateTime lastSuccessfulSync() { + return this.inner().lastSuccessfulSync(); + } + + @Override + public String site() { + return this.inner().site(); + } + + @Override + public Integer status() { + return this.inner().status(); + } + + @Override + public String targetServer() { + return this.inner().targetServer(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReplicationSummaryInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReplicationSummaryInner.java new file mode 100644 index 0000000000000..38176b019811f --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReplicationSummaryInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.InboundReplicationNeighbor; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The replication summary for a domain controller. + */ +public class ReplicationSummaryInner { + /** + * The domain controller name. + */ + @JsonProperty(value = "targetServer") + private String targetServer; + + /** + * The site name for a given domain controller. + */ + @JsonProperty(value = "site") + private String site; + + /** + * The domain name for a given domain controller. + */ + @JsonProperty(value = "domain") + private String domain; + + /** + * The health status for a domain controller. + */ + @JsonProperty(value = "status") + private Integer status; + + /** + * The last time when a sync was attempted for a given domain controller. + */ + @JsonProperty(value = "lastAttemptedSync") + private DateTime lastAttemptedSync; + + /** + * The time when the last successful sync happened for a given domain + * controller. + */ + @JsonProperty(value = "lastSuccessfulSync") + private DateTime lastSuccessfulSync; + + /** + * List of individual domain controller neighbor's inbound replication + * status. + */ + @JsonProperty(value = "inboundNeighborCollection") + private List inboundNeighborCollection; + + /** + * Get the domain controller name. + * + * @return the targetServer value + */ + public String targetServer() { + return this.targetServer; + } + + /** + * Set the domain controller name. + * + * @param targetServer the targetServer value to set + * @return the ReplicationSummaryInner object itself. + */ + public ReplicationSummaryInner withTargetServer(String targetServer) { + this.targetServer = targetServer; + return this; + } + + /** + * Get the site name for a given domain controller. + * + * @return the site value + */ + public String site() { + return this.site; + } + + /** + * Set the site name for a given domain controller. + * + * @param site the site value to set + * @return the ReplicationSummaryInner object itself. + */ + public ReplicationSummaryInner withSite(String site) { + this.site = site; + return this; + } + + /** + * Get the domain name for a given domain controller. + * + * @return the domain value + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain name for a given domain controller. + * + * @param domain the domain value to set + * @return the ReplicationSummaryInner object itself. + */ + public ReplicationSummaryInner withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the health status for a domain controller. + * + * @return the status value + */ + public Integer status() { + return this.status; + } + + /** + * Set the health status for a domain controller. + * + * @param status the status value to set + * @return the ReplicationSummaryInner object itself. + */ + public ReplicationSummaryInner withStatus(Integer status) { + this.status = status; + return this; + } + + /** + * Get the last time when a sync was attempted for a given domain controller. + * + * @return the lastAttemptedSync value + */ + public DateTime lastAttemptedSync() { + return this.lastAttemptedSync; + } + + /** + * Set the last time when a sync was attempted for a given domain controller. + * + * @param lastAttemptedSync the lastAttemptedSync value to set + * @return the ReplicationSummaryInner object itself. + */ + public ReplicationSummaryInner withLastAttemptedSync(DateTime lastAttemptedSync) { + this.lastAttemptedSync = lastAttemptedSync; + return this; + } + + /** + * Get the time when the last successful sync happened for a given domain controller. + * + * @return the lastSuccessfulSync value + */ + public DateTime lastSuccessfulSync() { + return this.lastSuccessfulSync; + } + + /** + * Set the time when the last successful sync happened for a given domain controller. + * + * @param lastSuccessfulSync the lastSuccessfulSync value to set + * @return the ReplicationSummaryInner object itself. + */ + public ReplicationSummaryInner withLastSuccessfulSync(DateTime lastSuccessfulSync) { + this.lastSuccessfulSync = lastSuccessfulSync; + return this; + } + + /** + * Get list of individual domain controller neighbor's inbound replication status. + * + * @return the inboundNeighborCollection value + */ + public List inboundNeighborCollection() { + return this.inboundNeighborCollection; + } + + /** + * Set list of individual domain controller neighbor's inbound replication status. + * + * @param inboundNeighborCollection the inboundNeighborCollection value to set + * @return the ReplicationSummaryInner object itself. + */ + public ReplicationSummaryInner withInboundNeighborCollection(List inboundNeighborCollection) { + this.inboundNeighborCollection = inboundNeighborCollection; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReportsImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReportsImpl.java new file mode 100644 index 0000000000000..ccda4b911ca4a --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReportsImpl.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. + * abc + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Reports; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Result; + +class ReportsImpl extends WrapperImpl implements Reports { + private final ADHybridHealthServiceManager manager; + + ReportsImpl(ADHybridHealthServiceManager manager) { + super(manager.inner().reports()); + this.manager = manager; + } + + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public Observable getDevOpsAsync() { + ReportsInner client = this.inner(); + return client.getDevOpsAsync() + .map(new Func1() { + @Override + public Result call(ResultInner inner) { + return new ResultImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReportsInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReportsInner.java new file mode 100644 index 0000000000000..4e424f32ac811 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ReportsInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Reports. + */ +public class ReportsInner { + /** The Retrofit service to perform REST calls. */ + private ReportsService service; + /** The service client containing this operation class. */ + private ADHybridHealthServiceImpl client; + + /** + * Initializes an instance of ReportsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ReportsInner(Retrofit retrofit, ADHybridHealthServiceImpl client) { + this.service = retrofit.create(ReportsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Reports to be + * used by Retrofit to perform actually REST calls. + */ + interface ReportsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Reports getDevOps" }) + @GET("providers/Microsoft.ADHybridHealthService/reports/DevOps/IsDevOps") + Observable> getDevOps(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Checks if the user is enabled for Dev Ops access. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ResultInner object if successful. + */ + public ResultInner getDevOps() { + return getDevOpsWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Checks if the user is enabled for Dev Ops 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 getDevOpsAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getDevOpsWithServiceResponseAsync(), serviceCallback); + } + + /** + * Checks if the user is enabled for Dev Ops access. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ResultInner object + */ + public Observable getDevOpsAsync() { + return getDevOpsWithServiceResponseAsync().map(new Func1, ResultInner>() { + @Override + public ResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks if the user is enabled for Dev Ops access. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ResultInner object + */ + public Observable> getDevOpsWithServiceResponseAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getDevOps(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDevOpsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDevOpsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ResultImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ResultImpl.java new file mode 100644 index 0000000000000..d69fc5a4ec3ba --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ResultImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Result; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class ResultImpl extends WrapperImpl implements Result { + private final ADHybridHealthServiceManager manager; + ResultImpl(ResultInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public Boolean value() { + return this.inner().value(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ResultInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ResultInner.java new file mode 100644 index 0000000000000..8ebe08f37c285 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ResultInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The result for an operation. + */ +public class ResultInner { + /** + * The value. + */ + @JsonProperty(value = "value") + private Boolean value; + + /** + * Get the value. + * + * @return the value value + */ + public Boolean value() { + return this.value; + } + + /** + * Set the value. + * + * @param value the value value to set + * @return the ResultInner object itself. + */ + public ResultInner withValue(Boolean value) { + this.value = value; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/RiskyIPBlobUriImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/RiskyIPBlobUriImpl.java new file mode 100644 index 0000000000000..154f29aa355c5 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/RiskyIPBlobUriImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.RiskyIPBlobUri; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import org.joda.time.DateTime; + +class RiskyIPBlobUriImpl extends WrapperImpl implements RiskyIPBlobUri { + private final ADHybridHealthServiceManager manager; + RiskyIPBlobUriImpl(RiskyIPBlobUriInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public DateTime blobCreateDateTime() { + return this.inner().blobCreateDateTime(); + } + + @Override + public DateTime jobCompletionTime() { + return this.inner().jobCompletionTime(); + } + + @Override + public String resultSasUri() { + return this.inner().resultSasUri(); + } + + @Override + public String serviceId() { + return this.inner().serviceId(); + } + + @Override + public String status() { + return this.inner().status(); + } + + @Override + public String tenantId() { + return this.inner().tenantId(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/RiskyIPBlobUriInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/RiskyIPBlobUriInner.java new file mode 100644 index 0000000000000..b7feed715a431 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/RiskyIPBlobUriInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The blob uri pointing to Risky IP Report. + */ +public class RiskyIPBlobUriInner { + /** + * The tenant id for whom the report belongs to. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /** + * The service id for whom the report belongs to. + */ + @JsonProperty(value = "serviceId") + private String serviceId; + + /** + * The blob uri for the report. + */ + @JsonProperty(value = "resultSasUri") + private String resultSasUri; + + /** + * Time at which the new Risky IP report was requested. + */ + @JsonProperty(value = "blobCreateDateTime") + private DateTime blobCreateDateTime; + + /** + * Time at which the blob creation job for the new Risky IP report was + * completed. + */ + @JsonProperty(value = "jobCompletionTime") + private DateTime jobCompletionTime; + + /** + * Status of the Risky IP report generation. + */ + @JsonProperty(value = "status") + private String status; + + /** + * Get the tenant id for whom the report belongs to. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenant id for whom the report belongs to. + * + * @param tenantId the tenantId value to set + * @return the RiskyIPBlobUriInner object itself. + */ + public RiskyIPBlobUriInner withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the service id for whom the report belongs to. + * + * @return the serviceId value + */ + public String serviceId() { + return this.serviceId; + } + + /** + * Set the service id for whom the report belongs to. + * + * @param serviceId the serviceId value to set + * @return the RiskyIPBlobUriInner object itself. + */ + public RiskyIPBlobUriInner withServiceId(String serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * Get the blob uri for the report. + * + * @return the resultSasUri value + */ + public String resultSasUri() { + return this.resultSasUri; + } + + /** + * Set the blob uri for the report. + * + * @param resultSasUri the resultSasUri value to set + * @return the RiskyIPBlobUriInner object itself. + */ + public RiskyIPBlobUriInner withResultSasUri(String resultSasUri) { + this.resultSasUri = resultSasUri; + return this; + } + + /** + * Get time at which the new Risky IP report was requested. + * + * @return the blobCreateDateTime value + */ + public DateTime blobCreateDateTime() { + return this.blobCreateDateTime; + } + + /** + * Set time at which the new Risky IP report was requested. + * + * @param blobCreateDateTime the blobCreateDateTime value to set + * @return the RiskyIPBlobUriInner object itself. + */ + public RiskyIPBlobUriInner withBlobCreateDateTime(DateTime blobCreateDateTime) { + this.blobCreateDateTime = blobCreateDateTime; + return this; + } + + /** + * Get time at which the blob creation job for the new Risky IP report was completed. + * + * @return the jobCompletionTime value + */ + public DateTime jobCompletionTime() { + return this.jobCompletionTime; + } + + /** + * Set time at which the blob creation job for the new Risky IP report was completed. + * + * @param jobCompletionTime the jobCompletionTime value to set + * @return the RiskyIPBlobUriInner object itself. + */ + public RiskyIPBlobUriInner withJobCompletionTime(DateTime jobCompletionTime) { + this.jobCompletionTime = jobCompletionTime; + return this; + } + + /** + * Get status of the Risky IP report generation. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set status of the Risky IP report generation. + * + * @param status the status value to set + * @return the RiskyIPBlobUriInner object itself. + */ + public RiskyIPBlobUriInner withStatus(String status) { + this.status = status; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceAlertImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceAlertImpl.java new file mode 100644 index 0000000000000..dc3a42021871e --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceAlertImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceAlert; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.ArrayList; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceItem; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AdditionalInformation; +import java.util.UUID; +import org.joda.time.DateTime; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Level; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.HelpLink; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.State; + +class ServiceAlertImpl extends WrapperImpl implements ServiceAlert { + private final ADHybridHealthServiceManager manager; + + ServiceAlertImpl(AlertInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public List activeAlertProperties() { + List lst = new ArrayList(); + if (this.inner().activeAlertProperties() != null) { + for (ItemInner inner : this.inner().activeAlertProperties()) { + lst.add( new ServiceItemImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List additionalInformation() { + return this.inner().additionalInformation(); + } + + @Override + public UUID alertId() { + return this.inner().alertId(); + } + + @Override + public DateTime createdDate() { + return this.inner().createdDate(); + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public DateTime lastUpdated() { + return this.inner().lastUpdated(); + } + + @Override + public Level level() { + return this.inner().level(); + } + + @Override + public String monitorRoleType() { + return this.inner().monitorRoleType(); + } + + @Override + public List relatedLinks() { + return this.inner().relatedLinks(); + } + + @Override + public String remediation() { + return this.inner().remediation(); + } + + @Override + public List resolvedAlertProperties() { + List lst = new ArrayList(); + if (this.inner().resolvedAlertProperties() != null) { + for (ItemInner inner : this.inner().resolvedAlertProperties()) { + lst.add( new ServiceItemImpl(inner, manager())); + } + } + return lst; + } + + @Override + public DateTime resolvedDate() { + return this.inner().resolvedDate(); + } + + @Override + public String scope() { + return this.inner().scope(); + } + + @Override + public UUID serviceId() { + return this.inner().serviceId(); + } + + @Override + public UUID serviceMemberId() { + return this.inner().serviceMemberId(); + } + + @Override + public String shortName() { + return this.inner().shortName(); + } + + @Override + public State state() { + return this.inner().state(); + } + + @Override + public UUID tenantId() { + return this.inner().tenantId(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceConfigurationImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceConfigurationImpl.java new file mode 100644 index 0000000000000..b1934e75c0ddd --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceConfigurationImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceConfiguration; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class ServiceConfigurationImpl extends WrapperImpl implements ServiceConfiguration { + private final ADHybridHealthServiceManager manager; + ServiceConfigurationImpl(ServiceConfigurationInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public String serviceAccount() { + return this.inner().serviceAccount(); + } + + @Override + public Integer serviceType() { + return this.inner().serviceType(); + } + + @Override + public String sqlDatabaseName() { + return this.inner().sqlDatabaseName(); + } + + @Override + public Integer sqlDatabaseSize() { + return this.inner().sqlDatabaseSize(); + } + + @Override + public String sqlEdition() { + return this.inner().sqlEdition(); + } + + @Override + public String sqlInstance() { + return this.inner().sqlInstance(); + } + + @Override + public String sqlServer() { + return this.inner().sqlServer(); + } + + @Override + public String sqlVersion() { + return this.inner().sqlVersion(); + } + + @Override + public String version() { + return this.inner().version(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceConfigurationInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceConfigurationInner.java new file mode 100644 index 0000000000000..32f86d5b38064 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceConfigurationInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The service configuration. + */ +public class ServiceConfigurationInner { + /** + * The version of the sync service. + */ + @JsonProperty(value = "version") + private String version; + + /** + * The service type of the server. + */ + @JsonProperty(value = "serviceType") + private Integer serviceType; + + /** + * The service account. + */ + @JsonProperty(value = "serviceAccount") + private String serviceAccount; + + /** + * The SQL server information. + */ + @JsonProperty(value = "sqlServer") + private String sqlServer; + + /** + * The SQL version. + */ + @JsonProperty(value = "sqlVersion") + private String sqlVersion; + + /** + * The SQL edition. + */ + @JsonProperty(value = "sqlEdition") + private String sqlEdition; + + /** + * The SQL instance details. + */ + @JsonProperty(value = "sqlInstance") + private String sqlInstance; + + /** + * The SQL database. + */ + @JsonProperty(value = "sqlDatabaseName") + private String sqlDatabaseName; + + /** + * The SQL database size. + */ + @JsonProperty(value = "sqlDatabaseSize") + private Integer sqlDatabaseSize; + + /** + * Get the version of the sync service. + * + * @return the version value + */ + public String version() { + return this.version; + } + + /** + * Set the version of the sync service. + * + * @param version the version value to set + * @return the ServiceConfigurationInner object itself. + */ + public ServiceConfigurationInner withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the service type of the server. + * + * @return the serviceType value + */ + public Integer serviceType() { + return this.serviceType; + } + + /** + * Set the service type of the server. + * + * @param serviceType the serviceType value to set + * @return the ServiceConfigurationInner object itself. + */ + public ServiceConfigurationInner withServiceType(Integer serviceType) { + this.serviceType = serviceType; + return this; + } + + /** + * Get the service account. + * + * @return the serviceAccount value + */ + public String serviceAccount() { + return this.serviceAccount; + } + + /** + * Set the service account. + * + * @param serviceAccount the serviceAccount value to set + * @return the ServiceConfigurationInner object itself. + */ + public ServiceConfigurationInner withServiceAccount(String serviceAccount) { + this.serviceAccount = serviceAccount; + return this; + } + + /** + * Get the SQL server information. + * + * @return the sqlServer value + */ + public String sqlServer() { + return this.sqlServer; + } + + /** + * Set the SQL server information. + * + * @param sqlServer the sqlServer value to set + * @return the ServiceConfigurationInner object itself. + */ + public ServiceConfigurationInner withSqlServer(String sqlServer) { + this.sqlServer = sqlServer; + return this; + } + + /** + * Get the SQL version. + * + * @return the sqlVersion value + */ + public String sqlVersion() { + return this.sqlVersion; + } + + /** + * Set the SQL version. + * + * @param sqlVersion the sqlVersion value to set + * @return the ServiceConfigurationInner object itself. + */ + public ServiceConfigurationInner withSqlVersion(String sqlVersion) { + this.sqlVersion = sqlVersion; + return this; + } + + /** + * Get the SQL edition. + * + * @return the sqlEdition value + */ + public String sqlEdition() { + return this.sqlEdition; + } + + /** + * Set the SQL edition. + * + * @param sqlEdition the sqlEdition value to set + * @return the ServiceConfigurationInner object itself. + */ + public ServiceConfigurationInner withSqlEdition(String sqlEdition) { + this.sqlEdition = sqlEdition; + return this; + } + + /** + * Get the SQL instance details. + * + * @return the sqlInstance value + */ + public String sqlInstance() { + return this.sqlInstance; + } + + /** + * Set the SQL instance details. + * + * @param sqlInstance the sqlInstance value to set + * @return the ServiceConfigurationInner object itself. + */ + public ServiceConfigurationInner withSqlInstance(String sqlInstance) { + this.sqlInstance = sqlInstance; + return this; + } + + /** + * Get the SQL database. + * + * @return the sqlDatabaseName value + */ + public String sqlDatabaseName() { + return this.sqlDatabaseName; + } + + /** + * Set the SQL database. + * + * @param sqlDatabaseName the sqlDatabaseName value to set + * @return the ServiceConfigurationInner object itself. + */ + public ServiceConfigurationInner withSqlDatabaseName(String sqlDatabaseName) { + this.sqlDatabaseName = sqlDatabaseName; + return this; + } + + /** + * Get the SQL database size. + * + * @return the sqlDatabaseSize value + */ + public Integer sqlDatabaseSize() { + return this.sqlDatabaseSize; + } + + /** + * Set the SQL database size. + * + * @param sqlDatabaseSize the sqlDatabaseSize value to set + * @return the ServiceConfigurationInner object itself. + */ + public ServiceConfigurationInner withSqlDatabaseSize(Integer sqlDatabaseSize) { + this.sqlDatabaseSize = sqlDatabaseSize; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceCredentialImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceCredentialImpl.java new file mode 100644 index 0000000000000..c51aec9a19f97 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceCredentialImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceCredential; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; + +class ServiceCredentialImpl extends WrapperImpl implements ServiceCredential { + private final ADHybridHealthServiceManager manager; + + ServiceCredentialImpl(CredentialInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public List credentialData() { + return this.inner().credentialData(); + } + + @Override + public String identifier() { + return this.inner().identifier(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceExportStatusImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceExportStatusImpl.java new file mode 100644 index 0000000000000..61424155c6565 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceExportStatusImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceExportStatus; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; +import java.util.UUID; + +class ServiceExportStatusImpl extends WrapperImpl implements ServiceExportStatus { + private final ADHybridHealthServiceManager manager; + + ServiceExportStatusImpl(ExportStatusInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public DateTime endTime() { + return this.inner().endTime(); + } + + @Override + public String runStepResultId() { + return this.inner().runStepResultId(); + } + + @Override + public UUID serviceId() { + return this.inner().serviceId(); + } + + @Override + public UUID serviceMemberId() { + return this.inner().serviceMemberId(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceItemImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceItemImpl.java new file mode 100644 index 0000000000000..d40cf82fbdbfa --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceItemImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceItem; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class ServiceItemImpl extends WrapperImpl implements ServiceItem { + private final ADHybridHealthServiceManager manager; + + ServiceItemImpl(ItemInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public String keyVal() { + return this.inner().key(); + } + + @Override + public String value() { + return this.inner().value(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceMemberInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceMemberInner.java new file mode 100644 index 0000000000000..eabdceba2b677 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceMemberInner.java @@ -0,0 +1,700 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MonitoringLevel; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The server properties for a given service. + */ +public class ServiceMemberInner { + /** + * The id of the server. + */ + @JsonProperty(value = "serviceMemberId") + private String serviceMemberId; + + /** + * The service id to whom this server belongs. + */ + @JsonProperty(value = "serviceId") + private String serviceId; + + /** + * The tenant id to whom this server belongs. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /** + * The total number of alerts that are currently active for the server. + */ + @JsonProperty(value = "activeAlerts") + private Integer activeAlerts; + + /** + * The additional information, if any, for the server. + */ + @JsonProperty(value = "additionalInformation") + private String additionalInformation; + + /** + * The date time , in UTC, when the server was onboarded to Azure Active + * Directory Connect Health. + */ + @JsonProperty(value = "createdDate") + private DateTime createdDate; + + /** + * The server specific configuration related dimensions. + */ + @JsonProperty(value = "dimensions") + private Object dimensions; + + /** + * Indicates if the server is disabled or not. + */ + @JsonProperty(value = "disabled") + private Boolean disabled; + + /** + * The reason for disabling the server. + */ + @JsonProperty(value = "disabledReason") + private Integer disabledReason; + + /** + * The list of installed QFEs for the server. + */ + @JsonProperty(value = "installedQfes") + private Object installedQfes; + + /** + * The date and time , in UTC, when the server was last disabled. + */ + @JsonProperty(value = "lastDisabled") + private DateTime lastDisabled; + + /** + * The date and time, in UTC, when the server was last rebooted. + */ + @JsonProperty(value = "lastReboot") + private DateTime lastReboot; + + /** + * The date and time, in UTC, when the server's data monitoring + * configuration was last changed. + */ + @JsonProperty(value = "lastServerReportedMonitoringLevelChange") + private DateTime lastServerReportedMonitoringLevelChange; + + /** + * The date and time, in UTC, when the server properties were last updated. + */ + @JsonProperty(value = "lastUpdated") + private DateTime lastUpdated; + + /** + * The id of the machine. + */ + @JsonProperty(value = "machineId") + private String machineId; + + /** + * The name of the server. + */ + @JsonProperty(value = "machineName") + private String machineName; + + /** + * The monitoring configuration of the server which determines what + * activities are monitored by Azure Active Directory Connect Health. + */ + @JsonProperty(value = "monitoringConfigurationsComputed") + private Object monitoringConfigurationsComputed; + + /** + * The customized monitoring configuration of the server which determines + * what activities are monitored by Azure Active Directory Connect Health. + */ + @JsonProperty(value = "monitoringConfigurationsCustomized") + private Object monitoringConfigurationsCustomized; + + /** + * The name of the operating system installed in the machine. + */ + @JsonProperty(value = "osName") + private String osName; + + /** + * The version of the operating system installed in the machine. + */ + @JsonProperty(value = "osVersion") + private String osVersion; + + /** + * Server specific properties. + */ + @JsonProperty(value = "properties") + private Object properties; + + /** + * The list of recommended hotfixes for the server. + */ + @JsonProperty(value = "recommendedQfes") + private Object recommendedQfes; + + /** + * The total count of alerts that are resolved for this server. + */ + @JsonProperty(value = "resolvedAlerts") + private Integer resolvedAlerts; + + /** + * The service role that is being monitored in the server. + */ + @JsonProperty(value = "role") + private String role; + + /** + * The monitoring level reported by the server. Possible values include: + * 'Partial', 'Full', 'Off'. + */ + @JsonProperty(value = "serverReportedMonitoringLevel") + private MonitoringLevel serverReportedMonitoringLevel; + + /** + * The health status of the server. + */ + @JsonProperty(value = "status") + private String status; + + /** + * Get the id of the server. + * + * @return the serviceMemberId value + */ + public String serviceMemberId() { + return this.serviceMemberId; + } + + /** + * Set the id of the server. + * + * @param serviceMemberId the serviceMemberId value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withServiceMemberId(String serviceMemberId) { + this.serviceMemberId = serviceMemberId; + return this; + } + + /** + * Get the service id to whom this server belongs. + * + * @return the serviceId value + */ + public String serviceId() { + return this.serviceId; + } + + /** + * Set the service id to whom this server belongs. + * + * @param serviceId the serviceId value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withServiceId(String serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * Get the tenant id to whom this server belongs. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenant id to whom this server belongs. + * + * @param tenantId the tenantId value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the total number of alerts that are currently active for the server. + * + * @return the activeAlerts value + */ + public Integer activeAlerts() { + return this.activeAlerts; + } + + /** + * Set the total number of alerts that are currently active for the server. + * + * @param activeAlerts the activeAlerts value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withActiveAlerts(Integer activeAlerts) { + this.activeAlerts = activeAlerts; + return this; + } + + /** + * Get the additional information, if any, for the server. + * + * @return the additionalInformation value + */ + public String additionalInformation() { + return this.additionalInformation; + } + + /** + * Set the additional information, if any, for the server. + * + * @param additionalInformation the additionalInformation value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withAdditionalInformation(String additionalInformation) { + this.additionalInformation = additionalInformation; + return this; + } + + /** + * Get the date time , in UTC, when the server was onboarded to Azure Active Directory Connect Health. + * + * @return the createdDate value + */ + public DateTime createdDate() { + return this.createdDate; + } + + /** + * Set the date time , in UTC, when the server was onboarded to Azure Active Directory Connect Health. + * + * @param createdDate the createdDate value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withCreatedDate(DateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get the server specific configuration related dimensions. + * + * @return the dimensions value + */ + public Object dimensions() { + return this.dimensions; + } + + /** + * Set the server specific configuration related dimensions. + * + * @param dimensions the dimensions value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withDimensions(Object dimensions) { + this.dimensions = dimensions; + return this; + } + + /** + * Get indicates if the server is disabled or not. + * + * @return the disabled value + */ + public Boolean disabled() { + return this.disabled; + } + + /** + * Set indicates if the server is disabled or not. + * + * @param disabled the disabled value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withDisabled(Boolean disabled) { + this.disabled = disabled; + return this; + } + + /** + * Get the reason for disabling the server. + * + * @return the disabledReason value + */ + public Integer disabledReason() { + return this.disabledReason; + } + + /** + * Set the reason for disabling the server. + * + * @param disabledReason the disabledReason value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withDisabledReason(Integer disabledReason) { + this.disabledReason = disabledReason; + return this; + } + + /** + * Get the list of installed QFEs for the server. + * + * @return the installedQfes value + */ + public Object installedQfes() { + return this.installedQfes; + } + + /** + * Set the list of installed QFEs for the server. + * + * @param installedQfes the installedQfes value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withInstalledQfes(Object installedQfes) { + this.installedQfes = installedQfes; + return this; + } + + /** + * Get the date and time , in UTC, when the server was last disabled. + * + * @return the lastDisabled value + */ + public DateTime lastDisabled() { + return this.lastDisabled; + } + + /** + * Set the date and time , in UTC, when the server was last disabled. + * + * @param lastDisabled the lastDisabled value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withLastDisabled(DateTime lastDisabled) { + this.lastDisabled = lastDisabled; + return this; + } + + /** + * Get the date and time, in UTC, when the server was last rebooted. + * + * @return the lastReboot value + */ + public DateTime lastReboot() { + return this.lastReboot; + } + + /** + * Set the date and time, in UTC, when the server was last rebooted. + * + * @param lastReboot the lastReboot value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withLastReboot(DateTime lastReboot) { + this.lastReboot = lastReboot; + return this; + } + + /** + * Get the date and time, in UTC, when the server's data monitoring configuration was last changed. + * + * @return the lastServerReportedMonitoringLevelChange value + */ + public DateTime lastServerReportedMonitoringLevelChange() { + return this.lastServerReportedMonitoringLevelChange; + } + + /** + * Set the date and time, in UTC, when the server's data monitoring configuration was last changed. + * + * @param lastServerReportedMonitoringLevelChange the lastServerReportedMonitoringLevelChange value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withLastServerReportedMonitoringLevelChange(DateTime lastServerReportedMonitoringLevelChange) { + this.lastServerReportedMonitoringLevelChange = lastServerReportedMonitoringLevelChange; + return this; + } + + /** + * Get the date and time, in UTC, when the server properties were last updated. + * + * @return the lastUpdated value + */ + public DateTime lastUpdated() { + return this.lastUpdated; + } + + /** + * Set the date and time, in UTC, when the server properties were last updated. + * + * @param lastUpdated the lastUpdated value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withLastUpdated(DateTime lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Get the id of the machine. + * + * @return the machineId value + */ + public String machineId() { + return this.machineId; + } + + /** + * Set the id of the machine. + * + * @param machineId the machineId value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withMachineId(String machineId) { + this.machineId = machineId; + return this; + } + + /** + * Get the name of the server. + * + * @return the machineName value + */ + public String machineName() { + return this.machineName; + } + + /** + * Set the name of the server. + * + * @param machineName the machineName value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withMachineName(String machineName) { + this.machineName = machineName; + return this; + } + + /** + * Get the monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health. + * + * @return the monitoringConfigurationsComputed value + */ + public Object monitoringConfigurationsComputed() { + return this.monitoringConfigurationsComputed; + } + + /** + * Set the monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health. + * + * @param monitoringConfigurationsComputed the monitoringConfigurationsComputed value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withMonitoringConfigurationsComputed(Object monitoringConfigurationsComputed) { + this.monitoringConfigurationsComputed = monitoringConfigurationsComputed; + return this; + } + + /** + * Get the customized monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health. + * + * @return the monitoringConfigurationsCustomized value + */ + public Object monitoringConfigurationsCustomized() { + return this.monitoringConfigurationsCustomized; + } + + /** + * Set the customized monitoring configuration of the server which determines what activities are monitored by Azure Active Directory Connect Health. + * + * @param monitoringConfigurationsCustomized the monitoringConfigurationsCustomized value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withMonitoringConfigurationsCustomized(Object monitoringConfigurationsCustomized) { + this.monitoringConfigurationsCustomized = monitoringConfigurationsCustomized; + return this; + } + + /** + * Get the name of the operating system installed in the machine. + * + * @return the osName value + */ + public String osName() { + return this.osName; + } + + /** + * Set the name of the operating system installed in the machine. + * + * @param osName the osName value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withOsName(String osName) { + this.osName = osName; + return this; + } + + /** + * Get the version of the operating system installed in the machine. + * + * @return the osVersion value + */ + public String osVersion() { + return this.osVersion; + } + + /** + * Set the version of the operating system installed in the machine. + * + * @param osVersion the osVersion value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withOsVersion(String osVersion) { + this.osVersion = osVersion; + return this; + } + + /** + * Get server specific properties. + * + * @return the properties value + */ + public Object properties() { + return this.properties; + } + + /** + * Set server specific properties. + * + * @param properties the properties value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withProperties(Object properties) { + this.properties = properties; + return this; + } + + /** + * Get the list of recommended hotfixes for the server. + * + * @return the recommendedQfes value + */ + public Object recommendedQfes() { + return this.recommendedQfes; + } + + /** + * Set the list of recommended hotfixes for the server. + * + * @param recommendedQfes the recommendedQfes value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withRecommendedQfes(Object recommendedQfes) { + this.recommendedQfes = recommendedQfes; + return this; + } + + /** + * Get the total count of alerts that are resolved for this server. + * + * @return the resolvedAlerts value + */ + public Integer resolvedAlerts() { + return this.resolvedAlerts; + } + + /** + * Set the total count of alerts that are resolved for this server. + * + * @param resolvedAlerts the resolvedAlerts value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withResolvedAlerts(Integer resolvedAlerts) { + this.resolvedAlerts = resolvedAlerts; + return this; + } + + /** + * Get the service role that is being monitored in the server. + * + * @return the role value + */ + public String role() { + return this.role; + } + + /** + * Set the service role that is being monitored in the server. + * + * @param role the role value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withRole(String role) { + this.role = role; + return this; + } + + /** + * Get the monitoring level reported by the server. Possible values include: 'Partial', 'Full', 'Off'. + * + * @return the serverReportedMonitoringLevel value + */ + public MonitoringLevel serverReportedMonitoringLevel() { + return this.serverReportedMonitoringLevel; + } + + /** + * Set the monitoring level reported by the server. Possible values include: 'Partial', 'Full', 'Off'. + * + * @param serverReportedMonitoringLevel the serverReportedMonitoringLevel value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withServerReportedMonitoringLevel(MonitoringLevel serverReportedMonitoringLevel) { + this.serverReportedMonitoringLevel = serverReportedMonitoringLevel; + return this; + } + + /** + * Get the health status of the server. + * + * @return the status value + */ + public String status() { + return this.status; + } + + /** + * Set the health status of the server. + * + * @param status the status value to set + * @return the ServiceMemberInner object itself. + */ + public ServiceMemberInner withStatus(String status) { + this.status = status; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceMembersImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceMembersImpl.java new file mode 100644 index 0000000000000..648fa593f3569 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceMembersImpl.java @@ -0,0 +1,310 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceServiceMember; +import com.microsoft.azure.Page; +import rx.Completable; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.GlobalConfiguration; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceConfiguration; +import java.util.UUID; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceServiceMember; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServicememberServiceAlert; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Connector; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceCredential; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServicememberServiceItem; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServicememberServiceExportStatus; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServicememberServiceMetricSets; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ConnectorMetadata; + +class ServiceMembersImpl extends WrapperImpl implements ServiceMembers { + private final ADHybridHealthServiceManager manager; + + ServiceMembersImpl(ADHybridHealthServiceManager manager) { + super(manager.inner().serviceMembers()); + this.manager = manager; + } + + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + private ServiceServiceMemberImpl wrapServiceServiceMemberModel(ServiceMemberInner inner) { + return new ServiceServiceMemberImpl(inner, manager()); + } + + private ServicememberServiceAlertImpl wrapServicememberServiceAlertModel(AlertInner inner) { + return new ServicememberServiceAlertImpl(inner, manager()); + } + + private ConnectorImpl wrapConnectorModel(ConnectorInner inner) { + return new ConnectorImpl(inner, manager()); + } + + private ServiceCredentialImpl wrapServiceCredentialModel(CredentialInner inner) { + return new ServiceCredentialImpl(inner, manager()); + } + + private ServicememberServiceItemImpl wrapServicememberServiceItemModel(ItemInner inner) { + return new ServicememberServiceItemImpl(inner, manager()); + } + + private ServicememberServiceExportStatusImpl wrapServicememberServiceExportStatusModel(ExportStatusInner inner) { + return new ServicememberServiceExportStatusImpl(inner, manager()); + } + + private ServicememberServiceMetricSetsImpl wrapServicememberServiceMetricSetsModel(MetricSetsInner inner) { + return new ServicememberServiceMetricSetsImpl(inner, manager()); + } + + private ConnectorMetadataImpl wrapConnectorMetadataModel(ConnectorMetadataInner inner) { + return new ConnectorMetadataImpl(inner, manager()); + } + + private Observable getServiceMemberInnerUsingServiceMembersInnerAsync(String id) { + String serviceName = IdParsingUtils.getValueFromIdByName(id, "services"); + String serviceMemberId = UUID.fromString(IdParsingUtils.getValueFromIdByName(id, "servicemembers")); + ServiceMembersInner client = this.inner(); + return client.getAsync(serviceName, serviceMemberId); + } + + private Observable getMetricSetsInnerUsingServiceMembersInnerAsync(String id) { + String serviceName = IdParsingUtils.getValueFromIdByName(id, "services"); + String serviceMemberId = UUID.fromString(IdParsingUtils.getValueFromIdByName(id, "servicemembers")); + String metricName = IdParsingUtils.getValueFromIdByName(id, "metrics"); + String groupName = IdParsingUtils.getValueFromIdByName(id, "groups"); + ServiceMembersInner client = this.inner(); + return client.getMetricsAsync(serviceName, metricName, groupName, serviceMemberId); + } + + private Observable getConnectorMetadataInnerUsingServiceMembersInnerAsync(String id) { + String serviceName = IdParsingUtils.getValueFromIdByName(id, "services"); + String serviceMemberId = UUID.fromString(IdParsingUtils.getValueFromIdByName(id, "servicemembers")); + String metricName = IdParsingUtils.getValueFromIdByName(id, "metrics"); + ServiceMembersInner client = this.inner(); + return client.getConnectorMetadataAsync(serviceName, serviceMemberId, metricName); + } + + @Override + public Observable getAsync(String serviceName, UUID serviceMemberId) { + ServiceMembersInner client = this.inner(); + return client.getAsync(serviceName, serviceMemberId) + .flatMap(new Func1>() { + @Override + public Observable call(ServiceMemberInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ServiceServiceMember)wrapServiceServiceMemberModel(inner)); + } + } + }); + } + + @Override + public Observable listAsync(final String serviceName) { + ServiceMembersInner client = this.inner(); + return client.listAsync(serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceServiceMember call(ServiceMemberInner inner) { + return wrapServiceServiceMemberModel(inner); + } + }); + } + + @Override + public Completable deleteAsync(String serviceName, UUID serviceMemberId) { + ServiceMembersInner client = this.inner(); + return client.deleteAsync(serviceName, serviceMemberId).toCompletable(); + } + + @Override + public Completable deleteDataAsync(String serviceName, UUID serviceMemberId) { + ServiceMembersInner client = this.inner(); + return client.deleteDataAsync(serviceName, serviceMemberId).toCompletable(); + } + + @Override + public Observable listGlobalConfigurationAsync(String serviceName, String serviceMemberId) { + ServiceMembersInner client = this.inner(); + return client.listGlobalConfigurationAsync(serviceName, serviceMemberId) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public GlobalConfiguration call(GlobalConfigurationInner inner) { + return new GlobalConfigurationImpl(inner, manager()); + } + }); + } + + @Override + public Observable getServiceConfigurationAsync(String serviceName, String serviceMemberId) { + ServiceMembersInner client = this.inner(); + return client.getServiceConfigurationAsync(serviceName, serviceMemberId) + .map(new Func1() { + @Override + public ServiceConfiguration call(ServiceConfigurationInner inner) { + return new ServiceConfigurationImpl(inner, manager()); + } + }); + } + + @Override + public Observable addAsync(String serviceName, ServiceMemberInner serviceMember) { + ServiceMembersInner client = this.inner(); + return client.addAsync(serviceName, serviceMember) + .map(new Func1() { + @Override + public AddsserviceServiceMember call(ServiceMemberInner inner) { + return new AddsserviceServiceMemberImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAlertsAsync(final UUID serviceMemberId, final String serviceName) { + ServiceMembersInner client = this.inner(); + return client.listAlertsAsync(serviceMemberId, serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServicememberServiceAlert call(AlertInner inner) { + return wrapServicememberServiceAlertModel(inner); + } + }); + } + + @Override + public Observable listConnectorsAsync(String serviceName, UUID serviceMemberId) { + ServiceMembersInner client = this.inner(); + return client.listConnectorsAsync(serviceName, serviceMemberId) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public Connector call(ConnectorInner inner) { + return wrapConnectorModel(inner); + } + }); + } + + @Override + public Observable listCredentialsAsync(String serviceName, UUID serviceMemberId) { + ServiceMembersInner client = this.inner(); + return client.listCredentialsAsync(serviceName, serviceMemberId) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public ServiceCredential call(CredentialInner inner) { + return wrapServiceCredentialModel(inner); + } + }); + } + + @Override + public Observable listDataFreshnessAsync(String serviceName, UUID serviceMemberId) { + ServiceMembersInner client = this.inner(); + return client.listDataFreshnessAsync(serviceName, serviceMemberId) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public ServicememberServiceItem call(ItemInner inner) { + return wrapServicememberServiceItemModel(inner); + } + }); + } + + @Override + public Observable listExportStatusAsync(final String serviceName, final UUID serviceMemberId) { + ServiceMembersInner client = this.inner(); + return client.listExportStatusAsync(serviceName, serviceMemberId) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServicememberServiceExportStatus call(ExportStatusInner inner) { + return wrapServicememberServiceExportStatusModel(inner); + } + }); + } + + @Override + public Observable getMetricsAsync(String serviceName, String metricName, String groupName, UUID serviceMemberId) { + ServiceMembersInner client = this.inner(); + return client.getMetricsAsync(serviceName, metricName, groupName, serviceMemberId) + .flatMap(new Func1>() { + @Override + public Observable call(MetricSetsInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ServicememberServiceMetricSets)wrapServicememberServiceMetricSetsModel(inner)); + } + } + }); + } + + @Override + public Observable getConnectorMetadataAsync(String serviceName, UUID serviceMemberId, String metricName) { + ServiceMembersInner client = this.inner(); + return client.getConnectorMetadataAsync(serviceName, serviceMemberId, metricName) + .flatMap(new Func1>() { + @Override + public Observable call(ConnectorMetadataInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ConnectorMetadata)wrapConnectorMetadataModel(inner)); + } + } + }); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceMembersInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceMembersInner.java new file mode 100644 index 0000000000000..22f8c6f8e892a --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceMembersInner.java @@ -0,0 +1,2306 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import java.util.UUID; +import okhttp3.ResponseBody; +import org.joda.time.DateTime; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.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 ServiceMembers. + */ +public class ServiceMembersInner implements InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private ServiceMembersService service; + /** The service client containing this operation class. */ + private ADHybridHealthServiceImpl client; + + /** + * Initializes an instance of ServiceMembersInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ServiceMembersInner(Retrofit retrofit, ADHybridHealthServiceImpl client) { + this.service = retrofit.create(ServiceMembersService.class); + this.client = client; + } + + /** + * The interface defining all the services for ServiceMembers to be + * used by Retrofit to perform actually REST calls. + */ + interface ServiceMembersService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers list" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers") + Observable> list(@Path("serviceName") String serviceName, @Query("$filter") String filter, @Query("dimensionType") String dimensionType, @Query("dimensionSignature") String dimensionSignature, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers add" }) + @POST("providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers") + Observable> add(@Path("serviceName") String serviceName, @Body ServiceMemberInner serviceMember, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers get" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}") + Observable> get(@Path("serviceName") String serviceName, @Path("serviceMemberId") UUID serviceMemberId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers delete" }) + @HTTP(path = "providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}", method = "DELETE", hasBody = true) + Observable> delete(@Path("serviceName") String serviceName, @Path("serviceMemberId") UUID serviceMemberId, @Query("confirm") Boolean confirm, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers listAlerts" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/alerts") + Observable> listAlerts(@Path("serviceMemberId") UUID serviceMemberId, @Path("serviceName") String serviceName, @Query("$filter") String filter, @Query("state") String state, @Query("from") DateTime from, @Query("to") DateTime to, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers listConnectors" }) + @GET("providers/Microsoft.ADHybridHealthService/service/{serviceName}/servicemembers/{serviceMemberId}/connectors") + Observable> listConnectors(@Path("serviceName") String serviceName, @Path("serviceMemberId") UUID serviceMemberId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers listCredentials" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/credentials") + Observable> listCredentials(@Path("serviceName") String serviceName, @Path("serviceMemberId") UUID serviceMemberId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers deleteData" }) + @HTTP(path = "providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/data", method = "DELETE", hasBody = true) + Observable> deleteData(@Path("serviceName") String serviceName, @Path("serviceMemberId") UUID serviceMemberId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers listDataFreshness" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/datafreshness") + Observable> listDataFreshness(@Path("serviceName") String serviceName, @Path("serviceMemberId") UUID serviceMemberId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers listExportStatus" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/exportstatus") + Observable> listExportStatus(@Path("serviceName") String serviceName, @Path("serviceMemberId") UUID serviceMemberId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers listGlobalConfiguration" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/globalconfiguration") + Observable> listGlobalConfiguration(@Path("serviceName") String serviceName, @Path("serviceMemberId") String serviceMemberId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers getMetrics" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/metrics/{metricName}/groups/{groupName}") + Observable> getMetrics(@Path("serviceName") String serviceName, @Path("metricName") String metricName, @Path("groupName") String groupName, @Path("serviceMemberId") UUID serviceMemberId, @Query("groupKey") String groupKey, @Query("fromDate") DateTime fromDate, @Query("toDate") DateTime toDate, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers getServiceConfiguration" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/serviceconfiguration") + Observable> getServiceConfiguration(@Path("serviceName") String serviceName, @Path("serviceMemberId") String serviceMemberId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers getConnectorMetadata" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/metrics/{metricName}") + Observable> getConnectorMetadata(@Path("serviceName") String serviceName, @Path("serviceMemberId") UUID serviceMemberId, @Path("metricName") String metricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceMembers 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.adhybridhealthservice.v2014_01_01.ServiceMembers listAlertsNext" }) + @GET + Observable> listAlertsNext(@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.adhybridhealthservice.v2014_01_01.ServiceMembers listExportStatusNext" }) + @GET + Observable> listExportStatusNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the details of the servers, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServiceMemberInner> object if successful. + */ + public PagedList list(final String serviceName) { + ServiceResponse> response = listSinglePageAsync(serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of the servers, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceCallback 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 serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of the servers, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceMemberInner> object + */ + public Observable> listAsync(final String serviceName) { + return listWithServiceResponseAsync(serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of the servers, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceMemberInner> object + */ + public Observable>> listWithServiceResponseAsync(final String serviceName) { + return listSinglePageAsync(serviceName) + .concatMap(new Func1>, 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)); + } + }); + } + + /** + * Gets the details of the servers, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceMemberInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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; + final String dimensionType = null; + final String dimensionSignature = null; + return service.list(serviceName, filter, dimensionType, dimensionSignature, 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); + } + } + }); + } + + /** + * Gets the details of the servers, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param filter The server property filter to apply. + * @param dimensionType The server specific dimension. + * @param dimensionSignature The value of the dimension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServiceMemberInner> object if successful. + */ + public PagedList list(final String serviceName, final String filter, final String dimensionType, final String dimensionSignature) { + ServiceResponse> response = listSinglePageAsync(serviceName, filter, dimensionType, dimensionSignature).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of the servers, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param filter The server property filter to apply. + * @param dimensionType The server specific dimension. + * @param dimensionSignature The value of the dimension. + * @param serviceCallback 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 serviceName, final String filter, final String dimensionType, final String dimensionSignature, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(serviceName, filter, dimensionType, dimensionSignature), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of the servers, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param filter The server property filter to apply. + * @param dimensionType The server specific dimension. + * @param dimensionSignature The value of the dimension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceMemberInner> object + */ + public Observable> listAsync(final String serviceName, final String filter, final String dimensionType, final String dimensionSignature) { + return listWithServiceResponseAsync(serviceName, filter, dimensionType, dimensionSignature) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of the servers, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param filter The server property filter to apply. + * @param dimensionType The server specific dimension. + * @param dimensionSignature The value of the dimension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceMemberInner> object + */ + public Observable>> listWithServiceResponseAsync(final String serviceName, final String filter, final String dimensionType, final String dimensionSignature) { + return listSinglePageAsync(serviceName, filter, dimensionType, dimensionSignature) + .concatMap(new Func1>, 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)); + } + }); + } + + /** + * Gets the details of the servers, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param filter The server property filter to apply. + ServiceResponse> * @param dimensionType The server specific dimension. + ServiceResponse> * @param dimensionSignature The value of the dimension. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceMemberInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String serviceName, final String filter, final String dimensionType, final String dimensionSignature) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required 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(serviceName, filter, dimensionType, dimensionSignature, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Onboards a server, for a given service, to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service under which the server is to be onboarded. + * @param serviceMember The server object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServiceMemberInner object if successful. + */ + public ServiceMemberInner add(String serviceName, ServiceMemberInner serviceMember) { + return addWithServiceResponseAsync(serviceName, serviceMember).toBlocking().single().body(); + } + + /** + * Onboards a server, for a given service, to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service under which the server is to be onboarded. + * @param serviceMember The server 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 addAsync(String serviceName, ServiceMemberInner serviceMember, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addWithServiceResponseAsync(serviceName, serviceMember), serviceCallback); + } + + /** + * Onboards a server, for a given service, to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service under which the server is to be onboarded. + * @param serviceMember The server object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceMemberInner object + */ + public Observable addAsync(String serviceName, ServiceMemberInner serviceMember) { + return addWithServiceResponseAsync(serviceName, serviceMember).map(new Func1, ServiceMemberInner>() { + @Override + public ServiceMemberInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Onboards a server, for a given service, to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service under which the server is to be onboarded. + * @param serviceMember The server object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceMemberInner object + */ + public Observable> addWithServiceResponseAsync(String serviceName, ServiceMemberInner serviceMember) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMember == null) { + throw new IllegalArgumentException("Parameter serviceMember 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(serviceMember); + return service.add(serviceName, serviceMember, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse addDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of a server, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServiceMemberInner object if successful. + */ + public ServiceMemberInner get(String serviceName, UUID serviceMemberId) { + return getWithServiceResponseAsync(serviceName, serviceMemberId).toBlocking().single().body(); + } + + /** + * Gets the details of a server, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server 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 getAsync(String serviceName, UUID serviceMemberId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(serviceName, serviceMemberId), serviceCallback); + } + + /** + * Gets the details of a server, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceMemberInner object + */ + public Observable getAsync(String serviceName, UUID serviceMemberId) { + return getWithServiceResponseAsync(serviceName, serviceMemberId).map(new Func1, ServiceMemberInner>() { + @Override + public ServiceMemberInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the details of a server, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceMemberInner object + */ + public Observable> getWithServiceResponseAsync(String serviceName, UUID serviceMemberId) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required 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(serviceName, serviceMemberId, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String serviceName, UUID serviceMemberId) { + deleteWithServiceResponseAsync(serviceName, serviceMemberId).toBlocking().single().body(); + } + + /** + * Deletes a server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server 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 deleteAsync(String serviceName, UUID serviceMemberId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(serviceName, serviceMemberId), serviceCallback); + } + + /** + * Deletes a server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String serviceName, UUID serviceMemberId) { + return deleteWithServiceResponseAsync(serviceName, serviceMemberId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String serviceName, UUID serviceMemberId) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId 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 confirm = null; + return service.delete(serviceName, serviceMemberId, confirm, 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 server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @param confirm Indicates if the server will be permanently deleted or disabled. True indicates that the server will be permanently deleted and False indicates that the server will be marked disabled and then deleted after 30 days, if it is not re-registered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String serviceName, UUID serviceMemberId, Boolean confirm) { + deleteWithServiceResponseAsync(serviceName, serviceMemberId, confirm).toBlocking().single().body(); + } + + /** + * Deletes a server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @param confirm Indicates if the server will be permanently deleted or disabled. True indicates that the server will be permanently deleted and False indicates that the server will be marked disabled and then deleted after 30 days, if it is not re-registered. + * @param serviceCallback 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 serviceName, UUID serviceMemberId, Boolean confirm, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(serviceName, serviceMemberId, confirm), serviceCallback); + } + + /** + * Deletes a server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @param confirm Indicates if the server will be permanently deleted or disabled. True indicates that the server will be permanently deleted and False indicates that the server will be marked disabled and then deleted after 30 days, if it is not re-registered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String serviceName, UUID serviceMemberId, Boolean confirm) { + return deleteWithServiceResponseAsync(serviceName, serviceMemberId, confirm).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a server that has been onboarded to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @param confirm Indicates if the server will be permanently deleted or disabled. True indicates that the server will be permanently deleted and False indicates that the server will be marked disabled and then deleted after 30 days, if it is not re-registered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String serviceName, UUID serviceMemberId, Boolean confirm) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required 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(serviceName, serviceMemberId, confirm, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of an alert for a given service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AlertInner> object if successful. + */ + public PagedList listAlerts(final UUID serviceMemberId, final String serviceName) { + ServiceResponse> response = listAlertsSinglePageAsync(serviceMemberId, serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAlertsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of an alert for a given service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAlertsAsync(final UUID serviceMemberId, final String serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAlertsSinglePageAsync(serviceMemberId, serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAlertsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of an alert for a given service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable> listAlertsAsync(final UUID serviceMemberId, final String serviceName) { + return listAlertsWithServiceResponseAsync(serviceMemberId, serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of an alert for a given service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable>> listAlertsWithServiceResponseAsync(final UUID serviceMemberId, final String serviceName) { + return listAlertsSinglePageAsync(serviceMemberId, serviceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAlertsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the details of an alert for a given service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AlertInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAlertsSinglePageAsync(final UUID serviceMemberId, final String serviceName) { + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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; + final String state = null; + final DateTime from = null; + final DateTime to = null; + return service.listAlerts(serviceMemberId, serviceName, filter, state, from, to, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAlertsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the details of an alert for a given service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @param filter The alert property filter to apply. + * @param state The alert state to query for. + * @param from The start date to query for. + * @param to The end date till when to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AlertInner> object if successful. + */ + public PagedList listAlerts(final UUID serviceMemberId, final String serviceName, final String filter, final String state, final DateTime from, final DateTime to) { + ServiceResponse> response = listAlertsSinglePageAsync(serviceMemberId, serviceName, filter, state, from, to).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAlertsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of an alert for a given service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @param filter The alert property filter to apply. + * @param state The alert state to query for. + * @param from The start date to query for. + * @param to The end date till when to query 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> listAlertsAsync(final UUID serviceMemberId, final String serviceName, final String filter, final String state, final DateTime from, final DateTime to, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAlertsSinglePageAsync(serviceMemberId, serviceName, filter, state, from, to), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAlertsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of an alert for a given service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @param filter The alert property filter to apply. + * @param state The alert state to query for. + * @param from The start date to query for. + * @param to The end date till when to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable> listAlertsAsync(final UUID serviceMemberId, final String serviceName, final String filter, final String state, final DateTime from, final DateTime to) { + return listAlertsWithServiceResponseAsync(serviceMemberId, serviceName, filter, state, from, to) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of an alert for a given service and server combination. + * + * @param serviceMemberId The server Id for which the alert details needs to be queried. + * @param serviceName The name of the service. + * @param filter The alert property filter to apply. + * @param state The alert state to query for. + * @param from The start date to query for. + * @param to The end date till when to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable>> listAlertsWithServiceResponseAsync(final UUID serviceMemberId, final String serviceName, final String filter, final String state, final DateTime from, final DateTime to) { + return listAlertsSinglePageAsync(serviceMemberId, serviceName, filter, state, from, to) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAlertsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the details of an alert for a given service and server combination. + * + ServiceResponse> * @param serviceMemberId The server Id for which the alert details needs to be queried. + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param filter The alert property filter to apply. + ServiceResponse> * @param state The alert state to query for. + ServiceResponse> * @param from The start date to query for. + ServiceResponse> * @param to The end date till when to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AlertInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAlertsSinglePageAsync(final UUID serviceMemberId, final String serviceName, final String filter, final String state, final DateTime from, final DateTime to) { + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required and cannot be null."); + } + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listAlerts(serviceMemberId, serviceName, filter, state, from, to, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAlertsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAlertsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the connector details for a service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<ConnectorInner> object if successful. + */ + public List listConnectors(String serviceName, UUID serviceMemberId) { + return listConnectorsWithServiceResponseAsync(serviceName, serviceMemberId).toBlocking().single().body(); + } + + /** + * Gets the connector details for a service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server 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> listConnectorsAsync(String serviceName, UUID serviceMemberId, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listConnectorsWithServiceResponseAsync(serviceName, serviceMemberId), serviceCallback); + } + + /** + * Gets the connector details for a service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ConnectorInner> object + */ + public Observable> listConnectorsAsync(String serviceName, UUID serviceMemberId) { + return listConnectorsWithServiceResponseAsync(serviceName, serviceMemberId).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the connector details for a service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ConnectorInner> object + */ + public Observable>> listConnectorsWithServiceResponseAsync(String serviceName, UUID serviceMemberId) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listConnectors(serviceName, serviceMemberId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listConnectorsDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listConnectorsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<CredentialInner> object if successful. + */ + public List listCredentials(String serviceName, UUID serviceMemberId) { + return listCredentialsWithServiceResponseAsync(serviceName, serviceMemberId).toBlocking().single().body(); + } + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server 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> listCredentialsAsync(String serviceName, UUID serviceMemberId, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listCredentialsWithServiceResponseAsync(serviceName, serviceMemberId), serviceCallback); + } + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<CredentialInner> object + */ + public Observable> listCredentialsAsync(String serviceName, UUID serviceMemberId) { + return listCredentialsWithServiceResponseAsync(serviceName, serviceMemberId).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<CredentialInner> object + */ + public Observable>> listCredentialsWithServiceResponseAsync(String serviceName, UUID serviceMemberId) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId 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.listCredentials(serviceName, serviceMemberId, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listCredentialsDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @param filter The property filter to apply. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException 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<CredentialInner> object if successful. + */ + public List listCredentials(String serviceName, UUID serviceMemberId, String filter) { + return listCredentialsWithServiceResponseAsync(serviceName, serviceMemberId, filter).toBlocking().single().body(); + } + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @param filter The property filter to apply. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listCredentialsAsync(String serviceName, UUID serviceMemberId, String filter, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listCredentialsWithServiceResponseAsync(serviceName, serviceMemberId, filter), serviceCallback); + } + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @param filter The property filter to apply. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<CredentialInner> object + */ + public Observable> listCredentialsAsync(String serviceName, UUID serviceMemberId, String filter) { + return listCredentialsWithServiceResponseAsync(serviceName, serviceMemberId, filter).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the credentials of the server which is needed by the agent to connect to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @param filter The property filter to apply. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<CredentialInner> object + */ + public Observable>> listCredentialsWithServiceResponseAsync(String serviceName, UUID serviceMemberId, String filter) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listCredentials(serviceName, serviceMemberId, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listCredentialsDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listCredentialsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the data uploaded by the server to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void deleteData(String serviceName, UUID serviceMemberId) { + deleteDataWithServiceResponseAsync(serviceName, serviceMemberId).toBlocking().single().body(); + } + + /** + * Deletes the data uploaded by the server to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server 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 deleteDataAsync(String serviceName, UUID serviceMemberId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteDataWithServiceResponseAsync(serviceName, serviceMemberId), serviceCallback); + } + + /** + * Deletes the data uploaded by the server to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteDataAsync(String serviceName, UUID serviceMemberId) { + return deleteDataWithServiceResponseAsync(serviceName, serviceMemberId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the data uploaded by the server to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteDataWithServiceResponseAsync(String serviceName, UUID serviceMemberId) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteData(serviceName, serviceMemberId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDataDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the last time when the server uploaded data to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<ItemInner> object if successful. + */ + public List listDataFreshness(String serviceName, UUID serviceMemberId) { + return listDataFreshnessWithServiceResponseAsync(serviceName, serviceMemberId).toBlocking().single().body(); + } + + /** + * Gets the last time when the server uploaded data to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server 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> listDataFreshnessAsync(String serviceName, UUID serviceMemberId, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listDataFreshnessWithServiceResponseAsync(serviceName, serviceMemberId), serviceCallback); + } + + /** + * Gets the last time when the server uploaded data to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ItemInner> object + */ + public Observable> listDataFreshnessAsync(String serviceName, UUID serviceMemberId) { + return listDataFreshnessWithServiceResponseAsync(serviceName, serviceMemberId).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the last time when the server uploaded data to Azure Active Directory Connect Health Service. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ItemInner> object + */ + public Observable>> listDataFreshnessWithServiceResponseAsync(String serviceName, UUID serviceMemberId) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listDataFreshness(serviceName, serviceMemberId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDataFreshnessDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDataFreshnessDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the export status. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ExportStatusInner> object if successful. + */ + public PagedList listExportStatus(final String serviceName, final UUID serviceMemberId) { + ServiceResponse> response = listExportStatusSinglePageAsync(serviceName, serviceMemberId).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listExportStatusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the export status. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server 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> listExportStatusAsync(final String serviceName, final UUID serviceMemberId, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listExportStatusSinglePageAsync(serviceName, serviceMemberId), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listExportStatusNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the export status. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExportStatusInner> object + */ + public Observable> listExportStatusAsync(final String serviceName, final UUID serviceMemberId) { + return listExportStatusWithServiceResponseAsync(serviceName, serviceMemberId) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the export status. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExportStatusInner> object + */ + public Observable>> listExportStatusWithServiceResponseAsync(final String serviceName, final UUID serviceMemberId) { + return listExportStatusSinglePageAsync(serviceName, serviceMemberId) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listExportStatusNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the export status. + * + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExportStatusInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listExportStatusSinglePageAsync(final String serviceName, final UUID serviceMemberId) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listExportStatus(serviceName, serviceMemberId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listExportStatusDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listExportStatusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the global configuration. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<GlobalConfigurationInner> object if successful. + */ + public List listGlobalConfiguration(String serviceName, String serviceMemberId) { + return listGlobalConfigurationWithServiceResponseAsync(serviceName, serviceMemberId).toBlocking().single().body(); + } + + /** + * Gets the global configuration. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server 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> listGlobalConfigurationAsync(String serviceName, String serviceMemberId, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listGlobalConfigurationWithServiceResponseAsync(serviceName, serviceMemberId), serviceCallback); + } + + /** + * Gets the global configuration. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<GlobalConfigurationInner> object + */ + public Observable> listGlobalConfigurationAsync(String serviceName, String serviceMemberId) { + return listGlobalConfigurationWithServiceResponseAsync(serviceName, serviceMemberId).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the global configuration. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<GlobalConfigurationInner> object + */ + public Observable>> listGlobalConfigurationWithServiceResponseAsync(String serviceName, String serviceMemberId) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listGlobalConfiguration(serviceName, serviceMemberId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listGlobalConfigurationDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listGlobalConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param serviceMemberId The server id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MetricSetsInner object if successful. + */ + public MetricSetsInner getMetrics(String serviceName, String metricName, String groupName, UUID serviceMemberId) { + return getMetricsWithServiceResponseAsync(serviceName, metricName, groupName, serviceMemberId).toBlocking().single().body(); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param serviceMemberId The server 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 getMetricsAsync(String serviceName, String metricName, String groupName, UUID serviceMemberId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMetricsWithServiceResponseAsync(serviceName, metricName, groupName, serviceMemberId), serviceCallback); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param serviceMemberId The server id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable getMetricsAsync(String serviceName, String metricName, String groupName, UUID serviceMemberId) { + return getMetricsWithServiceResponseAsync(serviceName, metricName, groupName, serviceMemberId).map(new Func1, MetricSetsInner>() { + @Override + public MetricSetsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param serviceMemberId The server id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable> getMetricsWithServiceResponseAsync(String serviceName, String metricName, String groupName, UUID serviceMemberId) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId 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 groupKey = null; + final DateTime fromDate = null; + final DateTime toDate = null; + return service.getMetrics(serviceName, metricName, groupName, serviceMemberId, groupKey, fromDate, toDate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMetricsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param serviceMemberId The server id. + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MetricSetsInner object if successful. + */ + public MetricSetsInner getMetrics(String serviceName, String metricName, String groupName, UUID serviceMemberId, String groupKey, DateTime fromDate, DateTime toDate) { + return getMetricsWithServiceResponseAsync(serviceName, metricName, groupName, serviceMemberId, groupKey, fromDate, toDate).toBlocking().single().body(); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param serviceMemberId The server id. + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getMetricsAsync(String serviceName, String metricName, String groupName, UUID serviceMemberId, String groupKey, DateTime fromDate, DateTime toDate, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMetricsWithServiceResponseAsync(serviceName, metricName, groupName, serviceMemberId, groupKey, fromDate, toDate), serviceCallback); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param serviceMemberId The server id. + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable getMetricsAsync(String serviceName, String metricName, String groupName, UUID serviceMemberId, String groupKey, DateTime fromDate, DateTime toDate) { + return getMetricsWithServiceResponseAsync(serviceName, metricName, groupName, serviceMemberId, groupKey, fromDate, toDate).map(new Func1, MetricSetsInner>() { + @Override + public MetricSetsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param serviceMemberId The server id. + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable> getMetricsWithServiceResponseAsync(String serviceName, String metricName, String groupName, UUID serviceMemberId, String groupKey, DateTime fromDate, DateTime toDate) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getMetrics(serviceName, metricName, groupName, serviceMemberId, groupKey, fromDate, toDate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMetricsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the service configuration. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServiceConfigurationInner object if successful. + */ + public ServiceConfigurationInner getServiceConfiguration(String serviceName, String serviceMemberId) { + return getServiceConfigurationWithServiceResponseAsync(serviceName, serviceMemberId).toBlocking().single().body(); + } + + /** + * Gets the service configuration. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server 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 getServiceConfigurationAsync(String serviceName, String serviceMemberId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getServiceConfigurationWithServiceResponseAsync(serviceName, serviceMemberId), serviceCallback); + } + + /** + * Gets the service configuration. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceConfigurationInner object + */ + public Observable getServiceConfigurationAsync(String serviceName, String serviceMemberId) { + return getServiceConfigurationWithServiceResponseAsync(serviceName, serviceMemberId).map(new Func1, ServiceConfigurationInner>() { + @Override + public ServiceConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the service configuration. + * + * @param serviceName The name of the service. + * @param serviceMemberId The server Id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceConfigurationInner object + */ + public Observable> getServiceConfigurationWithServiceResponseAsync(String serviceName, String serviceMemberId) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getServiceConfiguration(serviceName, serviceMemberId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getServiceConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getServiceConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the list of connectors and run profile names. + * + * @param serviceName The name of the service. + * @param serviceMemberId The service member id. + * @param metricName The name of the metric. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ConnectorMetadataInner object if successful. + */ + public ConnectorMetadataInner getConnectorMetadata(String serviceName, UUID serviceMemberId, String metricName) { + return getConnectorMetadataWithServiceResponseAsync(serviceName, serviceMemberId, metricName).toBlocking().single().body(); + } + + /** + * Gets the list of connectors and run profile names. + * + * @param serviceName The name of the service. + * @param serviceMemberId The service member id. + * @param metricName The name of the metric. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getConnectorMetadataAsync(String serviceName, UUID serviceMemberId, String metricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getConnectorMetadataWithServiceResponseAsync(serviceName, serviceMemberId, metricName), serviceCallback); + } + + /** + * Gets the list of connectors and run profile names. + * + * @param serviceName The name of the service. + * @param serviceMemberId The service member id. + * @param metricName The name of the metric. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectorMetadataInner object + */ + public Observable getConnectorMetadataAsync(String serviceName, UUID serviceMemberId, String metricName) { + return getConnectorMetadataWithServiceResponseAsync(serviceName, serviceMemberId, metricName).map(new Func1, ConnectorMetadataInner>() { + @Override + public ConnectorMetadataInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the list of connectors and run profile names. + * + * @param serviceName The name of the service. + * @param serviceMemberId The service member id. + * @param metricName The name of the metric. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ConnectorMetadataInner object + */ + public Observable> getConnectorMetadataWithServiceResponseAsync(String serviceName, UUID serviceMemberId, String metricName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (serviceMemberId == null) { + throw new IllegalArgumentException("Parameter serviceMemberId is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getConnectorMetadata(serviceName, serviceMemberId, metricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getConnectorMetadataDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getConnectorMetadataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of the servers, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServiceMemberInner> 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(); + } + }; + } + + /** + * Gets the details of the servers, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @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); + } + + /** + * Gets the details of the servers, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceMemberInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of the servers, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServiceMemberInner> 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)); + } + }); + } + + /** + * Gets the details of the servers, for a given service, that are onboarded to Azure Active Directory Connect Health Service. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServiceMemberInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of an alert for a given service and server combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AlertInner> object if successful. + */ + public PagedList listAlertsNext(final String nextPageLink) { + ServiceResponse> response = listAlertsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAlertsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of an alert for a given service and server combination. + * + * @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> listAlertsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAlertsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAlertsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of an alert for a given service and server combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable> listAlertsNextAsync(final String nextPageLink) { + return listAlertsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of an alert for a given service and server combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable>> listAlertsNextWithServiceResponseAsync(final String nextPageLink) { + return listAlertsNextSinglePageAsync(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(listAlertsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the details of an alert for a given service and server combination. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AlertInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAlertsNextSinglePageAsync(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.listAlertsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAlertsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAlertsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the export status. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ExportStatusInner> object if successful. + */ + public PagedList listExportStatusNext(final String nextPageLink) { + ServiceResponse> response = listExportStatusNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listExportStatusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the export status. + * + * @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> listExportStatusNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listExportStatusNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listExportStatusNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the export status. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExportStatusInner> object + */ + public Observable> listExportStatusNextAsync(final String nextPageLink) { + return listExportStatusNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the export status. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExportStatusInner> object + */ + public Observable>> listExportStatusNextWithServiceResponseAsync(final String nextPageLink) { + return listExportStatusNextSinglePageAsync(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(listExportStatusNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the export status. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExportStatusInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listExportStatusNextSinglePageAsync(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.listExportStatusNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listExportStatusNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listExportStatusNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicePropertiesImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicePropertiesImpl.java new file mode 100644 index 0000000000000..961a46aae477a --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicePropertiesImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceProperties; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import org.joda.time.DateTime; +import java.util.List; + +class ServicePropertiesImpl extends WrapperImpl implements ServiceProperties { + private final ADHybridHealthServiceManager manager; + ServicePropertiesImpl(ServicePropertiesInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public Integer activeAlerts() { + return this.inner().activeAlerts(); + } + + @Override + public String additionalInformation() { + return this.inner().additionalInformation(); + } + + @Override + public DateTime createdDate() { + return this.inner().createdDate(); + } + + @Override + public List customNotificationEmails() { + return this.inner().customNotificationEmails(); + } + + @Override + public Boolean disabled() { + return this.inner().disabled(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public String health() { + return this.inner().health(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public DateTime lastDisabled() { + return this.inner().lastDisabled(); + } + + @Override + public DateTime lastUpdated() { + return this.inner().lastUpdated(); + } + + @Override + public Object monitoringConfigurationsComputed() { + return this.inner().monitoringConfigurationsComputed(); + } + + @Override + public Object monitoringConfigurationsCustomized() { + return this.inner().monitoringConfigurationsCustomized(); + } + + @Override + public Boolean notificationEmailEnabled() { + return this.inner().notificationEmailEnabled(); + } + + @Override + public Boolean notificationEmailEnabledForGlobalAdmins() { + return this.inner().notificationEmailEnabledForGlobalAdmins(); + } + + @Override + public List notificationEmails() { + return this.inner().notificationEmails(); + } + + @Override + public Boolean notificationEmailsEnabledForGlobalAdmins() { + return this.inner().notificationEmailsEnabledForGlobalAdmins(); + } + + @Override + public Boolean originalDisabledState() { + return this.inner().originalDisabledState(); + } + + @Override + public Integer resolvedAlerts() { + return this.inner().resolvedAlerts(); + } + + @Override + public String serviceId() { + return this.inner().serviceId(); + } + + @Override + public String serviceName() { + return this.inner().serviceName(); + } + + @Override + public String signature() { + return this.inner().signature(); + } + + @Override + public Object simpleProperties() { + return this.inner().simpleProperties(); + } + + @Override + public String tenantId() { + return this.inner().tenantId(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicePropertiesInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicePropertiesInner.java new file mode 100644 index 0000000000000..1af39e2b52358 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicePropertiesInner.java @@ -0,0 +1,653 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The service properties for a given service. + */ +public class ServicePropertiesInner { + /** + * The id of the service. + */ + @JsonProperty(value = "id") + private String id; + + /** + * The count of alerts that are currently active for the service. + */ + @JsonProperty(value = "activeAlerts") + private Integer activeAlerts; + + /** + * The additional information related to the service. + */ + @JsonProperty(value = "additionalInformation") + private String additionalInformation; + + /** + * The date and time, in UTC, when the service was onboarded to Azure + * Active Directory Connect Health. + */ + @JsonProperty(value = "createdDate") + private DateTime createdDate; + + /** + * The list of additional emails that are configured to receive + * notifications about the service. + */ + @JsonProperty(value = "customNotificationEmails") + private List customNotificationEmails; + + /** + * Indicates if the service is disabled or not. + */ + @JsonProperty(value = "disabled") + private Boolean disabled; + + /** + * The display name of the service. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * The health of the service. + */ + @JsonProperty(value = "health") + private String health; + + /** + * The date and time, in UTC, when the service was last disabled. + */ + @JsonProperty(value = "lastDisabled") + private DateTime lastDisabled; + + /** + * The date or time , in UTC, when the service properties were last + * updated. + */ + @JsonProperty(value = "lastUpdated") + private DateTime lastUpdated; + + /** + * The monitoring configuration of the service which determines what + * activities are monitored by Azure Active Directory Connect Health. + */ + @JsonProperty(value = "monitoringConfigurationsComputed") + private Object monitoringConfigurationsComputed; + + /** + * The customized monitoring configuration of the service which determines + * what activities are monitored by Azure Active Directory Connect Health. + */ + @JsonProperty(value = "monitoringConfigurationsCustomized") + private Object monitoringConfigurationsCustomized; + + /** + * Indicates if email notification is enabled or not. + */ + @JsonProperty(value = "notificationEmailEnabled") + private Boolean notificationEmailEnabled; + + /** + * Indicates if email notification is enabled for global administrators of + * the tenant. + */ + @JsonProperty(value = "notificationEmailEnabledForGlobalAdmins") + private Boolean notificationEmailEnabledForGlobalAdmins; + + /** + * Indicates if email notification is enabled for global administrators of + * the tenant. + */ + @JsonProperty(value = "notificationEmailsEnabledForGlobalAdmins") + private Boolean notificationEmailsEnabledForGlobalAdmins; + + /** + * The list of emails to whom service notifications will be sent. + */ + @JsonProperty(value = "notificationEmails") + private List notificationEmails; + + /** + * Gets the original disable state. + */ + @JsonProperty(value = "originalDisabledState") + private Boolean originalDisabledState; + + /** + * The total count of alerts that has been resolved for the service. + */ + @JsonProperty(value = "resolvedAlerts") + private Integer resolvedAlerts; + + /** + * The id of the service. + */ + @JsonProperty(value = "serviceId") + private String serviceId; + + /** + * The name of the service. + */ + @JsonProperty(value = "serviceName") + private String serviceName; + + /** + * The signature of the service. + */ + @JsonProperty(value = "signature") + private String signature; + + /** + * List of service specific configuration properties. + */ + @JsonProperty(value = "simpleProperties") + private Object simpleProperties; + + /** + * The id of the tenant to which the service is registered to. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /** + * The service type for the services onboarded to Azure Active Directory + * Connect Health. Depending on whether the service is monitoring, ADFS, + * Sync or ADDS roles, the service type can either be AdFederationService + * or AadSyncService or AdDomainService. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get the id of the service. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set the id of the service. + * + * @param id the id value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the count of alerts that are currently active for the service. + * + * @return the activeAlerts value + */ + public Integer activeAlerts() { + return this.activeAlerts; + } + + /** + * Set the count of alerts that are currently active for the service. + * + * @param activeAlerts the activeAlerts value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withActiveAlerts(Integer activeAlerts) { + this.activeAlerts = activeAlerts; + return this; + } + + /** + * Get the additional information related to the service. + * + * @return the additionalInformation value + */ + public String additionalInformation() { + return this.additionalInformation; + } + + /** + * Set the additional information related to the service. + * + * @param additionalInformation the additionalInformation value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withAdditionalInformation(String additionalInformation) { + this.additionalInformation = additionalInformation; + return this; + } + + /** + * Get the date and time, in UTC, when the service was onboarded to Azure Active Directory Connect Health. + * + * @return the createdDate value + */ + public DateTime createdDate() { + return this.createdDate; + } + + /** + * Set the date and time, in UTC, when the service was onboarded to Azure Active Directory Connect Health. + * + * @param createdDate the createdDate value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withCreatedDate(DateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get the list of additional emails that are configured to receive notifications about the service. + * + * @return the customNotificationEmails value + */ + public List customNotificationEmails() { + return this.customNotificationEmails; + } + + /** + * Set the list of additional emails that are configured to receive notifications about the service. + * + * @param customNotificationEmails the customNotificationEmails value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withCustomNotificationEmails(List customNotificationEmails) { + this.customNotificationEmails = customNotificationEmails; + return this; + } + + /** + * Get indicates if the service is disabled or not. + * + * @return the disabled value + */ + public Boolean disabled() { + return this.disabled; + } + + /** + * Set indicates if the service is disabled or not. + * + * @param disabled the disabled value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withDisabled(Boolean disabled) { + this.disabled = disabled; + return this; + } + + /** + * Get the display name of the service. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name of the service. + * + * @param displayName the displayName value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the health of the service. + * + * @return the health value + */ + public String health() { + return this.health; + } + + /** + * Set the health of the service. + * + * @param health the health value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withHealth(String health) { + this.health = health; + return this; + } + + /** + * Get the date and time, in UTC, when the service was last disabled. + * + * @return the lastDisabled value + */ + public DateTime lastDisabled() { + return this.lastDisabled; + } + + /** + * Set the date and time, in UTC, when the service was last disabled. + * + * @param lastDisabled the lastDisabled value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withLastDisabled(DateTime lastDisabled) { + this.lastDisabled = lastDisabled; + return this; + } + + /** + * Get the date or time , in UTC, when the service properties were last updated. + * + * @return the lastUpdated value + */ + public DateTime lastUpdated() { + return this.lastUpdated; + } + + /** + * Set the date or time , in UTC, when the service properties were last updated. + * + * @param lastUpdated the lastUpdated value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withLastUpdated(DateTime lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Get the monitoring configuration of the service which determines what activities are monitored by Azure Active Directory Connect Health. + * + * @return the monitoringConfigurationsComputed value + */ + public Object monitoringConfigurationsComputed() { + return this.monitoringConfigurationsComputed; + } + + /** + * Set the monitoring configuration of the service which determines what activities are monitored by Azure Active Directory Connect Health. + * + * @param monitoringConfigurationsComputed the monitoringConfigurationsComputed value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withMonitoringConfigurationsComputed(Object monitoringConfigurationsComputed) { + this.monitoringConfigurationsComputed = monitoringConfigurationsComputed; + return this; + } + + /** + * Get the customized monitoring configuration of the service which determines what activities are monitored by Azure Active Directory Connect Health. + * + * @return the monitoringConfigurationsCustomized value + */ + public Object monitoringConfigurationsCustomized() { + return this.monitoringConfigurationsCustomized; + } + + /** + * Set the customized monitoring configuration of the service which determines what activities are monitored by Azure Active Directory Connect Health. + * + * @param monitoringConfigurationsCustomized the monitoringConfigurationsCustomized value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withMonitoringConfigurationsCustomized(Object monitoringConfigurationsCustomized) { + this.monitoringConfigurationsCustomized = monitoringConfigurationsCustomized; + return this; + } + + /** + * Get indicates if email notification is enabled or not. + * + * @return the notificationEmailEnabled value + */ + public Boolean notificationEmailEnabled() { + return this.notificationEmailEnabled; + } + + /** + * Set indicates if email notification is enabled or not. + * + * @param notificationEmailEnabled the notificationEmailEnabled value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withNotificationEmailEnabled(Boolean notificationEmailEnabled) { + this.notificationEmailEnabled = notificationEmailEnabled; + return this; + } + + /** + * Get indicates if email notification is enabled for global administrators of the tenant. + * + * @return the notificationEmailEnabledForGlobalAdmins value + */ + public Boolean notificationEmailEnabledForGlobalAdmins() { + return this.notificationEmailEnabledForGlobalAdmins; + } + + /** + * Set indicates if email notification is enabled for global administrators of the tenant. + * + * @param notificationEmailEnabledForGlobalAdmins the notificationEmailEnabledForGlobalAdmins value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withNotificationEmailEnabledForGlobalAdmins(Boolean notificationEmailEnabledForGlobalAdmins) { + this.notificationEmailEnabledForGlobalAdmins = notificationEmailEnabledForGlobalAdmins; + return this; + } + + /** + * Get indicates if email notification is enabled for global administrators of the tenant. + * + * @return the notificationEmailsEnabledForGlobalAdmins value + */ + public Boolean notificationEmailsEnabledForGlobalAdmins() { + return this.notificationEmailsEnabledForGlobalAdmins; + } + + /** + * Set indicates if email notification is enabled for global administrators of the tenant. + * + * @param notificationEmailsEnabledForGlobalAdmins the notificationEmailsEnabledForGlobalAdmins value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withNotificationEmailsEnabledForGlobalAdmins(Boolean notificationEmailsEnabledForGlobalAdmins) { + this.notificationEmailsEnabledForGlobalAdmins = notificationEmailsEnabledForGlobalAdmins; + return this; + } + + /** + * Get the list of emails to whom service notifications will be sent. + * + * @return the notificationEmails value + */ + public List notificationEmails() { + return this.notificationEmails; + } + + /** + * Set the list of emails to whom service notifications will be sent. + * + * @param notificationEmails the notificationEmails value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withNotificationEmails(List notificationEmails) { + this.notificationEmails = notificationEmails; + return this; + } + + /** + * Get gets the original disable state. + * + * @return the originalDisabledState value + */ + public Boolean originalDisabledState() { + return this.originalDisabledState; + } + + /** + * Set gets the original disable state. + * + * @param originalDisabledState the originalDisabledState value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withOriginalDisabledState(Boolean originalDisabledState) { + this.originalDisabledState = originalDisabledState; + return this; + } + + /** + * Get the total count of alerts that has been resolved for the service. + * + * @return the resolvedAlerts value + */ + public Integer resolvedAlerts() { + return this.resolvedAlerts; + } + + /** + * Set the total count of alerts that has been resolved for the service. + * + * @param resolvedAlerts the resolvedAlerts value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withResolvedAlerts(Integer resolvedAlerts) { + this.resolvedAlerts = resolvedAlerts; + return this; + } + + /** + * Get the id of the service. + * + * @return the serviceId value + */ + public String serviceId() { + return this.serviceId; + } + + /** + * Set the id of the service. + * + * @param serviceId the serviceId value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withServiceId(String serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * Get the name of the service. + * + * @return the serviceName value + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set the name of the service. + * + * @param serviceName the serviceName value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Get the signature of the service. + * + * @return the signature value + */ + public String signature() { + return this.signature; + } + + /** + * Set the signature of the service. + * + * @param signature the signature value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withSignature(String signature) { + this.signature = signature; + return this; + } + + /** + * Get list of service specific configuration properties. + * + * @return the simpleProperties value + */ + public Object simpleProperties() { + return this.simpleProperties; + } + + /** + * Set list of service specific configuration properties. + * + * @param simpleProperties the simpleProperties value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withSimpleProperties(Object simpleProperties) { + this.simpleProperties = simpleProperties; + return this; + } + + /** + * Get the id of the tenant to which the service is registered to. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the id of the tenant to which the service is registered to. + * + * @param tenantId the tenantId value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set the service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * + * @param type the type value to set + * @return the ServicePropertiesInner object itself. + */ + public ServicePropertiesInner withType(String type) { + this.type = type; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceServiceMemberImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceServiceMemberImpl.java new file mode 100644 index 0000000000000..79b0248c24393 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServiceServiceMemberImpl.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceServiceMember; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MonitoringLevel; + +class ServiceServiceMemberImpl extends WrapperImpl implements ServiceServiceMember { + private final ADHybridHealthServiceManager manager; + private String serviceName; + private UUID serviceMemberId; + + ServiceServiceMemberImpl(ServiceMemberInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public Integer activeAlerts() { + return this.inner().activeAlerts(); + } + + @Override + public String additionalInformation() { + return this.inner().additionalInformation(); + } + + @Override + public DateTime createdDate() { + return this.inner().createdDate(); + } + + @Override + public Object dimensions() { + return this.inner().dimensions(); + } + + @Override + public Boolean disabled() { + return this.inner().disabled(); + } + + @Override + public Integer disabledReason() { + return this.inner().disabledReason(); + } + + @Override + public Object installedQfes() { + return this.inner().installedQfes(); + } + + @Override + public DateTime lastDisabled() { + return this.inner().lastDisabled(); + } + + @Override + public DateTime lastReboot() { + return this.inner().lastReboot(); + } + + @Override + public DateTime lastServerReportedMonitoringLevelChange() { + return this.inner().lastServerReportedMonitoringLevelChange(); + } + + @Override + public DateTime lastUpdated() { + return this.inner().lastUpdated(); + } + + @Override + public String machineId() { + return this.inner().machineId(); + } + + @Override + public String machineName() { + return this.inner().machineName(); + } + + @Override + public Object monitoringConfigurationsComputed() { + return this.inner().monitoringConfigurationsComputed(); + } + + @Override + public Object monitoringConfigurationsCustomized() { + return this.inner().monitoringConfigurationsCustomized(); + } + + @Override + public String osName() { + return this.inner().osName(); + } + + @Override + public String osVersion() { + return this.inner().osVersion(); + } + + @Override + public Object properties() { + return this.inner().properties(); + } + + @Override + public Object recommendedQfes() { + return this.inner().recommendedQfes(); + } + + @Override + public Integer resolvedAlerts() { + return this.inner().resolvedAlerts(); + } + + @Override + public String role() { + return this.inner().role(); + } + + @Override + public MonitoringLevel serverReportedMonitoringLevel() { + return this.inner().serverReportedMonitoringLevel(); + } + + @Override + public String serviceId() { + return this.inner().serviceId(); + } + + @Override + public String serviceMemberId() { + return this.inner().serviceMemberId(); + } + + @Override + public String status() { + return this.inner().status(); + } + + @Override + public String tenantId() { + return this.inner().tenantId(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicememberAddsserviceAlertImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicememberAddsserviceAlertImpl.java new file mode 100644 index 0000000000000..4b9190d60e8c1 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicememberAddsserviceAlertImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServicememberAddsserviceAlert; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.ArrayList; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceItem; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AdditionalInformation; +import java.util.UUID; +import org.joda.time.DateTime; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Level; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.HelpLink; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.State; + +class ServicememberAddsserviceAlertImpl extends WrapperImpl implements ServicememberAddsserviceAlert { + private final ADHybridHealthServiceManager manager; + + ServicememberAddsserviceAlertImpl(AlertInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public List activeAlertProperties() { + List lst = new ArrayList(); + if (this.inner().activeAlertProperties() != null) { + for (ItemInner inner : this.inner().activeAlertProperties()) { + lst.add( new ServiceItemImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List additionalInformation() { + return this.inner().additionalInformation(); + } + + @Override + public UUID alertId() { + return this.inner().alertId(); + } + + @Override + public DateTime createdDate() { + return this.inner().createdDate(); + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public DateTime lastUpdated() { + return this.inner().lastUpdated(); + } + + @Override + public Level level() { + return this.inner().level(); + } + + @Override + public String monitorRoleType() { + return this.inner().monitorRoleType(); + } + + @Override + public List relatedLinks() { + return this.inner().relatedLinks(); + } + + @Override + public String remediation() { + return this.inner().remediation(); + } + + @Override + public List resolvedAlertProperties() { + List lst = new ArrayList(); + if (this.inner().resolvedAlertProperties() != null) { + for (ItemInner inner : this.inner().resolvedAlertProperties()) { + lst.add( new ServiceItemImpl(inner, manager())); + } + } + return lst; + } + + @Override + public DateTime resolvedDate() { + return this.inner().resolvedDate(); + } + + @Override + public String scope() { + return this.inner().scope(); + } + + @Override + public UUID serviceId() { + return this.inner().serviceId(); + } + + @Override + public UUID serviceMemberId() { + return this.inner().serviceMemberId(); + } + + @Override + public String shortName() { + return this.inner().shortName(); + } + + @Override + public State state() { + return this.inner().state(); + } + + @Override + public UUID tenantId() { + return this.inner().tenantId(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicememberServiceAlertImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicememberServiceAlertImpl.java new file mode 100644 index 0000000000000..8a26df76a7421 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicememberServiceAlertImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServicememberServiceAlert; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.ArrayList; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceItem; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AdditionalInformation; +import java.util.UUID; +import org.joda.time.DateTime; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Level; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.HelpLink; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.State; + +class ServicememberServiceAlertImpl extends WrapperImpl implements ServicememberServiceAlert { + private final ADHybridHealthServiceManager manager; + + ServicememberServiceAlertImpl(AlertInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public List activeAlertProperties() { + List lst = new ArrayList(); + if (this.inner().activeAlertProperties() != null) { + for (ItemInner inner : this.inner().activeAlertProperties()) { + lst.add( new ServiceItemImpl(inner, manager())); + } + } + return lst; + } + + @Override + public List additionalInformation() { + return this.inner().additionalInformation(); + } + + @Override + public UUID alertId() { + return this.inner().alertId(); + } + + @Override + public DateTime createdDate() { + return this.inner().createdDate(); + } + + @Override + public String description() { + return this.inner().description(); + } + + @Override + public String displayName() { + return this.inner().displayName(); + } + + @Override + public DateTime lastUpdated() { + return this.inner().lastUpdated(); + } + + @Override + public Level level() { + return this.inner().level(); + } + + @Override + public String monitorRoleType() { + return this.inner().monitorRoleType(); + } + + @Override + public List relatedLinks() { + return this.inner().relatedLinks(); + } + + @Override + public String remediation() { + return this.inner().remediation(); + } + + @Override + public List resolvedAlertProperties() { + List lst = new ArrayList(); + if (this.inner().resolvedAlertProperties() != null) { + for (ItemInner inner : this.inner().resolvedAlertProperties()) { + lst.add( new ServiceItemImpl(inner, manager())); + } + } + return lst; + } + + @Override + public DateTime resolvedDate() { + return this.inner().resolvedDate(); + } + + @Override + public String scope() { + return this.inner().scope(); + } + + @Override + public UUID serviceId() { + return this.inner().serviceId(); + } + + @Override + public UUID serviceMemberId() { + return this.inner().serviceMemberId(); + } + + @Override + public String shortName() { + return this.inner().shortName(); + } + + @Override + public State state() { + return this.inner().state(); + } + + @Override + public UUID tenantId() { + return this.inner().tenantId(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicememberServiceExportStatusImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicememberServiceExportStatusImpl.java new file mode 100644 index 0000000000000..084c91c6258d2 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicememberServiceExportStatusImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServicememberServiceExportStatus; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; +import java.util.UUID; + +class ServicememberServiceExportStatusImpl extends WrapperImpl implements ServicememberServiceExportStatus { + private final ADHybridHealthServiceManager manager; + + ServicememberServiceExportStatusImpl(ExportStatusInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public DateTime endTime() { + return this.inner().endTime(); + } + + @Override + public String runStepResultId() { + return this.inner().runStepResultId(); + } + + @Override + public UUID serviceId() { + return this.inner().serviceId(); + } + + @Override + public UUID serviceMemberId() { + return this.inner().serviceMemberId(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicememberServiceItemImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicememberServiceItemImpl.java new file mode 100644 index 0000000000000..8c6602cf5b4f2 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicememberServiceItemImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServicememberServiceItem; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class ServicememberServiceItemImpl extends WrapperImpl implements ServicememberServiceItem { + private final ADHybridHealthServiceManager manager; + + ServicememberServiceItemImpl(ItemInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public String keyVal() { + return this.inner().key(); + } + + @Override + public String value() { + return this.inner().value(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicememberServiceMetricSetsImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicememberServiceMetricSetsImpl.java new file mode 100644 index 0000000000000..d0fe878591bea --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicememberServiceMetricSetsImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServicememberServiceMetricSets; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MetricSet; +import org.joda.time.DateTime; + +class ServicememberServiceMetricSetsImpl extends WrapperImpl implements ServicememberServiceMetricSets { + private final ADHybridHealthServiceManager manager; + private String serviceName; + private String metricName; + private String groupName; + private UUID serviceMemberId; + + ServicememberServiceMetricSetsImpl(MetricSetsInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + + + @Override + public List sets() { + return this.inner().sets(); + } + + @Override + public List timeStamps() { + return this.inner().timeStamps(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicesImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicesImpl.java new file mode 100644 index 0000000000000..263df7e925473 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicesImpl.java @@ -0,0 +1,445 @@ +/** + * Copyright (c) Microsoft Corporation. All rights 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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceItem; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceExportStatus; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceAlert; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AlertFeedback; +import rx.Completable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ServiceProperties; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Result; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MetricMetadata; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ErrorCount; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MergedExportError; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.MetricServiceMetricSets; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.AddsserviceMetricSets; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.ErrorReportUsersEntry; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.RiskyIPBlobUri; + +class ServicesImpl extends WrapperImpl implements Services { + private final ADHybridHealthServiceManager manager; + + ServicesImpl(ADHybridHealthServiceManager manager) { + super(manager.inner().services()); + this.manager = manager; + } + + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + private ServiceItemImpl wrapServiceItemModel(ItemInner inner) { + return new ServiceItemImpl(inner, manager()); + } + + private ServiceExportStatusImpl wrapServiceExportStatusModel(ExportStatusInner inner) { + return new ServiceExportStatusImpl(inner, manager()); + } + + private ServiceAlertImpl wrapServiceAlertModel(AlertInner inner) { + return new ServiceAlertImpl(inner, manager()); + } + + private MetricServiceMetricSetsImpl wrapMetricServiceMetricSetsModel(MetricSetsInner inner) { + return new MetricServiceMetricSetsImpl(inner, manager()); + } + + private Observable getMetricSetsInnerUsingServicesInnerAsync(String id) { + String serviceName = IdParsingUtils.getValueFromIdByName(id, "services"); + String metricName = IdParsingUtils.getValueFromIdByName(id, "metrics"); + String groupName = IdParsingUtils.getValueFromIdByName(id, "groups"); + ServicesInner client = this.inner(); + return client.getMetricsAsync(serviceName, metricName, groupName); + } + + @Override + public Observable listMonitoringConfigurationsAsync(String serviceName) { + ServicesInner client = this.inner(); + return client.listMonitoringConfigurationsAsync(serviceName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public ServiceItem call(ItemInner inner) { + return wrapServiceItemModel(inner); + } + }); + } + + @Override + public Observable listExportStatusAsync(final String serviceName) { + ServicesInner client = this.inner(); + return client.listExportStatusAsync(serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceExportStatus call(ExportStatusInner inner) { + return wrapServiceExportStatusModel(inner); + } + }); + } + + @Override + public Observable listAlertsAsync(final String serviceName) { + ServicesInner client = this.inner(); + return client.listAlertsAsync(serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceAlert call(AlertInner inner) { + return wrapServiceAlertModel(inner); + } + }); + } + + @Override + public Observable addAlertFeedbackAsync(String serviceName, AlertFeedbackInner alertFeedback) { + ServicesInner client = this.inner(); + return client.addAlertFeedbackAsync(serviceName, alertFeedback) + .map(new Func1() { + @Override + public AlertFeedback call(AlertFeedbackInner inner) { + return new AlertFeedbackImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAlertFeedbackAsync(String serviceName, String shortName) { + ServicesInner client = this.inner(); + return client.listAlertFeedbackAsync(serviceName, shortName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public AlertFeedback call(AlertFeedbackInner inner) { + return new AlertFeedbackImpl(inner, manager()); + } + }); + } + + @Override + public Observable listPremiumAsync() { + ServicesInner client = this.inner(); + return client.listPremiumAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceProperties call(ServicePropertiesInner inner) { + return new ServicePropertiesImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAsync(String serviceName) { + ServicesInner client = this.inner(); + return client.getAsync(serviceName) + .map(new Func1() { + @Override + public ServiceProperties call(ServicePropertiesInner inner) { + return new ServicePropertiesImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteAsync(String serviceName) { + ServicesInner client = this.inner(); + return client.deleteAsync(serviceName).toCompletable(); + } + + @Override + public Observable updateAsync(String serviceName, ServicePropertiesInner service) { + ServicesInner client = this.inner(); + return client.updateAsync(serviceName, service) + .map(new Func1() { + @Override + public ServiceProperties call(ServicePropertiesInner inner) { + return new ServicePropertiesImpl(inner, manager()); + } + }); + } + + @Override + public Observable getFeatureAvailibilityAsync(String serviceName, String featureName) { + ServicesInner client = this.inner(); + return client.getFeatureAvailibilityAsync(serviceName, featureName) + .map(new Func1() { + @Override + public Result call(ResultInner inner) { + return new ResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable listMetricMetadataAsync(final String serviceName) { + ServicesInner client = this.inner(); + return client.listMetricMetadataAsync(serviceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public MetricMetadata call(MetricMetadataInner inner) { + return new MetricMetadataImpl(inner, manager()); + } + }); + } + + @Override + public Observable getMetricMetadataAsync(String serviceName, String metricName) { + ServicesInner client = this.inner(); + return client.getMetricMetadataAsync(serviceName, metricName) + .map(new Func1() { + @Override + public MetricMetadata call(MetricMetadataInner inner) { + return new MetricMetadataImpl(inner, manager()); + } + }); + } + + @Override + public Completable updateMonitoringConfigurationAsync(String serviceName, ItemInner configurationSetting) { + ServicesInner client = this.inner(); + return client.updateMonitoringConfigurationAsync(serviceName, configurationSetting).toCompletable(); + } + + @Override + public Observable getTenantWhitelistingAsync(String serviceName, String featureName) { + ServicesInner client = this.inner(); + return client.getTenantWhitelistingAsync(serviceName, featureName) + .map(new Func1() { + @Override + public Result call(ResultInner inner) { + return new ResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync() { + ServicesInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceProperties call(ServicePropertiesInner inner) { + return new ServicePropertiesImpl(inner, manager()); + } + }); + } + + @Override + public Observable addAsync(ServicePropertiesInner service) { + ServicesInner client = this.inner(); + return client.addAsync(service) + .map(new Func1() { + @Override + public ServiceProperties call(ServicePropertiesInner inner) { + return new ServicePropertiesImpl(inner, manager()); + } + }); + } + + @Override + public Observable listExportErrorsAsync(String serviceName) { + ServicesInner client = this.inner(); + return client.listExportErrorsAsync(serviceName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public ErrorCount call(ErrorCountInner inner) { + return new ErrorCountImpl(inner, manager()); + } + }); + } + + @Override + public Observable listExportErrorsV2Async(String serviceName, String errorBucket) { + ServicesInner client = this.inner(); + return client.listExportErrorsV2Async(serviceName, errorBucket) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public MergedExportError call(MergedExportErrorInner inner) { + return new MergedExportErrorImpl(inner, manager()); + } + }); + } + + @Override + public Observable getMetricsAsync(String serviceName, String metricName, String groupName) { + ServicesInner client = this.inner(); + return client.getMetricsAsync(serviceName, metricName, groupName) + .flatMap(new Func1>() { + @Override + public Observable call(MetricSetsInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((MetricServiceMetricSets)wrapMetricServiceMetricSetsModel(inner)); + } + } + }); + } + + @Override + public Observable listMetricsAverageAsync(final String serviceName, final String metricName, final String groupName) { + ServicesInner client = this.inner(); + return client.listMetricsAverageAsync(serviceName, metricName, groupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceItem call(ItemInner inner) { + return new ServiceItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable listMetricsSumAsync(final String serviceName, final String metricName, final String groupName) { + ServicesInner client = this.inner(); + return client.listMetricsSumAsync(serviceName, metricName, groupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ServiceItem call(ItemInner inner) { + return new ServiceItemImpl(inner, manager()); + } + }); + } + + @Override + public Observable getMetricMetadataForGroupAsync(String serviceName, String metricName, String groupName) { + ServicesInner client = this.inner(); + return client.getMetricMetadataForGroupAsync(serviceName, metricName, groupName) + .map(new Func1() { + @Override + public AddsserviceMetricSets call(MetricSetsInner inner) { + return new AddsserviceMetricSetsImpl(inner, manager()); + } + }); + } + + @Override + public Observable listUserBadPasswordReportAsync(String serviceName) { + ServicesInner client = this.inner(); + return client.listUserBadPasswordReportAsync(serviceName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public ErrorReportUsersEntry call(ErrorReportUsersEntryInner inner) { + return new ErrorReportUsersEntryImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAllRiskyIpDownloadReportAsync(String serviceName) { + ServicesInner client = this.inner(); + return client.listAllRiskyIpDownloadReportAsync(serviceName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public RiskyIPBlobUri call(RiskyIPBlobUriInner inner) { + return new RiskyIPBlobUriImpl(inner, manager()); + } + }); + } + + @Override + public Observable listCurrentRiskyIpDownloadReportAsync(String serviceName) { + ServicesInner client = this.inner(); + return client.listCurrentRiskyIpDownloadReportAsync(serviceName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public RiskyIPBlobUri call(RiskyIPBlobUriInner inner) { + return new RiskyIPBlobUriImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicesInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicesInner.java new file mode 100644 index 0000000000000..49d8c53e67784 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/ServicesInner.java @@ -0,0 +1,4098 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import org.joda.time.DateTime; +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.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 Services. + */ +public class ServicesInner { + /** The Retrofit service to perform REST calls. */ + private ServicesService service; + /** The service client containing this operation class. */ + private ADHybridHealthServiceImpl client; + + /** + * Initializes an instance of ServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ServicesInner(Retrofit retrofit, ADHybridHealthServiceImpl client) { + this.service = retrofit.create(ServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Services to be + * used by Retrofit to perform actually REST calls. + */ + interface ServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services list" }) + @GET("providers/Microsoft.ADHybridHealthService/services") + Observable> list(@Query("$filter") String filter, @Query("serviceType") String serviceType, @Query("skipCount") Integer skipCount, @Query("takeCount") Integer takeCount, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services add" }) + @POST("providers/Microsoft.ADHybridHealthService/services") + Observable> add(@Query("api-version") String apiVersion, @Body ServicePropertiesInner service, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services listPremium" }) + @GET("providers/Microsoft.ADHybridHealthService/services/premiumCheck") + Observable> listPremium(@Query("$filter") String filter, @Query("serviceType") String serviceType, @Query("skipCount") Integer skipCount, @Query("takeCount") Integer takeCount, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services get" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}") + Observable> get(@Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services delete" }) + @HTTP(path = "providers/Microsoft.ADHybridHealthService/services/{serviceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("serviceName") String serviceName, @Query("confirm") Boolean confirm, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services update" }) + @PATCH("providers/Microsoft.ADHybridHealthService/services/{serviceName}") + Observable> update(@Path("serviceName") String serviceName, @Body ServicePropertiesInner service, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services listAlerts" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/alerts") + Observable> listAlerts(@Path("serviceName") String serviceName, @Query("$filter") String filter, @Query("state") String state, @Query("from") DateTime from, @Query("to") DateTime to, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services getFeatureAvailibility" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/checkServiceFeatureAvailibility/{featureName}") + Observable> getFeatureAvailibility(@Path("serviceName") String serviceName, @Path("featureName") String featureName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services listExportErrors" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/exporterrors/counts") + Observable> listExportErrors(@Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services listExportErrorsV2" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/exporterrors/listV2") + Observable> listExportErrorsV2(@Path("serviceName") String serviceName, @Query("errorBucket") String errorBucket, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services listExportStatus" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/exportstatus") + Observable> listExportStatus(@Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services addAlertFeedback" }) + @POST("providers/Microsoft.ADHybridHealthService/services/{serviceName}/feedbacktype/alerts/feedback") + Observable> addAlertFeedback(@Path("serviceName") String serviceName, @Body AlertFeedbackInner alertFeedback, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services listAlertFeedback" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/feedbacktype/alerts/{shortName}/alertfeedback") + Observable> listAlertFeedback(@Path("serviceName") String serviceName, @Path("shortName") String shortName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services getMetrics" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/metrics/{metricName}/groups/{groupName}") + Observable> getMetrics(@Path("serviceName") String serviceName, @Path("metricName") String metricName, @Path("groupName") String groupName, @Query("groupKey") String groupKey, @Query("fromDate") DateTime fromDate, @Query("toDate") DateTime toDate, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services listMetricsAverage" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/metrics/{metricName}/groups/{groupName}/average") + Observable> listMetricsAverage(@Path("serviceName") String serviceName, @Path("metricName") String metricName, @Path("groupName") String groupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services listMetricsSum" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/metrics/{metricName}/groups/{groupName}/sum") + Observable> listMetricsSum(@Path("serviceName") String serviceName, @Path("metricName") String metricName, @Path("groupName") String groupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services listMetricMetadata" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/metricmetadata") + Observable> listMetricMetadata(@Path("serviceName") String serviceName, @Query("$filter") String filter, @Query("perfCounter") Boolean perfCounter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services getMetricMetadata" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/metricmetadata/{metricName}") + Observable> getMetricMetadata(@Path("serviceName") String serviceName, @Path("metricName") String metricName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services getMetricMetadataForGroup" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/metricmetadata/{metricName}/groups/{groupName}") + Observable> getMetricMetadataForGroup(@Path("serviceName") String serviceName, @Path("metricName") String metricName, @Path("groupName") String groupName, @Query("groupKey") String groupKey, @Query("fromDate") DateTime fromDate, @Query("toDate") DateTime toDate, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services updateMonitoringConfiguration" }) + @PATCH("providers/Microsoft.ADHybridHealthService/services/{serviceName}/monitoringconfiguration") + Observable> updateMonitoringConfiguration(@Path("serviceName") String serviceName, @Body ItemInner configurationSetting, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services listMonitoringConfigurations" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/monitoringconfigurations") + Observable> listMonitoringConfigurations(@Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services listUserBadPasswordReport" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/reports/badpassword/details/user") + Observable> listUserBadPasswordReport(@Path("serviceName") String serviceName, @Query("dataSource") String dataSource, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services getTenantWhitelisting" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/TenantWhitelisting/{featureName}") + Observable> getTenantWhitelisting(@Path("serviceName") String serviceName, @Path("featureName") String featureName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services listAllRiskyIpDownloadReport" }) + @GET("providers/Microsoft.ADHybridHealthService/services/{serviceName}/reports/riskyIp/blobUris") + Observable> listAllRiskyIpDownloadReport(@Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services listCurrentRiskyIpDownloadReport" }) + @POST("providers/Microsoft.ADHybridHealthService/services/{serviceName}/reports/riskyIp/generateBlobUri") + Observable> listCurrentRiskyIpDownloadReport(@Path("serviceName") String serviceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Services 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.adhybridhealthservice.v2014_01_01.Services listPremiumNext" }) + @GET + Observable> listPremiumNext(@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.adhybridhealthservice.v2014_01_01.Services listAlertsNext" }) + @GET + Observable> listAlertsNext(@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.adhybridhealthservice.v2014_01_01.Services listExportStatusNext" }) + @GET + Observable> listExportStatusNext(@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.adhybridhealthservice.v2014_01_01.Services listMetricsAverageNext" }) + @GET + Observable> listMetricsAverageNext(@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.adhybridhealthservice.v2014_01_01.Services listMetricsSumNext" }) + @GET + Observable> listMetricsSumNext(@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.adhybridhealthservice.v2014_01_01.Services listMetricMetadataNext" }) + @GET + Observable> listMetricMetadataNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServicePropertiesInner> 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(); + } + }; + } + + /** + * Gets the details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @param serviceCallback 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); + } + + /** + * Gets the details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> 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)); + } + }); + } + + /** + * Gets the details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServicePropertiesInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final String serviceType = null; + final Integer skipCount = null; + final Integer takeCount = null; + return service.list(filter, serviceType, skipCount, takeCount, 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); + } + } + }); + } + + /** + * Gets the details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @param filter The service property filter to apply. + * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServicePropertiesInner> object if successful. + */ + public PagedList list(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount) { + ServiceResponse> response = listSinglePageAsync(filter, serviceType, skipCount, takeCount).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @param filter The service property filter to apply. + * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @param serviceCallback 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 filter, final String serviceType, final Integer skipCount, final Integer takeCount, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(filter, serviceType, skipCount, takeCount), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @param filter The service property filter to apply. + * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable> listAsync(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount) { + return listWithServiceResponseAsync(filter, serviceType, skipCount, takeCount) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @param filter The service property filter to apply. + * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable>> listWithServiceResponseAsync(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount) { + return listSinglePageAsync(filter, serviceType, skipCount, takeCount) + .concatMap(new Func1>, 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)); + } + }); + } + + /** + * Gets the details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + ServiceResponse> * @param filter The service property filter to apply. + ServiceResponse> * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + ServiceResponse> * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + ServiceResponse> * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServicePropertiesInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount) { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(filter, serviceType, skipCount, takeCount, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Onboards a service for a given tenant in Azure Active Directory Connect Health. + * + * @param service The service object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServicePropertiesInner object if successful. + */ + public ServicePropertiesInner add(ServicePropertiesInner service) { + return addWithServiceResponseAsync(service).toBlocking().single().body(); + } + + /** + * Onboards a service for a given tenant in Azure Active Directory Connect Health. + * + * @param service The service 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 addAsync(ServicePropertiesInner service, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addWithServiceResponseAsync(service), serviceCallback); + } + + /** + * Onboards a service for a given tenant in Azure Active Directory Connect Health. + * + * @param service The service object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServicePropertiesInner object + */ + public Observable addAsync(ServicePropertiesInner service) { + return addWithServiceResponseAsync(service).map(new Func1, ServicePropertiesInner>() { + @Override + public ServicePropertiesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Onboards a service for a given tenant in Azure Active Directory Connect Health. + * + * @param service The service object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServicePropertiesInner object + */ + public Observable> addWithServiceResponseAsync(ServicePropertiesInner service) { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (service == null) { + throw new IllegalArgumentException("Parameter service is required and cannot be null."); + } + Validator.validate(service); + return service.add(this.client.apiVersion(), service, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse addDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServicePropertiesInner> object if successful. + */ + public PagedList listPremium() { + ServiceResponse> response = listPremiumSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPremiumNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPremiumAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPremiumSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPremiumNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable> listPremiumAsync() { + return listPremiumWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable>> listPremiumWithServiceResponseAsync() { + return listPremiumSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listPremiumNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServicePropertiesInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPremiumSinglePageAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final String serviceType = null; + final Integer skipCount = null; + final Integer takeCount = null; + return service.listPremium(filter, serviceType, skipCount, takeCount, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPremiumDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param filter The service property filter to apply. + * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServicePropertiesInner> object if successful. + */ + public PagedList listPremium(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount) { + ServiceResponse> response = listPremiumSinglePageAsync(filter, serviceType, skipCount, takeCount).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPremiumNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param filter The service property filter to apply. + * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listPremiumAsync(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPremiumSinglePageAsync(filter, serviceType, skipCount, takeCount), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPremiumNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param filter The service property filter to apply. + * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable> listPremiumAsync(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount) { + return listPremiumWithServiceResponseAsync(filter, serviceType, skipCount, takeCount) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param filter The service property filter to apply. + * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable>> listPremiumWithServiceResponseAsync(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount) { + return listPremiumSinglePageAsync(filter, serviceType, skipCount, takeCount) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listPremiumNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + ServiceResponse> * @param filter The service property filter to apply. + ServiceResponse> * @param serviceType The service type for the services onboarded to Azure Active Directory Connect Health. Depending on whether the service is monitoring, ADFS, Sync or ADDS roles, the service type can either be AdFederationService or AadSyncService or AdDomainService. + ServiceResponse> * @param skipCount The skip count, which specifies the number of elements that can be bypassed from a sequence and then return the remaining elements. + ServiceResponse> * @param takeCount The take count , which specifies the number of elements that can be returned from a sequence. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServicePropertiesInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPremiumSinglePageAsync(final String filter, final String serviceType, final Integer skipCount, final Integer takeCount) { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listPremium(filter, serviceType, skipCount, takeCount, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPremiumDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPremiumDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of a service for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServicePropertiesInner object if successful. + */ + public ServicePropertiesInner get(String serviceName) { + return getWithServiceResponseAsync(serviceName).toBlocking().single().body(); + } + + /** + * Gets the details of a service for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @param serviceCallback 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 serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(serviceName), serviceCallback); + } + + /** + * Gets the details of a service for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServicePropertiesInner object + */ + public Observable getAsync(String serviceName) { + return getWithServiceResponseAsync(serviceName).map(new Func1, ServicePropertiesInner>() { + @Override + public ServicePropertiesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the details of a service for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServicePropertiesInner object + */ + public Observable> getWithServiceResponseAsync(String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required 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(serviceName, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes a service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String serviceName) { + deleteWithServiceResponseAsync(serviceName).toBlocking().single().body(); + } + + /** + * Deletes a service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be 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 serviceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(serviceName), serviceCallback); + } + + /** + * Deletes a service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String serviceName) { + return deleteWithServiceResponseAsync(serviceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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 confirm = null; + return service.delete(serviceName, confirm, 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 service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be deleted. + * @param confirm Indicates if the service will be permanently deleted or disabled. True indicates that the service will be permanently deleted and False indicates that the service will be marked disabled and then deleted after 30 days, if it is not re-registered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String serviceName, Boolean confirm) { + deleteWithServiceResponseAsync(serviceName, confirm).toBlocking().single().body(); + } + + /** + * Deletes a service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be deleted. + * @param confirm Indicates if the service will be permanently deleted or disabled. True indicates that the service will be permanently deleted and False indicates that the service will be marked disabled and then deleted after 30 days, if it is not re-registered. + * @param serviceCallback 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 serviceName, Boolean confirm, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(serviceName, confirm), serviceCallback); + } + + /** + * Deletes a service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be deleted. + * @param confirm Indicates if the service will be permanently deleted or disabled. True indicates that the service will be permanently deleted and False indicates that the service will be marked disabled and then deleted after 30 days, if it is not re-registered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String serviceName, Boolean confirm) { + return deleteWithServiceResponseAsync(serviceName, confirm).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a service which is onboarded to Azure Active Directory Connect Health. + * + * @param serviceName The name of the service which needs to be deleted. + * @param confirm Indicates if the service will be permanently deleted or disabled. True indicates that the service will be permanently deleted and False indicates that the service will be marked disabled and then deleted after 30 days, if it is not re-registered. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String serviceName, Boolean confirm) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required 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(serviceName, confirm, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the service properties of an onboarded service. + * + * @param serviceName The name of the service which needs to be deleted. + * @param service The service object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServicePropertiesInner object if successful. + */ + public ServicePropertiesInner update(String serviceName, ServicePropertiesInner service) { + return updateWithServiceResponseAsync(serviceName, service).toBlocking().single().body(); + } + + /** + * Updates the service properties of an onboarded service. + * + * @param serviceName The name of the service which needs to be deleted. + * @param service The service 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 updateAsync(String serviceName, ServicePropertiesInner service, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(serviceName, service), serviceCallback); + } + + /** + * Updates the service properties of an onboarded service. + * + * @param serviceName The name of the service which needs to be deleted. + * @param service The service object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServicePropertiesInner object + */ + public Observable updateAsync(String serviceName, ServicePropertiesInner service) { + return updateWithServiceResponseAsync(serviceName, service).map(new Func1, ServicePropertiesInner>() { + @Override + public ServicePropertiesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the service properties of an onboarded service. + * + * @param serviceName The name of the service which needs to be deleted. + * @param service The service object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServicePropertiesInner object + */ + public Observable> updateWithServiceResponseAsync(String serviceName, ServicePropertiesInner service) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (service == null) { + throw new IllegalArgumentException("Parameter service 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(service); + return service.update(serviceName, service, 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 CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the alerts for a given service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AlertInner> object if successful. + */ + public PagedList listAlerts(final String serviceName) { + ServiceResponse> response = listAlertsSinglePageAsync(serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAlertsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the alerts for a given service. + * + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAlertsAsync(final String serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAlertsSinglePageAsync(serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAlertsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the alerts for a given service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable> listAlertsAsync(final String serviceName) { + return listAlertsWithServiceResponseAsync(serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the alerts for a given service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable>> listAlertsWithServiceResponseAsync(final String serviceName) { + return listAlertsSinglePageAsync(serviceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAlertsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the alerts for a given service. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AlertInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAlertsSinglePageAsync(final String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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; + final String state = null; + final DateTime from = null; + final DateTime to = null; + return service.listAlerts(serviceName, filter, state, from, to, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAlertsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the alerts for a given service. + * + * @param serviceName The name of the service. + * @param filter The alert property filter to apply. + * @param state The alert state to query for. + * @param from The start date to query for. + * @param to The end date till when to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AlertInner> object if successful. + */ + public PagedList listAlerts(final String serviceName, final String filter, final String state, final DateTime from, final DateTime to) { + ServiceResponse> response = listAlertsSinglePageAsync(serviceName, filter, state, from, to).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAlertsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the alerts for a given service. + * + * @param serviceName The name of the service. + * @param filter The alert property filter to apply. + * @param state The alert state to query for. + * @param from The start date to query for. + * @param to The end date till when to query 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> listAlertsAsync(final String serviceName, final String filter, final String state, final DateTime from, final DateTime to, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAlertsSinglePageAsync(serviceName, filter, state, from, to), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAlertsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the alerts for a given service. + * + * @param serviceName The name of the service. + * @param filter The alert property filter to apply. + * @param state The alert state to query for. + * @param from The start date to query for. + * @param to The end date till when to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable> listAlertsAsync(final String serviceName, final String filter, final String state, final DateTime from, final DateTime to) { + return listAlertsWithServiceResponseAsync(serviceName, filter, state, from, to) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the alerts for a given service. + * + * @param serviceName The name of the service. + * @param filter The alert property filter to apply. + * @param state The alert state to query for. + * @param from The start date to query for. + * @param to The end date till when to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable>> listAlertsWithServiceResponseAsync(final String serviceName, final String filter, final String state, final DateTime from, final DateTime to) { + return listAlertsSinglePageAsync(serviceName, filter, state, from, to) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAlertsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the alerts for a given service. + * + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param filter The alert property filter to apply. + ServiceResponse> * @param state The alert state to query for. + ServiceResponse> * @param from The start date to query for. + ServiceResponse> * @param to The end date till when to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AlertInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAlertsSinglePageAsync(final String serviceName, final String filter, final String state, final DateTime from, final DateTime to) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listAlerts(serviceName, filter, state, from, to, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAlertsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAlertsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Checks if the service has all the pre-requisites met to use a feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ResultInner object if successful. + */ + public ResultInner getFeatureAvailibility(String serviceName, String featureName) { + return getFeatureAvailibilityWithServiceResponseAsync(serviceName, featureName).toBlocking().single().body(); + } + + /** + * Checks if the service has all the pre-requisites met to use a feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getFeatureAvailibilityAsync(String serviceName, String featureName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getFeatureAvailibilityWithServiceResponseAsync(serviceName, featureName), serviceCallback); + } + + /** + * Checks if the service has all the pre-requisites met to use a feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ResultInner object + */ + public Observable getFeatureAvailibilityAsync(String serviceName, String featureName) { + return getFeatureAvailibilityWithServiceResponseAsync(serviceName, featureName).map(new Func1, ResultInner>() { + @Override + public ResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks if the service has all the pre-requisites met to use a feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ResultInner object + */ + public Observable> getFeatureAvailibilityWithServiceResponseAsync(String serviceName, String featureName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (featureName == null) { + throw new IllegalArgumentException("Parameter featureName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getFeatureAvailibility(serviceName, featureName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getFeatureAvailibilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getFeatureAvailibilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the count of latest AAD export errors. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException 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<ErrorCountInner> object if successful. + */ + public List listExportErrors(String serviceName) { + return listExportErrorsWithServiceResponseAsync(serviceName).toBlocking().single().body(); + } + + /** + * Gets the count of latest AAD export errors. + * + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listExportErrorsAsync(String serviceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listExportErrorsWithServiceResponseAsync(serviceName), serviceCallback); + } + + /** + * Gets the count of latest AAD export errors. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ErrorCountInner> object + */ + public Observable> listExportErrorsAsync(String serviceName) { + return listExportErrorsWithServiceResponseAsync(serviceName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the count of latest AAD export errors. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ErrorCountInner> object + */ + public Observable>> listExportErrorsWithServiceResponseAsync(String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listExportErrors(serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listExportErrorsDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listExportErrorsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the categorized export errors. + * + * @param serviceName The name of the service. + * @param errorBucket The error category to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException 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<MergedExportErrorInner> object if successful. + */ + public List listExportErrorsV2(String serviceName, String errorBucket) { + return listExportErrorsV2WithServiceResponseAsync(serviceName, errorBucket).toBlocking().single().body(); + } + + /** + * Gets the categorized export errors. + * + * @param serviceName The name of the service. + * @param errorBucket The error category to query 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> listExportErrorsV2Async(String serviceName, String errorBucket, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listExportErrorsV2WithServiceResponseAsync(serviceName, errorBucket), serviceCallback); + } + + /** + * Gets the categorized export errors. + * + * @param serviceName The name of the service. + * @param errorBucket The error category to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<MergedExportErrorInner> object + */ + public Observable> listExportErrorsV2Async(String serviceName, String errorBucket) { + return listExportErrorsV2WithServiceResponseAsync(serviceName, errorBucket).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the categorized export errors. + * + * @param serviceName The name of the service. + * @param errorBucket The error category to query for. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<MergedExportErrorInner> object + */ + public Observable>> listExportErrorsV2WithServiceResponseAsync(String serviceName, String errorBucket) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (errorBucket == null) { + throw new IllegalArgumentException("Parameter errorBucket is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listExportErrorsV2(serviceName, errorBucket, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listExportErrorsV2Delegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listExportErrorsV2Delegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the export status. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ExportStatusInner> object if successful. + */ + public PagedList listExportStatus(final String serviceName) { + ServiceResponse> response = listExportStatusSinglePageAsync(serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listExportStatusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the export status. + * + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listExportStatusAsync(final String serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listExportStatusSinglePageAsync(serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listExportStatusNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the export status. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExportStatusInner> object + */ + public Observable> listExportStatusAsync(final String serviceName) { + return listExportStatusWithServiceResponseAsync(serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the export status. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExportStatusInner> object + */ + public Observable>> listExportStatusWithServiceResponseAsync(final String serviceName) { + return listExportStatusSinglePageAsync(serviceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listExportStatusNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the export status. + * + ServiceResponse> * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExportStatusInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listExportStatusSinglePageAsync(final String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listExportStatus(serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listExportStatusDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listExportStatusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Adds an alert feedback submitted by customer. + * + * @param serviceName The name of the service. + * @param alertFeedback The alert feedback. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AlertFeedbackInner object if successful. + */ + public AlertFeedbackInner addAlertFeedback(String serviceName, AlertFeedbackInner alertFeedback) { + return addAlertFeedbackWithServiceResponseAsync(serviceName, alertFeedback).toBlocking().single().body(); + } + + /** + * Adds an alert feedback submitted by customer. + * + * @param serviceName The name of the service. + * @param alertFeedback The alert feedback. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addAlertFeedbackAsync(String serviceName, AlertFeedbackInner alertFeedback, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addAlertFeedbackWithServiceResponseAsync(serviceName, alertFeedback), serviceCallback); + } + + /** + * Adds an alert feedback submitted by customer. + * + * @param serviceName The name of the service. + * @param alertFeedback The alert feedback. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AlertFeedbackInner object + */ + public Observable addAlertFeedbackAsync(String serviceName, AlertFeedbackInner alertFeedback) { + return addAlertFeedbackWithServiceResponseAsync(serviceName, alertFeedback).map(new Func1, AlertFeedbackInner>() { + @Override + public AlertFeedbackInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Adds an alert feedback submitted by customer. + * + * @param serviceName The name of the service. + * @param alertFeedback The alert feedback. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AlertFeedbackInner object + */ + public Observable> addAlertFeedbackWithServiceResponseAsync(String serviceName, AlertFeedbackInner alertFeedback) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (alertFeedback == null) { + throw new IllegalArgumentException("Parameter alertFeedback 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(alertFeedback); + return service.addAlertFeedback(serviceName, alertFeedback, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addAlertFeedbackDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse addAlertFeedbackDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of all alert feedback for a given tenant and alert type. + * + * @param serviceName The name of the service. + * @param shortName The name of the alert. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException 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<AlertFeedbackInner> object if successful. + */ + public List listAlertFeedback(String serviceName, String shortName) { + return listAlertFeedbackWithServiceResponseAsync(serviceName, shortName).toBlocking().single().body(); + } + + /** + * Gets a list of all alert feedback for a given tenant and alert type. + * + * @param serviceName The name of the service. + * @param shortName The name of the alert. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAlertFeedbackAsync(String serviceName, String shortName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listAlertFeedbackWithServiceResponseAsync(serviceName, shortName), serviceCallback); + } + + /** + * Gets a list of all alert feedback for a given tenant and alert type. + * + * @param serviceName The name of the service. + * @param shortName The name of the alert. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<AlertFeedbackInner> object + */ + public Observable> listAlertFeedbackAsync(String serviceName, String shortName) { + return listAlertFeedbackWithServiceResponseAsync(serviceName, shortName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of all alert feedback for a given tenant and alert type. + * + * @param serviceName The name of the service. + * @param shortName The name of the alert. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<AlertFeedbackInner> object + */ + public Observable>> listAlertFeedbackWithServiceResponseAsync(String serviceName, String shortName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (shortName == null) { + throw new IllegalArgumentException("Parameter shortName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listAlertFeedback(serviceName, shortName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAlertFeedbackDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAlertFeedbackDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MetricSetsInner object if successful. + */ + public MetricSetsInner getMetrics(String serviceName, String metricName, String groupName) { + return getMetricsWithServiceResponseAsync(serviceName, metricName, groupName).toBlocking().single().body(); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group 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 getMetricsAsync(String serviceName, String metricName, String groupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMetricsWithServiceResponseAsync(serviceName, metricName, groupName), serviceCallback); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable getMetricsAsync(String serviceName, String metricName, String groupName) { + return getMetricsWithServiceResponseAsync(serviceName, metricName, groupName).map(new Func1, MetricSetsInner>() { + @Override + public MetricSetsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable> getMetricsWithServiceResponseAsync(String serviceName, String metricName, String groupName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName 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 groupKey = null; + final DateTime fromDate = null; + final DateTime toDate = null; + return service.getMetrics(serviceName, metricName, groupName, groupKey, fromDate, toDate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMetricsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MetricSetsInner object if successful. + */ + public MetricSetsInner getMetrics(String serviceName, String metricName, String groupName, String groupKey, DateTime fromDate, DateTime toDate) { + return getMetricsWithServiceResponseAsync(serviceName, metricName, groupName, groupKey, fromDate, toDate).toBlocking().single().body(); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getMetricsAsync(String serviceName, String metricName, String groupName, String groupKey, DateTime fromDate, DateTime toDate, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMetricsWithServiceResponseAsync(serviceName, metricName, groupName, groupKey, fromDate, toDate), serviceCallback); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable getMetricsAsync(String serviceName, String metricName, String groupName, String groupKey, DateTime fromDate, DateTime toDate) { + return getMetricsWithServiceResponseAsync(serviceName, metricName, groupName, groupKey, fromDate, toDate).map(new Func1, MetricSetsInner>() { + @Override + public MetricSetsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the server related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable> getMetricsWithServiceResponseAsync(String serviceName, String metricName, String groupName, String groupKey, DateTime fromDate, DateTime toDate) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getMetrics(serviceName, metricName, groupName, groupKey, fromDate, toDate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMetricsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ItemInner> object if successful. + */ + public PagedList listMetricsAverage(final String serviceName, final String metricName, final String groupName) { + ServiceResponse> response = listMetricsAverageSinglePageAsync(serviceName, metricName, groupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsAverageNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group 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> listMetricsAverageAsync(final String serviceName, final String metricName, final String groupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsAverageSinglePageAsync(serviceName, metricName, groupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsAverageNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable> listMetricsAverageAsync(final String serviceName, final String metricName, final String groupName) { + return listMetricsAverageWithServiceResponseAsync(serviceName, metricName, groupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable>> listMetricsAverageWithServiceResponseAsync(final String serviceName, final String metricName, final String groupName) { + return listMetricsAverageSinglePageAsync(serviceName, metricName, groupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsAverageNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param metricName The metric name + ServiceResponse> * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricsAverageSinglePageAsync(final String serviceName, final String metricName, final String groupName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listMetricsAverage(serviceName, metricName, groupName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricsAverageDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsAverageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ItemInner> object if successful. + */ + public PagedList listMetricsSum(final String serviceName, final String metricName, final String groupName) { + ServiceResponse> response = listMetricsSumSinglePageAsync(serviceName, metricName, groupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsSumNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group 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> listMetricsSumAsync(final String serviceName, final String metricName, final String groupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsSumSinglePageAsync(serviceName, metricName, groupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsSumNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable> listMetricsSumAsync(final String serviceName, final String metricName, final String groupName) { + return listMetricsSumWithServiceResponseAsync(serviceName, metricName, groupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable>> listMetricsSumWithServiceResponseAsync(final String serviceName, final String metricName, final String groupName) { + return listMetricsSumSinglePageAsync(serviceName, metricName, groupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricsSumNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param metricName The metric name + ServiceResponse> * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricsSumSinglePageAsync(final String serviceName, final String metricName, final String groupName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listMetricsSum(serviceName, metricName, groupName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricsSumDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsSumDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<MetricMetadataInner> object if successful. + */ + public PagedList listMetricMetadata(final String serviceName) { + ServiceResponse> response = listMetricMetadataSinglePageAsync(serviceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricMetadataNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricMetadataAsync(final String serviceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricMetadataSinglePageAsync(serviceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricMetadataNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MetricMetadataInner> object + */ + public Observable> listMetricMetadataAsync(final String serviceName) { + return listMetricMetadataWithServiceResponseAsync(serviceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MetricMetadataInner> object + */ + public Observable>> listMetricMetadataWithServiceResponseAsync(final String serviceName) { + return listMetricMetadataSinglePageAsync(serviceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricMetadataNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<MetricMetadataInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricMetadataSinglePageAsync(final String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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; + final Boolean perfCounter = null; + return service.listMetricMetadata(serviceName, filter, perfCounter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricMetadataDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @param filter The metric metadata property filter to apply. + * @param perfCounter Indicates if only performance counter metrics are requested. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<MetricMetadataInner> object if successful. + */ + public PagedList listMetricMetadata(final String serviceName, final String filter, final Boolean perfCounter) { + ServiceResponse> response = listMetricMetadataSinglePageAsync(serviceName, filter, perfCounter).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricMetadataNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @param filter The metric metadata property filter to apply. + * @param perfCounter Indicates if only performance counter metrics are requested. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMetricMetadataAsync(final String serviceName, final String filter, final Boolean perfCounter, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricMetadataSinglePageAsync(serviceName, filter, perfCounter), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricMetadataNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @param filter The metric metadata property filter to apply. + * @param perfCounter Indicates if only performance counter metrics are requested. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MetricMetadataInner> object + */ + public Observable> listMetricMetadataAsync(final String serviceName, final String filter, final Boolean perfCounter) { + return listMetricMetadataWithServiceResponseAsync(serviceName, filter, perfCounter) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @param filter The metric metadata property filter to apply. + * @param perfCounter Indicates if only performance counter metrics are requested. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<MetricMetadataInner> object + */ + public Observable>> listMetricMetadataWithServiceResponseAsync(final String serviceName, final String filter, final Boolean perfCounter) { + return listMetricMetadataSinglePageAsync(serviceName, filter, perfCounter) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listMetricMetadataNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the service related metrics information. + * + ServiceResponse> * @param serviceName The name of the service. + ServiceResponse> * @param filter The metric metadata property filter to apply. + ServiceResponse> * @param perfCounter Indicates if only performance counter metrics are requested. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<MetricMetadataInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricMetadataSinglePageAsync(final String serviceName, final String filter, final Boolean perfCounter) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listMetricMetadata(serviceName, filter, perfCounter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricMetadataDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricMetadataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MetricMetadataInner object if successful. + */ + public MetricMetadataInner getMetricMetadata(String serviceName, String metricName) { + return getMetricMetadataWithServiceResponseAsync(serviceName, metricName).toBlocking().single().body(); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @param metricName The metric 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 getMetricMetadataAsync(String serviceName, String metricName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMetricMetadataWithServiceResponseAsync(serviceName, metricName), serviceCallback); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricMetadataInner object + */ + public Observable getMetricMetadataAsync(String serviceName, String metricName) { + return getMetricMetadataWithServiceResponseAsync(serviceName, metricName).map(new Func1, MetricMetadataInner>() { + @Override + public MetricMetadataInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the service related metrics information. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricMetadataInner object + */ + public Observable> getMetricMetadataWithServiceResponseAsync(String serviceName, String metricName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getMetricMetadata(serviceName, metricName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMetricMetadataDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMetricMetadataDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MetricSetsInner object if successful. + */ + public MetricSetsInner getMetricMetadataForGroup(String serviceName, String metricName, String groupName) { + return getMetricMetadataForGroupWithServiceResponseAsync(serviceName, metricName, groupName).toBlocking().single().body(); + } + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group 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 getMetricMetadataForGroupAsync(String serviceName, String metricName, String groupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMetricMetadataForGroupWithServiceResponseAsync(serviceName, metricName, groupName), serviceCallback); + } + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable getMetricMetadataForGroupAsync(String serviceName, String metricName, String groupName) { + return getMetricMetadataForGroupWithServiceResponseAsync(serviceName, metricName, groupName).map(new Func1, MetricSetsInner>() { + @Override + public MetricSetsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable> getMetricMetadataForGroupWithServiceResponseAsync(String serviceName, String metricName, String groupName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName 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 groupKey = null; + final DateTime fromDate = null; + final DateTime toDate = null; + return service.getMetricMetadataForGroup(serviceName, metricName, groupName, groupKey, fromDate, toDate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMetricMetadataForGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MetricSetsInner object if successful. + */ + public MetricSetsInner getMetricMetadataForGroup(String serviceName, String metricName, String groupName, String groupKey, DateTime fromDate, DateTime toDate) { + return getMetricMetadataForGroupWithServiceResponseAsync(serviceName, metricName, groupName, groupKey, fromDate, toDate).toBlocking().single().body(); + } + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getMetricMetadataForGroupAsync(String serviceName, String metricName, String groupName, String groupKey, DateTime fromDate, DateTime toDate, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getMetricMetadataForGroupWithServiceResponseAsync(serviceName, metricName, groupName, groupKey, fromDate, toDate), serviceCallback); + } + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable getMetricMetadataForGroupAsync(String serviceName, String metricName, String groupName, String groupKey, DateTime fromDate, DateTime toDate) { + return getMetricMetadataForGroupWithServiceResponseAsync(serviceName, metricName, groupName, groupKey, fromDate, toDate).map(new Func1, MetricSetsInner>() { + @Override + public MetricSetsInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the service related metrics for a given metric and group combination. + * + * @param serviceName The name of the service. + * @param metricName The metric name + * @param groupName The group name + * @param groupKey The group key + * @param fromDate The start date. + * @param toDate The end date. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MetricSetsInner object + */ + public Observable> getMetricMetadataForGroupWithServiceResponseAsync(String serviceName, String metricName, String groupName, String groupKey, DateTime fromDate, DateTime toDate) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (metricName == null) { + throw new IllegalArgumentException("Parameter metricName is required and cannot be null."); + } + if (groupName == null) { + throw new IllegalArgumentException("Parameter groupName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getMetricMetadataForGroup(serviceName, metricName, groupName, groupKey, fromDate, toDate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getMetricMetadataForGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getMetricMetadataForGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the service level monitoring configuration. + * + * @param serviceName The name of the service. + * @param configurationSetting The monitoring configuration to update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void updateMonitoringConfiguration(String serviceName, ItemInner configurationSetting) { + updateMonitoringConfigurationWithServiceResponseAsync(serviceName, configurationSetting).toBlocking().single().body(); + } + + /** + * Updates the service level monitoring configuration. + * + * @param serviceName The name of the service. + * @param configurationSetting The monitoring configuration to 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 updateMonitoringConfigurationAsync(String serviceName, ItemInner configurationSetting, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateMonitoringConfigurationWithServiceResponseAsync(serviceName, configurationSetting), serviceCallback); + } + + /** + * Updates the service level monitoring configuration. + * + * @param serviceName The name of the service. + * @param configurationSetting The monitoring configuration to update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable updateMonitoringConfigurationAsync(String serviceName, ItemInner configurationSetting) { + return updateMonitoringConfigurationWithServiceResponseAsync(serviceName, configurationSetting).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the service level monitoring configuration. + * + * @param serviceName The name of the service. + * @param configurationSetting The monitoring configuration to update + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> updateMonitoringConfigurationWithServiceResponseAsync(String serviceName, ItemInner configurationSetting) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (configurationSetting == null) { + throw new IllegalArgumentException("Parameter configurationSetting 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(configurationSetting); + return service.updateMonitoringConfiguration(serviceName, configurationSetting, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = updateMonitoringConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse updateMonitoringConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the service level monitoring configurations. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException 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<ItemInner> object if successful. + */ + public List listMonitoringConfigurations(String serviceName) { + return listMonitoringConfigurationsWithServiceResponseAsync(serviceName).toBlocking().single().body(); + } + + /** + * Gets the service level monitoring configurations. + * + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listMonitoringConfigurationsAsync(String serviceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listMonitoringConfigurationsWithServiceResponseAsync(serviceName), serviceCallback); + } + + /** + * Gets the service level monitoring configurations. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ItemInner> object + */ + public Observable> listMonitoringConfigurationsAsync(String serviceName) { + return listMonitoringConfigurationsWithServiceResponseAsync(serviceName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the service level monitoring configurations. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ItemInner> object + */ + public Observable>> listMonitoringConfigurationsWithServiceResponseAsync(String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listMonitoringConfigurations(serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMonitoringConfigurationsDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMonitoringConfigurationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the bad password login attempt report for an user. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException 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<ErrorReportUsersEntryInner> object if successful. + */ + public List listUserBadPasswordReport(String serviceName) { + return listUserBadPasswordReportWithServiceResponseAsync(serviceName).toBlocking().single().body(); + } + + /** + * Gets the bad password login attempt report for an user. + * + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listUserBadPasswordReportAsync(String serviceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listUserBadPasswordReportWithServiceResponseAsync(serviceName), serviceCallback); + } + + /** + * Gets the bad password login attempt report for an user. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ErrorReportUsersEntryInner> object + */ + public Observable> listUserBadPasswordReportAsync(String serviceName) { + return listUserBadPasswordReportWithServiceResponseAsync(serviceName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the bad password login attempt report for an user. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ErrorReportUsersEntryInner> object + */ + public Observable>> listUserBadPasswordReportWithServiceResponseAsync(String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName 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 dataSource = null; + return service.listUserBadPasswordReport(serviceName, dataSource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUserBadPasswordReportDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the bad password login attempt report for an user. + * + * @param serviceName The name of the service. + * @param dataSource The source of data, if its test data or customer data. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException 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<ErrorReportUsersEntryInner> object if successful. + */ + public List listUserBadPasswordReport(String serviceName, String dataSource) { + return listUserBadPasswordReportWithServiceResponseAsync(serviceName, dataSource).toBlocking().single().body(); + } + + /** + * Gets the bad password login attempt report for an user. + * + * @param serviceName The name of the service. + * @param dataSource The source of data, if its test data or customer data. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listUserBadPasswordReportAsync(String serviceName, String dataSource, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listUserBadPasswordReportWithServiceResponseAsync(serviceName, dataSource), serviceCallback); + } + + /** + * Gets the bad password login attempt report for an user. + * + * @param serviceName The name of the service. + * @param dataSource The source of data, if its test data or customer data. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ErrorReportUsersEntryInner> object + */ + public Observable> listUserBadPasswordReportAsync(String serviceName, String dataSource) { + return listUserBadPasswordReportWithServiceResponseAsync(serviceName, dataSource).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the bad password login attempt report for an user. + * + * @param serviceName The name of the service. + * @param dataSource The source of data, if its test data or customer data. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ErrorReportUsersEntryInner> object + */ + public Observable>> listUserBadPasswordReportWithServiceResponseAsync(String serviceName, String dataSource) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listUserBadPasswordReport(serviceName, dataSource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listUserBadPasswordReportDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listUserBadPasswordReportDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Checks if the tenant, to which a service is registered, is whitelisted to use a feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ResultInner object if successful. + */ + public ResultInner getTenantWhitelisting(String serviceName, String featureName) { + return getTenantWhitelistingWithServiceResponseAsync(serviceName, featureName).toBlocking().single().body(); + } + + /** + * Checks if the tenant, to which a service is registered, is whitelisted to use a feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getTenantWhitelistingAsync(String serviceName, String featureName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getTenantWhitelistingWithServiceResponseAsync(serviceName, featureName), serviceCallback); + } + + /** + * Checks if the tenant, to which a service is registered, is whitelisted to use a feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ResultInner object + */ + public Observable getTenantWhitelistingAsync(String serviceName, String featureName) { + return getTenantWhitelistingWithServiceResponseAsync(serviceName, featureName).map(new Func1, ResultInner>() { + @Override + public ResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks if the tenant, to which a service is registered, is whitelisted to use a feature. + * + * @param serviceName The name of the service. + * @param featureName The name of the feature. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ResultInner object + */ + public Observable> getTenantWhitelistingWithServiceResponseAsync(String serviceName, String featureName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (featureName == null) { + throw new IllegalArgumentException("Parameter featureName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getTenantWhitelisting(serviceName, featureName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getTenantWhitelistingDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getTenantWhitelistingDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all Risky IP report URIs for the last 7 days. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException 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<RiskyIPBlobUriInner> object if successful. + */ + public List listAllRiskyIpDownloadReport(String serviceName) { + return listAllRiskyIpDownloadReportWithServiceResponseAsync(serviceName).toBlocking().single().body(); + } + + /** + * Gets all Risky IP report URIs for the last 7 days. + * + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAllRiskyIpDownloadReportAsync(String serviceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listAllRiskyIpDownloadReportWithServiceResponseAsync(serviceName), serviceCallback); + } + + /** + * Gets all Risky IP report URIs for the last 7 days. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<RiskyIPBlobUriInner> object + */ + public Observable> listAllRiskyIpDownloadReportAsync(String serviceName) { + return listAllRiskyIpDownloadReportWithServiceResponseAsync(serviceName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets all Risky IP report URIs for the last 7 days. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<RiskyIPBlobUriInner> object + */ + public Observable>> listAllRiskyIpDownloadReportWithServiceResponseAsync(String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listAllRiskyIpDownloadReport(serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAllRiskyIpDownloadReportDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAllRiskyIpDownloadReportDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Initiate the generation of a new Risky IP report. Returns the URI for the new one. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException 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<RiskyIPBlobUriInner> object if successful. + */ + public List listCurrentRiskyIpDownloadReport(String serviceName) { + return listCurrentRiskyIpDownloadReportWithServiceResponseAsync(serviceName).toBlocking().single().body(); + } + + /** + * Initiate the generation of a new Risky IP report. Returns the URI for the new one. + * + * @param serviceName The name of the service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listCurrentRiskyIpDownloadReportAsync(String serviceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listCurrentRiskyIpDownloadReportWithServiceResponseAsync(serviceName), serviceCallback); + } + + /** + * Initiate the generation of a new Risky IP report. Returns the URI for the new one. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<RiskyIPBlobUriInner> object + */ + public Observable> listCurrentRiskyIpDownloadReportAsync(String serviceName) { + return listCurrentRiskyIpDownloadReportWithServiceResponseAsync(serviceName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Initiate the generation of a new Risky IP report. Returns the URI for the new one. + * + * @param serviceName The name of the service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<RiskyIPBlobUriInner> object + */ + public Observable>> listCurrentRiskyIpDownloadReportWithServiceResponseAsync(String serviceName) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listCurrentRiskyIpDownloadReport(serviceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listCurrentRiskyIpDownloadReportDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listCurrentRiskyIpDownloadReportDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServicePropertiesInner> 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(); + } + }; + } + + /** + * Gets the details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @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); + } + + /** + * Gets the details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> 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)); + } + }); + } + + /** + * Gets the details of services, for a tenant, that are onboarded to Azure Active Directory Connect Health. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServicePropertiesInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ServicePropertiesInner> object if successful. + */ + public PagedList listPremiumNext(final String nextPageLink) { + ServiceResponse> response = listPremiumNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listPremiumNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @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> listPremiumNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listPremiumNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listPremiumNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable> listPremiumNextAsync(final String nextPageLink) { + return listPremiumNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ServicePropertiesInner> object + */ + public Observable>> listPremiumNextWithServiceResponseAsync(final String nextPageLink) { + return listPremiumNextSinglePageAsync(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(listPremiumNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the details of services for a tenant having Azure AD Premium license and is onboarded to Azure Active Directory Connect Health. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ServicePropertiesInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listPremiumNextSinglePageAsync(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.listPremiumNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listPremiumNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listPremiumNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the alerts for a given service. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<AlertInner> object if successful. + */ + public PagedList listAlertsNext(final String nextPageLink) { + ServiceResponse> response = listAlertsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAlertsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the alerts for a given service. + * + * @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> listAlertsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAlertsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAlertsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the alerts for a given service. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable> listAlertsNextAsync(final String nextPageLink) { + return listAlertsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the alerts for a given service. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AlertInner> object + */ + public Observable>> listAlertsNextWithServiceResponseAsync(final String nextPageLink) { + return listAlertsNextSinglePageAsync(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(listAlertsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the alerts for a given service. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AlertInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAlertsNextSinglePageAsync(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.listAlertsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAlertsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAlertsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the export status. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ExportStatusInner> object if successful. + */ + public PagedList listExportStatusNext(final String nextPageLink) { + ServiceResponse> response = listExportStatusNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listExportStatusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the export status. + * + * @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> listExportStatusNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listExportStatusNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listExportStatusNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the export status. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExportStatusInner> object + */ + public Observable> listExportStatusNextAsync(final String nextPageLink) { + return listExportStatusNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the export status. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExportStatusInner> object + */ + public Observable>> listExportStatusNextWithServiceResponseAsync(final String nextPageLink) { + return listExportStatusNextSinglePageAsync(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(listExportStatusNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the export status. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExportStatusInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listExportStatusNextSinglePageAsync(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.listExportStatusNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listExportStatusNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listExportStatusNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ItemInner> object if successful. + */ + public PagedList listMetricsAverageNext(final String nextPageLink) { + ServiceResponse> response = listMetricsAverageNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsAverageNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @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> listMetricsAverageNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsAverageNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsAverageNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable> listMetricsAverageNextAsync(final String nextPageLink) { + return listMetricsAverageNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable>> listMetricsAverageNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricsAverageNextSinglePageAsync(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(listMetricsAverageNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the average of the metric values for a given metric and group combination. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricsAverageNextSinglePageAsync(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.listMetricsAverageNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricsAverageNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsAverageNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ItemInner> object if successful. + */ + public PagedList listMetricsSumNext(final String nextPageLink) { + ServiceResponse> response = listMetricsSumNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricsSumNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @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> listMetricsSumNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricsSumNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricsSumNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable> listMetricsSumNextAsync(final String nextPageLink) { + return listMetricsSumNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ItemInner> object + */ + public Observable>> listMetricsSumNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricsSumNextSinglePageAsync(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(listMetricsSumNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the sum of the metric values for a given metric and group combination. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ItemInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricsSumNextSinglePageAsync(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.listMetricsSumNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricsSumNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricsSumNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the service related metrics information. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<MetricMetadataInner> object if successful. + */ + public PagedList listMetricMetadataNext(final String nextPageLink) { + ServiceResponse> response = listMetricMetadataNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listMetricMetadataNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the service related metrics 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> listMetricMetadataNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listMetricMetadataNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listMetricMetadataNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the service related metrics 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<MetricMetadataInner> object + */ + public Observable> listMetricMetadataNextAsync(final String nextPageLink) { + return listMetricMetadataNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the service related metrics 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<MetricMetadataInner> object + */ + public Observable>> listMetricMetadataNextWithServiceResponseAsync(final String nextPageLink) { + return listMetricMetadataNextSinglePageAsync(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(listMetricMetadataNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the service related metrics 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<MetricMetadataInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listMetricMetadataNextSinglePageAsync(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.listMetricMetadataNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listMetricMetadataNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listMetricMetadataNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/TenantImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/TenantImpl.java new file mode 100644 index 0000000000000..884a293fefcae --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/TenantImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Tenant; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import org.joda.time.DateTime; +import java.util.List; + +class TenantImpl extends WrapperImpl implements Tenant { + private final ADHybridHealthServiceManager manager; + TenantImpl(TenantInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public String aadLicense() { + return this.inner().aadLicense(); + } + + @Override + public Boolean aadPremium() { + return this.inner().aadPremium(); + } + + @Override + public Boolean agentAutoUpdate() { + return this.inner().agentAutoUpdate(); + } + + @Override + public Integer alertSuppressionTimeInMins() { + return this.inner().alertSuppressionTimeInMins(); + } + + @Override + public Boolean consentedToMicrosoftDevOps() { + return this.inner().consentedToMicrosoftDevOps(); + } + + @Override + public String countryLetterCode() { + return this.inner().countryLetterCode(); + } + + @Override + public DateTime createdDate() { + return this.inner().createdDate(); + } + + @Override + public DateTime devOpsTtl() { + return this.inner().devOpsTtl(); + } + + @Override + public Boolean disabled() { + return this.inner().disabled(); + } + + @Override + public Integer disabledReason() { + return this.inner().disabledReason(); + } + + @Override + public List globalAdminsEmail() { + return this.inner().globalAdminsEmail(); + } + + @Override + public String initialDomain() { + return this.inner().initialDomain(); + } + + @Override + public DateTime lastDisabled() { + return this.inner().lastDisabled(); + } + + @Override + public DateTime lastVerified() { + return this.inner().lastVerified(); + } + + @Override + public Boolean onboarded() { + return this.inner().onboarded(); + } + + @Override + public Boolean onboardingAllowed() { + return this.inner().onboardingAllowed(); + } + + @Override + public Object pksCertificate() { + return this.inner().pksCertificate(); + } + + @Override + public Boolean privatePreviewTenant() { + return this.inner().privatePreviewTenant(); + } + + @Override + public String tenantId() { + return this.inner().tenantId(); + } + + @Override + public Boolean tenantInQuarantine() { + return this.inner().tenantInQuarantine(); + } + + @Override + public String tenantName() { + return this.inner().tenantName(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/TenantInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/TenantInner.java new file mode 100644 index 0000000000000..2b6a4a430879d --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/TenantInner.java @@ -0,0 +1,578 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import org.joda.time.DateTime; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The details of the onboarded tenant. + */ +public class TenantInner { + /** + * The Id of the tenant. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /** + * The Azure Active Directory license of the tenant. + */ + @JsonProperty(value = "aadLicense") + private String aadLicense; + + /** + * Indicate if the tenant has Azure Active Directory Premium license or + * not. + */ + @JsonProperty(value = "aadPremium") + private Boolean aadPremium; + + /** + * Indicates if the tenant is configured to automatically receive updates + * for Azure Active Directory Connect Health client side features. + */ + @JsonProperty(value = "agentAutoUpdate") + private Boolean agentAutoUpdate; + + /** + * The time in minutes after which an alert will be auto-suppressed. + */ + @JsonProperty(value = "alertSuppressionTimeInMins") + private Integer alertSuppressionTimeInMins; + + /** + * Indicates if the tenant data can be seen by Microsoft through Azure + * portal. + */ + @JsonProperty(value = "consentedToMicrosoftDevOps") + private Boolean consentedToMicrosoftDevOps; + + /** + * The country letter code of the tenant. + */ + @JsonProperty(value = "countryLetterCode") + private String countryLetterCode; + + /** + * The date, in UTC, when the tenant was onboarded to Azure Active + * Directory Connect Health. + */ + @JsonProperty(value = "createdDate") + private DateTime createdDate; + + /** + * The date and time, in UTC, till when the tenant data can be seen by + * Microsoft through Azure portal. + */ + @JsonProperty(value = "devOpsTtl") + private DateTime devOpsTtl; + + /** + * Indicates if the tenant is disabled in Azure Active Directory Connect + * Health. + */ + @JsonProperty(value = "disabled") + private Boolean disabled; + + /** + * The reason due to which the tenant was disabled in Azure Active + * Directory Connect Health. + */ + @JsonProperty(value = "disabledReason") + private Integer disabledReason; + + /** + * The list of global administrators for the tenant. + */ + @JsonProperty(value = "globalAdminsEmail") + private List globalAdminsEmail; + + /** + * The initial domain of the tenant. + */ + @JsonProperty(value = "initialDomain") + private String initialDomain; + + /** + * The date and time, in UTC, when the tenant was last disabled in Azure + * Active Directory Connect Health. + */ + @JsonProperty(value = "lastDisabled") + private DateTime lastDisabled; + + /** + * The date and time, in UTC, when the tenant onboarding status in Azure + * Active Directory Connect Health was last verified. + */ + @JsonProperty(value = "lastVerified") + private DateTime lastVerified; + + /** + * Indicates if the tenant is allowed to onboard to Azure Active Directory + * Connect Health. + */ + @JsonProperty(value = "onboardingAllowed") + private Boolean onboardingAllowed; + + /** + * Indicates if the tenant is already onboarded to Azure Active Directory + * Connect Health. + */ + @JsonProperty(value = "onboarded") + private Boolean onboarded; + + /** + * The certificate associated with the tenant to onboard data to Azure + * Active Directory Connect Health. + */ + @JsonProperty(value = "pksCertificate") + private Object pksCertificate; + + /** + * Indicates if the tenant has signed up for private preview of Azure + * Active Directory Connect Health features. + */ + @JsonProperty(value = "privatePreviewTenant") + private Boolean privatePreviewTenant; + + /** + * Indicates if data collection for this tenant is disabled or not. + */ + @JsonProperty(value = "tenantInQuarantine") + private Boolean tenantInQuarantine; + + /** + * The name of the tenant. + */ + @JsonProperty(value = "tenantName") + private String tenantName; + + /** + * Get the Id of the tenant. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the Id of the tenant. + * + * @param tenantId the tenantId value to set + * @return the TenantInner object itself. + */ + public TenantInner withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the Azure Active Directory license of the tenant. + * + * @return the aadLicense value + */ + public String aadLicense() { + return this.aadLicense; + } + + /** + * Set the Azure Active Directory license of the tenant. + * + * @param aadLicense the aadLicense value to set + * @return the TenantInner object itself. + */ + public TenantInner withAadLicense(String aadLicense) { + this.aadLicense = aadLicense; + return this; + } + + /** + * Get indicate if the tenant has Azure Active Directory Premium license or not. + * + * @return the aadPremium value + */ + public Boolean aadPremium() { + return this.aadPremium; + } + + /** + * Set indicate if the tenant has Azure Active Directory Premium license or not. + * + * @param aadPremium the aadPremium value to set + * @return the TenantInner object itself. + */ + public TenantInner withAadPremium(Boolean aadPremium) { + this.aadPremium = aadPremium; + return this; + } + + /** + * Get indicates if the tenant is configured to automatically receive updates for Azure Active Directory Connect Health client side features. + * + * @return the agentAutoUpdate value + */ + public Boolean agentAutoUpdate() { + return this.agentAutoUpdate; + } + + /** + * Set indicates if the tenant is configured to automatically receive updates for Azure Active Directory Connect Health client side features. + * + * @param agentAutoUpdate the agentAutoUpdate value to set + * @return the TenantInner object itself. + */ + public TenantInner withAgentAutoUpdate(Boolean agentAutoUpdate) { + this.agentAutoUpdate = agentAutoUpdate; + return this; + } + + /** + * Get the time in minutes after which an alert will be auto-suppressed. + * + * @return the alertSuppressionTimeInMins value + */ + public Integer alertSuppressionTimeInMins() { + return this.alertSuppressionTimeInMins; + } + + /** + * Set the time in minutes after which an alert will be auto-suppressed. + * + * @param alertSuppressionTimeInMins the alertSuppressionTimeInMins value to set + * @return the TenantInner object itself. + */ + public TenantInner withAlertSuppressionTimeInMins(Integer alertSuppressionTimeInMins) { + this.alertSuppressionTimeInMins = alertSuppressionTimeInMins; + return this; + } + + /** + * Get indicates if the tenant data can be seen by Microsoft through Azure portal. + * + * @return the consentedToMicrosoftDevOps value + */ + public Boolean consentedToMicrosoftDevOps() { + return this.consentedToMicrosoftDevOps; + } + + /** + * Set indicates if the tenant data can be seen by Microsoft through Azure portal. + * + * @param consentedToMicrosoftDevOps the consentedToMicrosoftDevOps value to set + * @return the TenantInner object itself. + */ + public TenantInner withConsentedToMicrosoftDevOps(Boolean consentedToMicrosoftDevOps) { + this.consentedToMicrosoftDevOps = consentedToMicrosoftDevOps; + return this; + } + + /** + * Get the country letter code of the tenant. + * + * @return the countryLetterCode value + */ + public String countryLetterCode() { + return this.countryLetterCode; + } + + /** + * Set the country letter code of the tenant. + * + * @param countryLetterCode the countryLetterCode value to set + * @return the TenantInner object itself. + */ + public TenantInner withCountryLetterCode(String countryLetterCode) { + this.countryLetterCode = countryLetterCode; + return this; + } + + /** + * Get the date, in UTC, when the tenant was onboarded to Azure Active Directory Connect Health. + * + * @return the createdDate value + */ + public DateTime createdDate() { + return this.createdDate; + } + + /** + * Set the date, in UTC, when the tenant was onboarded to Azure Active Directory Connect Health. + * + * @param createdDate the createdDate value to set + * @return the TenantInner object itself. + */ + public TenantInner withCreatedDate(DateTime createdDate) { + this.createdDate = createdDate; + return this; + } + + /** + * Get the date and time, in UTC, till when the tenant data can be seen by Microsoft through Azure portal. + * + * @return the devOpsTtl value + */ + public DateTime devOpsTtl() { + return this.devOpsTtl; + } + + /** + * Set the date and time, in UTC, till when the tenant data can be seen by Microsoft through Azure portal. + * + * @param devOpsTtl the devOpsTtl value to set + * @return the TenantInner object itself. + */ + public TenantInner withDevOpsTtl(DateTime devOpsTtl) { + this.devOpsTtl = devOpsTtl; + return this; + } + + /** + * Get indicates if the tenant is disabled in Azure Active Directory Connect Health. + * + * @return the disabled value + */ + public Boolean disabled() { + return this.disabled; + } + + /** + * Set indicates if the tenant is disabled in Azure Active Directory Connect Health. + * + * @param disabled the disabled value to set + * @return the TenantInner object itself. + */ + public TenantInner withDisabled(Boolean disabled) { + this.disabled = disabled; + return this; + } + + /** + * Get the reason due to which the tenant was disabled in Azure Active Directory Connect Health. + * + * @return the disabledReason value + */ + public Integer disabledReason() { + return this.disabledReason; + } + + /** + * Set the reason due to which the tenant was disabled in Azure Active Directory Connect Health. + * + * @param disabledReason the disabledReason value to set + * @return the TenantInner object itself. + */ + public TenantInner withDisabledReason(Integer disabledReason) { + this.disabledReason = disabledReason; + return this; + } + + /** + * Get the list of global administrators for the tenant. + * + * @return the globalAdminsEmail value + */ + public List globalAdminsEmail() { + return this.globalAdminsEmail; + } + + /** + * Set the list of global administrators for the tenant. + * + * @param globalAdminsEmail the globalAdminsEmail value to set + * @return the TenantInner object itself. + */ + public TenantInner withGlobalAdminsEmail(List globalAdminsEmail) { + this.globalAdminsEmail = globalAdminsEmail; + return this; + } + + /** + * Get the initial domain of the tenant. + * + * @return the initialDomain value + */ + public String initialDomain() { + return this.initialDomain; + } + + /** + * Set the initial domain of the tenant. + * + * @param initialDomain the initialDomain value to set + * @return the TenantInner object itself. + */ + public TenantInner withInitialDomain(String initialDomain) { + this.initialDomain = initialDomain; + return this; + } + + /** + * Get the date and time, in UTC, when the tenant was last disabled in Azure Active Directory Connect Health. + * + * @return the lastDisabled value + */ + public DateTime lastDisabled() { + return this.lastDisabled; + } + + /** + * Set the date and time, in UTC, when the tenant was last disabled in Azure Active Directory Connect Health. + * + * @param lastDisabled the lastDisabled value to set + * @return the TenantInner object itself. + */ + public TenantInner withLastDisabled(DateTime lastDisabled) { + this.lastDisabled = lastDisabled; + return this; + } + + /** + * Get the date and time, in UTC, when the tenant onboarding status in Azure Active Directory Connect Health was last verified. + * + * @return the lastVerified value + */ + public DateTime lastVerified() { + return this.lastVerified; + } + + /** + * Set the date and time, in UTC, when the tenant onboarding status in Azure Active Directory Connect Health was last verified. + * + * @param lastVerified the lastVerified value to set + * @return the TenantInner object itself. + */ + public TenantInner withLastVerified(DateTime lastVerified) { + this.lastVerified = lastVerified; + return this; + } + + /** + * Get indicates if the tenant is allowed to onboard to Azure Active Directory Connect Health. + * + * @return the onboardingAllowed value + */ + public Boolean onboardingAllowed() { + return this.onboardingAllowed; + } + + /** + * Set indicates if the tenant is allowed to onboard to Azure Active Directory Connect Health. + * + * @param onboardingAllowed the onboardingAllowed value to set + * @return the TenantInner object itself. + */ + public TenantInner withOnboardingAllowed(Boolean onboardingAllowed) { + this.onboardingAllowed = onboardingAllowed; + return this; + } + + /** + * Get indicates if the tenant is already onboarded to Azure Active Directory Connect Health. + * + * @return the onboarded value + */ + public Boolean onboarded() { + return this.onboarded; + } + + /** + * Set indicates if the tenant is already onboarded to Azure Active Directory Connect Health. + * + * @param onboarded the onboarded value to set + * @return the TenantInner object itself. + */ + public TenantInner withOnboarded(Boolean onboarded) { + this.onboarded = onboarded; + return this; + } + + /** + * Get the certificate associated with the tenant to onboard data to Azure Active Directory Connect Health. + * + * @return the pksCertificate value + */ + public Object pksCertificate() { + return this.pksCertificate; + } + + /** + * Set the certificate associated with the tenant to onboard data to Azure Active Directory Connect Health. + * + * @param pksCertificate the pksCertificate value to set + * @return the TenantInner object itself. + */ + public TenantInner withPksCertificate(Object pksCertificate) { + this.pksCertificate = pksCertificate; + return this; + } + + /** + * Get indicates if the tenant has signed up for private preview of Azure Active Directory Connect Health features. + * + * @return the privatePreviewTenant value + */ + public Boolean privatePreviewTenant() { + return this.privatePreviewTenant; + } + + /** + * Set indicates if the tenant has signed up for private preview of Azure Active Directory Connect Health features. + * + * @param privatePreviewTenant the privatePreviewTenant value to set + * @return the TenantInner object itself. + */ + public TenantInner withPrivatePreviewTenant(Boolean privatePreviewTenant) { + this.privatePreviewTenant = privatePreviewTenant; + return this; + } + + /** + * Get indicates if data collection for this tenant is disabled or not. + * + * @return the tenantInQuarantine value + */ + public Boolean tenantInQuarantine() { + return this.tenantInQuarantine; + } + + /** + * Set indicates if data collection for this tenant is disabled or not. + * + * @param tenantInQuarantine the tenantInQuarantine value to set + * @return the TenantInner object itself. + */ + public TenantInner withTenantInQuarantine(Boolean tenantInQuarantine) { + this.tenantInQuarantine = tenantInQuarantine; + return this; + } + + /** + * Get the name of the tenant. + * + * @return the tenantName value + */ + public String tenantName() { + return this.tenantName; + } + + /** + * Set the name of the tenant. + * + * @param tenantName the tenantName value to set + * @return the TenantInner object itself. + */ + public TenantInner withTenantName(String tenantName) { + this.tenantName = tenantName; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/UpdatesImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/UpdatesImpl.java new file mode 100644 index 0000000000000..73c9f1ab0b9e4 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/UpdatesImpl.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. + * abc + */ + +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Updates; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.IPAddressAggregateSetting; + +class UpdatesImpl extends WrapperImpl implements Updates { + private final ADHybridHealthServiceManager manager; + + UpdatesImpl(ADHybridHealthServiceManager manager) { + super(manager.inner().updates()); + this.manager = manager; + } + + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public Observable iPAddressAggregateSettingsAsync(String serviceName, IPAddressAggregateSettingInner iPAddressAggregateSetting) { + UpdatesInner client = this.inner(); + return client.iPAddressAggregateSettingsAsync(serviceName, iPAddressAggregateSetting) + .map(new Func1() { + @Override + public IPAddressAggregateSetting call(IPAddressAggregateSettingInner inner) { + return new IPAddressAggregateSettingImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/UpdatesInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/UpdatesInner.java new file mode 100644 index 0000000000000..8f85d52a39f4c --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/UpdatesInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +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 okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Updates. + */ +public class UpdatesInner { + /** The Retrofit service to perform REST calls. */ + private UpdatesService service; + /** The service client containing this operation class. */ + private ADHybridHealthServiceImpl client; + + /** + * Initializes an instance of UpdatesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public UpdatesInner(Retrofit retrofit, ADHybridHealthServiceImpl client) { + this.service = retrofit.create(UpdatesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Updates to be + * used by Retrofit to perform actually REST calls. + */ + interface UpdatesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.Updates iPAddressAggregateSettings" }) + @PATCH("providers/Microsoft.ADHybridHealthService/services/{serviceName}/ipAddressAggregateSettings") + Observable> iPAddressAggregateSettings(@Path("serviceName") String serviceName, @Body IPAddressAggregateSettingInner iPAddressAggregateSetting, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Updates the IP address aggregate settings alert thresholds. + * + * @param serviceName The name of the service. + * @param iPAddressAggregateSetting The IP address aggregate setting object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the IPAddressAggregateSettingInner object if successful. + */ + public IPAddressAggregateSettingInner iPAddressAggregateSettings(String serviceName, IPAddressAggregateSettingInner iPAddressAggregateSetting) { + return iPAddressAggregateSettingsWithServiceResponseAsync(serviceName, iPAddressAggregateSetting).toBlocking().single().body(); + } + + /** + * Updates the IP address aggregate settings alert thresholds. + * + * @param serviceName The name of the service. + * @param iPAddressAggregateSetting The IP address aggregate setting 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 iPAddressAggregateSettingsAsync(String serviceName, IPAddressAggregateSettingInner iPAddressAggregateSetting, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(iPAddressAggregateSettingsWithServiceResponseAsync(serviceName, iPAddressAggregateSetting), serviceCallback); + } + + /** + * Updates the IP address aggregate settings alert thresholds. + * + * @param serviceName The name of the service. + * @param iPAddressAggregateSetting The IP address aggregate setting object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IPAddressAggregateSettingInner object + */ + public Observable iPAddressAggregateSettingsAsync(String serviceName, IPAddressAggregateSettingInner iPAddressAggregateSetting) { + return iPAddressAggregateSettingsWithServiceResponseAsync(serviceName, iPAddressAggregateSetting).map(new Func1, IPAddressAggregateSettingInner>() { + @Override + public IPAddressAggregateSettingInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates the IP address aggregate settings alert thresholds. + * + * @param serviceName The name of the service. + * @param iPAddressAggregateSetting The IP address aggregate setting object. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IPAddressAggregateSettingInner object + */ + public Observable> iPAddressAggregateSettingsWithServiceResponseAsync(String serviceName, IPAddressAggregateSettingInner iPAddressAggregateSetting) { + if (serviceName == null) { + throw new IllegalArgumentException("Parameter serviceName is required and cannot be null."); + } + if (iPAddressAggregateSetting == null) { + throw new IllegalArgumentException("Parameter iPAddressAggregateSetting 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(iPAddressAggregateSetting); + return service.iPAddressAggregateSettings(serviceName, iPAddressAggregateSetting, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = iPAddressAggregateSettingsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse iPAddressAggregateSettingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/UserPreferenceImpl.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/UserPreferenceImpl.java new file mode 100644 index 0000000000000..8b9f770829a32 --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/UserPreferenceImpl.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.adhybridhealthservice.v2014_01_01.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.UserPreference; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class UserPreferenceImpl extends WrapperImpl implements UserPreference { + private final ADHybridHealthServiceManager manager; + UserPreferenceImpl(UserPreferenceInner inner, ADHybridHealthServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public ADHybridHealthServiceManager manager() { + return this.manager; + } + + @Override + public List metricNames() { + return this.inner().metricNames(); + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/UserPreferenceInner.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/UserPreferenceInner.java new file mode 100644 index 0000000000000..a2bb4632b6d8f --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/UserPreferenceInner.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.adhybridhealthservice.v2014_01_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The user preference for a given feature. + */ +public class UserPreferenceInner { + /** + * The name of the metric. + */ + @JsonProperty(value = "metricNames") + private List metricNames; + + /** + * Get the name of the metric. + * + * @return the metricNames value + */ + public List metricNames() { + return this.metricNames; + } + + /** + * Set the name of the metric. + * + * @param metricNames the metricNames value to set + * @return the UserPreferenceInner object itself. + */ + public UserPreferenceInner withMetricNames(List metricNames) { + this.metricNames = metricNames; + return this; + } + +} diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/package-info.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/implementation/package-info.java new file mode 100644 index 0000000000000..a668cff4da78d --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_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 ADHybridHealthService. + * REST APIs for Azure Active Directory Connect Health. + */ +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01.implementation; diff --git a/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/package-info.java b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_01/package-info.java new file mode 100644 index 0000000000000..8f759fb60564c --- /dev/null +++ b/sdk/adhybridhealthservice/mgmt-v2014_01_01/src/main/java/com/microsoft/azure/management/adhybridhealthservice/v2014_01_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 ADHybridHealthService. + * REST APIs for Azure Active Directory Connect Health. + */ +package com.microsoft.azure.management.adhybridhealthservice.v2014_01_01;