From 57e35789174959268109699b99b1a89efa9c8d3d Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Sat, 2 Mar 2019 17:39:51 +0000 Subject: [PATCH] Generated from 74422c4469e2235d395a497c7883378c16b9fe5c Addressing Review Feedback, changing POST call of blobUri -> generateBlobUri --- .../AdditionalInformation.java | 121 + .../adhybridhealthservice/Agent.java | 200 + .../AlgorithmStepType.java | 74 + .../AssociatedObject.java | 330 ++ .../adhybridhealthservice/AttributeDelta.java | 150 + .../AttributeDeltaOperationType.java | 50 + .../AttributeMapping.java | 122 + .../AttributeMappingType.java | 47 + .../AttributeMppingSource.java | 122 + .../ChangeNotReimported.java | 69 + .../ChangeNotReimportedDelta.java | 123 + .../ChangeNotReimportedEntry.java | 200 + .../ConnectorConnectionError.java | 226 + .../ConnectorConnectionErrors.java | 44 + .../ConnectorObjectError.java | 382 ++ .../ConnectorObjectErrors.java | 44 + .../DeltaOperationType.java | 59 + .../adhybridhealthservice/Display.java | 96 + .../adhybridhealthservice/ErrorDetail.java | 149 + .../adhybridhealthservice/ExportError.java | 980 ++++ .../adhybridhealthservice/ExportErrors.java | 44 + .../ExtensionErrorInfo.java | 95 + .../adhybridhealthservice/HealthStatus.java | 50 + .../adhybridhealthservice/HelpLink.java | 69 + .../adhybridhealthservice/Hotfix.java | 96 + .../adhybridhealthservice/Hotfixes.java | 44 + .../adhybridhealthservice/ImportError.java | 360 ++ .../adhybridhealthservice/ImportErrors.java | 44 + .../InboundReplicationNeighbor.java | 356 ++ .../InboundReplicationNeighbors.java | 44 + .../adhybridhealthservice/Level.java | 44 + .../adhybridhealthservice/MetricGroup.java | 96 + .../adhybridhealthservice/MetricSet.java | 71 + .../ModuleConfiguration.java | 96 + .../ModuleConfigurations.java | 44 + .../MonitoringLevel.java | 56 + .../ObjectWithSyncError.java | 434 ++ .../adhybridhealthservice/Partition.java | 252 + .../adhybridhealthservice/PartitionScope.java | 122 + .../PasswordHashSyncConfiguration.java | 70 + .../PasswordManagementSettings.java | 278 ++ .../PasswordOperationTypes.java | 44 + .../adhybridhealthservice/RuleErrorInfo.java | 147 + .../adhybridhealthservice/RunProfile.java | 96 + .../adhybridhealthservice/RunProfiles.java | 44 + .../adhybridhealthservice/RunStep.java | 199 + .../adhybridhealthservice/State.java | 50 + .../TabularExportError.java | 122 + .../TenantOnboardingDetails.java | 71 + .../adhybridhealthservice/ValueDelta.java | 70 + .../ValueDeltaOperationType.java | 47 + .../adhybridhealthservice/ValueType.java | 53 + .../ADHybridHealthServiceImpl.java | 341 ++ .../AdDomainServiceMembersInner.java | 429 ++ .../AddsServiceMemberInner.java | 910 ++++ .../AddsServiceMembersInner.java | 838 ++++ .../implementation/AddsServicesInner.java | 3291 +++++++++++++ .../AddsServicesReplicationStatusInner.java | 136 + .../AddsServicesServiceMembersInner.java | 507 ++ .../AddsServicesUserPreferencesInner.java | 406 ++ .../implementation/AlertFeedbackInner.java | 228 + .../implementation/AlertInner.java | 523 +++ .../implementation/AlertsInner.java | 422 ++ .../implementation/ConfigurationsInner.java | 629 +++ .../implementation/ConnectorInner.java | 411 ++ .../implementation/CredentialInner.java | 96 + .../implementation/DimensionInner.java | 258 ++ .../implementation/DimensionsInner.java | 300 ++ .../implementation/ErrorCountInner.java | 95 + .../ErrorReportUsersEntryInner.java | 148 + .../implementation/ExportStatusInner.java | 123 + .../implementation/ForestSummaryInner.java | 201 + .../GlobalConfigurationInner.java | 148 + .../implementation/ItemInner.java | 69 + .../MergedExportErrorInner.java | 592 +++ .../implementation/MetricMetadataInner.java | 306 ++ .../implementation/MetricSetsInner.java | 72 + .../implementation/OperationInner.java | 69 + .../implementation/OperationsInner.java | 283 ++ .../implementation/PageImpl.java | 75 + .../implementation/PageImpl1.java | 75 + .../ReplicationStatusInner.java | 95 + .../ReplicationSummaryInner.java | 204 + .../implementation/ReportsInner.java | 128 + .../implementation/ResultInner.java | 43 + .../implementation/RiskyIPBlobUriInner.java | 175 + .../ServiceConfigurationInner.java | 251 + .../implementation/ServiceMemberInner.java | 700 +++ .../implementation/ServiceMembersInner.java | 2212 +++++++++ .../ServicePropertiesInner.java | 653 +++ .../implementation/ServicesInner.java | 4098 +++++++++++++++++ .../implementation/TenantInner.java | 578 +++ .../implementation/UserPreferenceInner.java | 44 + .../implementation/package-info.java | 11 + .../adhybridhealthservice/package-info.java | 11 + 95 files changed, 28480 insertions(+) create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AdditionalInformation.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Agent.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AlgorithmStepType.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AssociatedObject.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AttributeDelta.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AttributeDeltaOperationType.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AttributeMapping.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AttributeMappingType.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AttributeMppingSource.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ChangeNotReimported.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ChangeNotReimportedDelta.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ChangeNotReimportedEntry.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ConnectorConnectionError.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ConnectorConnectionErrors.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ConnectorObjectError.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ConnectorObjectErrors.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/DeltaOperationType.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Display.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ErrorDetail.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ExportError.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ExportErrors.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ExtensionErrorInfo.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/HealthStatus.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/HelpLink.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Hotfix.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Hotfixes.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ImportError.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ImportErrors.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/InboundReplicationNeighbor.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/InboundReplicationNeighbors.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Level.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/MetricGroup.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/MetricSet.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ModuleConfiguration.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ModuleConfigurations.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/MonitoringLevel.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ObjectWithSyncError.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Partition.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/PartitionScope.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/PasswordHashSyncConfiguration.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/PasswordManagementSettings.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/PasswordOperationTypes.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/RuleErrorInfo.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/RunProfile.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/RunProfiles.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/RunStep.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/State.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/TabularExportError.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/TenantOnboardingDetails.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ValueDelta.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ValueDeltaOperationType.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ValueType.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ADHybridHealthServiceImpl.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AdDomainServiceMembersInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServiceMemberInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServiceMembersInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServicesInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServicesReplicationStatusInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServicesServiceMembersInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServicesUserPreferencesInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AlertFeedbackInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AlertInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AlertsInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ConfigurationsInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ConnectorInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/CredentialInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/DimensionInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/DimensionsInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ErrorCountInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ErrorReportUsersEntryInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ExportStatusInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ForestSummaryInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/GlobalConfigurationInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ItemInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/MergedExportErrorInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/MetricMetadataInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/MetricSetsInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/OperationInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/OperationsInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/PageImpl.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/PageImpl1.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ReplicationStatusInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ReplicationSummaryInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ReportsInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ResultInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/RiskyIPBlobUriInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ServiceConfigurationInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ServiceMemberInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ServiceMembersInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ServicePropertiesInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ServicesInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/TenantInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/UserPreferenceInner.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/package-info.java create mode 100644 azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/package-info.java diff --git a/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AdditionalInformation.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AdditionalInformation.java new file mode 100644 index 0000000000000..9ef52806f7b67 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Agent.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Agent.java new file mode 100644 index 0000000000000..96bc7cd0f09f9 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AlgorithmStepType.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AlgorithmStepType.java new file mode 100644 index 0000000000000..f981f9b9aac54 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AssociatedObject.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AssociatedObject.java new file mode 100644 index 0000000000000..eff625973a4ee --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AttributeDelta.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AttributeDelta.java new file mode 100644 index 0000000000000..371d9448934da --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AttributeDeltaOperationType.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AttributeDeltaOperationType.java new file mode 100644 index 0000000000000..2fe4d993754e8 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AttributeMapping.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AttributeMapping.java new file mode 100644 index 0000000000000..f33307a8c8b62 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AttributeMappingType.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AttributeMappingType.java new file mode 100644 index 0000000000000..332e8ebf70272 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AttributeMppingSource.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/AttributeMppingSource.java new file mode 100644 index 0000000000000..06638c433f4cd --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ChangeNotReimported.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ChangeNotReimported.java new file mode 100644 index 0000000000000..84ffa1287795d --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ChangeNotReimportedDelta.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ChangeNotReimportedDelta.java new file mode 100644 index 0000000000000..1527865ad6b31 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ChangeNotReimportedEntry.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ChangeNotReimportedEntry.java new file mode 100644 index 0000000000000..2e082d19898ca --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ConnectorConnectionError.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ConnectorConnectionError.java new file mode 100644 index 0000000000000..8392339ef78fd --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ConnectorConnectionErrors.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ConnectorConnectionErrors.java new file mode 100644 index 0000000000000..31f5c88e7010e --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ConnectorObjectError.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ConnectorObjectError.java new file mode 100644 index 0000000000000..250048d652612 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ConnectorObjectErrors.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ConnectorObjectErrors.java new file mode 100644 index 0000000000000..aa983af2e2da8 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/DeltaOperationType.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/DeltaOperationType.java new file mode 100644 index 0000000000000..0bf1ef985f42d --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Display.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Display.java new file mode 100644 index 0000000000000..20780304e81d0 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ErrorDetail.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ErrorDetail.java new file mode 100644 index 0000000000000..36dc5769b55be --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +import com.microsoft.azure.management.adhybridhealthservice.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ExportError.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ExportError.java new file mode 100644 index 0000000000000..2fbf3ed2097c4 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ExportErrors.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ExportErrors.java new file mode 100644 index 0000000000000..7dd4f06b41450 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ExtensionErrorInfo.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ExtensionErrorInfo.java new file mode 100644 index 0000000000000..87e125e35387b --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/HealthStatus.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/HealthStatus.java new file mode 100644 index 0000000000000..b254b1795d90d --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/HelpLink.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/HelpLink.java new file mode 100644 index 0000000000000..8bff57a48d9d2 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Hotfix.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Hotfix.java new file mode 100644 index 0000000000000..5938828a897d3 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Hotfixes.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Hotfixes.java new file mode 100644 index 0000000000000..67ee6c9c1bcd7 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ImportError.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ImportError.java new file mode 100644 index 0000000000000..eac1ef56f5e56 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ImportErrors.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ImportErrors.java new file mode 100644 index 0000000000000..06eebc498f7f4 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/InboundReplicationNeighbor.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/InboundReplicationNeighbor.java new file mode 100644 index 0000000000000..0cf35206852a3 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/InboundReplicationNeighbors.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/InboundReplicationNeighbors.java new file mode 100644 index 0000000000000..ce4cf2875299f --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Level.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Level.java new file mode 100644 index 0000000000000..544a5d52291ea --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/MetricGroup.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/MetricGroup.java new file mode 100644 index 0000000000000..9a284999c280e --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/MetricSet.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/MetricSet.java new file mode 100644 index 0000000000000..0ed9e8081b9cb --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ModuleConfiguration.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ModuleConfiguration.java new file mode 100644 index 0000000000000..6889bdb1488d8 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ModuleConfigurations.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ModuleConfigurations.java new file mode 100644 index 0000000000000..b7f9281ebfd10 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/MonitoringLevel.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/MonitoringLevel.java new file mode 100644 index 0000000000000..85e4b09708c0a --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ObjectWithSyncError.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ObjectWithSyncError.java new file mode 100644 index 0000000000000..9257be1545b71 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Partition.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/Partition.java new file mode 100644 index 0000000000000..81f526caaf892 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/PartitionScope.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/PartitionScope.java new file mode 100644 index 0000000000000..463c4840e4d64 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/PasswordHashSyncConfiguration.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/PasswordHashSyncConfiguration.java new file mode 100644 index 0000000000000..1375691cd4d13 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/PasswordManagementSettings.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/PasswordManagementSettings.java new file mode 100644 index 0000000000000..c9bf377d6895e --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/PasswordOperationTypes.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/PasswordOperationTypes.java new file mode 100644 index 0000000000000..26486fd4ed99d --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/RuleErrorInfo.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/RuleErrorInfo.java new file mode 100644 index 0000000000000..261d4d892f5ea --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/RunProfile.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/RunProfile.java new file mode 100644 index 0000000000000..e35112bd227e5 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/RunProfiles.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/RunProfiles.java new file mode 100644 index 0000000000000..ecbca7739af27 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/RunStep.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/RunStep.java new file mode 100644 index 0000000000000..5f0ca52779ca4 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/State.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/State.java new file mode 100644 index 0000000000000..55f51a42223a7 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/TabularExportError.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/TabularExportError.java new file mode 100644 index 0000000000000..fe245ce82e6dd --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/TenantOnboardingDetails.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/TenantOnboardingDetails.java new file mode 100644 index 0000000000000..e2297c6037558 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ValueDelta.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ValueDelta.java new file mode 100644 index 0000000000000..60c65ed85719e --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ValueDeltaOperationType.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ValueDeltaOperationType.java new file mode 100644 index 0000000000000..abe11cac35146 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ValueType.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/ValueType.java new file mode 100644 index 0000000000000..a00e324047030 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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; + +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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ADHybridHealthServiceImpl.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ADHybridHealthServiceImpl.java new file mode 100644 index 0000000000000..9f625b0ee5525 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ADHybridHealthServiceImpl.java @@ -0,0 +1,341 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT 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.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; + } + + /** + * 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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AdDomainServiceMembersInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AdDomainServiceMembersInner.java new file mode 100644 index 0000000000000..1d1636a8be5e8 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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.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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServiceMemberInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServiceMemberInner.java new file mode 100644 index 0000000000000..5e43df63eb3aa --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.implementation; + +import java.util.List; +import org.joda.time.DateTime; +import com.microsoft.azure.management.adhybridhealthservice.Hotfix; +import com.microsoft.azure.management.adhybridhealthservice.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServiceMembersInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServiceMembersInner.java new file mode 100644 index 0000000000000..c621b0791a9de --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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.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.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.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.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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServicesInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServicesInner.java new file mode 100644 index 0000000000000..a30329e311f84 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServicesReplicationStatusInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServicesReplicationStatusInner.java new file mode 100644 index 0000000000000..38df08bfd8fe1 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServicesServiceMembersInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServicesServiceMembersInner.java new file mode 100644 index 0000000000000..60bb21f0960b4 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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.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.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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServicesUserPreferencesInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AddsServicesUserPreferencesInner.java new file mode 100644 index 0000000000000..c9655411ca2ce --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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.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.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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AlertFeedbackInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AlertFeedbackInner.java new file mode 100644 index 0000000000000..aae58b93bd9b0 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AlertInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AlertInner.java new file mode 100644 index 0000000000000..2107147c8eb11 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.implementation; + +import java.util.UUID; +import com.microsoft.azure.management.adhybridhealthservice.Level; +import com.microsoft.azure.management.adhybridhealthservice.State; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.HelpLink; +import com.microsoft.azure.management.adhybridhealthservice.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AlertsInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/AlertsInner.java new file mode 100644 index 0000000000000..61ee20fc7b8b9 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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.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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ConfigurationsInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ConfigurationsInner.java new file mode 100644 index 0000000000000..c63f4aa35b8c4 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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.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.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.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.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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ConnectorInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ConnectorInner.java new file mode 100644 index 0000000000000..cd9bbbc8839f9 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.implementation; + +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.Partition; +import com.microsoft.azure.management.adhybridhealthservice.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/CredentialInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/CredentialInner.java new file mode 100644 index 0000000000000..58ec15cb4757f --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/DimensionInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/DimensionInner.java new file mode 100644 index 0000000000000..006ce9db2b2a4 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.implementation; + +import com.microsoft.azure.management.adhybridhealthservice.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/DimensionsInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/DimensionsInner.java new file mode 100644 index 0000000000000..04b646eece986 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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.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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ErrorCountInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ErrorCountInner.java new file mode 100644 index 0000000000000..5615a11ea8255 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ErrorReportUsersEntryInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ErrorReportUsersEntryInner.java new file mode 100644 index 0000000000000..b06c3957b98aa --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ExportStatusInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ExportStatusInner.java new file mode 100644 index 0000000000000..34190ca45d7db --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ForestSummaryInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ForestSummaryInner.java new file mode 100644 index 0000000000000..c21af5ccc5684 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/GlobalConfigurationInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/GlobalConfigurationInner.java new file mode 100644 index 0000000000000..01597c00268bd --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ItemInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ItemInner.java new file mode 100644 index 0000000000000..751d620ee8d1c --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/MergedExportErrorInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/MergedExportErrorInner.java new file mode 100644 index 0000000000000..c75091d864f6e --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.adhybridhealthservice.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/MetricMetadataInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/MetricMetadataInner.java new file mode 100644 index 0000000000000..5db7315fc16aa --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.implementation; + +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/MetricSetsInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/MetricSetsInner.java new file mode 100644 index 0000000000000..8592a2d7721c9 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.implementation; + +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/OperationInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/OperationInner.java new file mode 100644 index 0000000000000..238230f389481 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/OperationsInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/OperationsInner.java new file mode 100644 index 0000000000000..ea7281aa04048 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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.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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/PageImpl.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/PageImpl.java new file mode 100644 index 0000000000000..62a0f9ae5bd32 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/PageImpl1.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/PageImpl1.java new file mode 100644 index 0000000000000..a598046e8452a --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ReplicationStatusInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ReplicationStatusInner.java new file mode 100644 index 0000000000000..bf96d98b174f5 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ReplicationSummaryInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ReplicationSummaryInner.java new file mode 100644 index 0000000000000..f20d83489f02b --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.implementation; + +import org.joda.time.DateTime; +import java.util.List; +import com.microsoft.azure.management.adhybridhealthservice.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ReportsInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ReportsInner.java new file mode 100644 index 0000000000000..0f13bbccccc9d --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ResultInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ResultInner.java new file mode 100644 index 0000000000000..e24369fb6e952 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/RiskyIPBlobUriInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/RiskyIPBlobUriInner.java new file mode 100644 index 0000000000000..0328fe9d5beb2 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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 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 the new Risky IP report was requested. + * + * @return the blobCreateDateTime value + */ + public DateTime blobCreateDateTime() { + return this.blobCreateDateTime; + } + + /** + * Set time at which the 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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ServiceConfigurationInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ServiceConfigurationInner.java new file mode 100644 index 0000000000000..386dcdc73b898 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ServiceMemberInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ServiceMemberInner.java new file mode 100644 index 0000000000000..493274c15c3cb --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.adhybridhealthservice.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ServiceMembersInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ServiceMembersInner.java new file mode 100644 index 0000000000000..a7aa7b08881a4 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ServiceMembersInner.java @@ -0,0 +1,2212 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT 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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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 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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ServicePropertiesInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ServicePropertiesInner.java new file mode 100644 index 0000000000000..b6d4302346e95 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ServicesInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/ServicesInner.java new file mode 100644 index 0000000000000..9da811bf02ca6 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/TenantInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/TenantInner.java new file mode 100644 index 0000000000000..5e3cbd2e12415 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/UserPreferenceInner.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/UserPreferenceInner.java new file mode 100644 index 0000000000000..5c0eb70266e22 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.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/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/package-info.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/implementation/package-info.java new file mode 100644 index 0000000000000..fdbd300b64061 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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.implementation; diff --git a/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/package-info.java b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/package-info.java new file mode 100644 index 0000000000000..d71db3dddb40d --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/src/main/java/com/microsoft/azure/management/adhybridhealthservice/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;